perm_mvlogrank {MultSurvTests}R Documentation

Multivariate permutation logrank test

Description

Computes the p-value of the multivariate permutation logrank test described in Persson et al. (2019).

Usage

perm_mvlogrank(B, z, delta.z, n1)

Arguments

B

An integer specifying the number of permutations to perform. The default is 999. It is recommended to use choose_B for choosing B.

z

A matrix containing the observed (possibly censored) survival times for the two groups. The observations for the first group should be one the first n1 rows.

delta.z

A matrix containing the censoring status of each observation in z.

n1

An integer specifying the sample size of the first group.

Details

Multivariate version of the logrank and Gehan tests were described by Wei & Lachin (1984). Persson et al. (2019) described permutation versions of these tests, with improved performance.

Value

A p-value.

References

Persson I, Arnroth L, Thulin M (2019). “Multivariate two sample permutation tests for trials with multiple time to event outcomes.” Pharmaceutical Statistics, 18, 476–485. doi: 10.1002/pst.1938, https://doi.org/10.1002/pst.1938.

Wei LJ, Lachin JM (1984). “Two sample asymptotically distribution free tests for incomplete multivariate observations.” Journal of the American Statistical Association, 79(387), 653–661. doi: 10.1080/01621459.1984.10478093, https://doi.org/10.1080/01621459.1984.10478093.

Examples

# 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 test with 50 permutations:
perm_mvlogrank(B = 50, z, delta.z, n1 = nrow(x))
# In most cases, it is preferable to use more than 50
# permutations for computing p-values. choose_B() can
# be used to determine how many permutations are needed.


[Package MultSurvTests version 0.2 Index]