A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://cran.rstudio.com/web/packages/Rcpp/../RcppArray/../Rcpp/../MultSurvTests/readme/README.html below:

README

MultSurvTests

This R package contains multivariate two-sample survival permutation tests, based on the logrank and Gehan statistics. The tests are described in Persson et al. (2019).

To install the development version from GitHub:

library(devtools)
install_github("lukketotte/MultSurvTests")

Example usage, comparing the bivariate survival times of the two treatment groups in the diabetes data (included in the package):

library(MultSurvTests)
# Diabetes data:
?diabetes

# Survival times for the two groups:
x <- as.matrix(subset(diabetes, LASER==1)[c(6,8)])
y <- as.matrix(subset(diabetes, LASER==2)[c(6,8)])

# Censoring status for the two groups:
delta.x <- as.matrix(subset(diabetes, LASER==1)[c(7,9)])
delta.y <- as.matrix(subset(diabetes, LASER==2)[c(7,9)])

# Create the input for the test:
z <- rbind(x, y)
delta.z <- rbind(delta.x, delta.y)

# Run the tests with 99 permutations:
perm_gehan(B = 99, z, delta.z, n1 = nrow(x))
perm_mvlogrank(B = 99, z, delta.z, n1 = nrow(x))

# In most cases, it is preferable to use more than 99
# permutations for computing p-values. choose_B() can
# be used to determine how many permutations are needed.

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4