The mdir.logrank function calculates the multiple-direction logrank statistic and its corresponding p-values based on a \(\chi^2\)-approximation and a permutation approach
mdir.logrank(data, cross = TRUE, rg = list(c(0, 0)), nperm = 10000,
dig_p = 3, dig_stat = 3)A data.frame, list or environment containing the variables time,
event (with values 0 for censored and 1 for uncensored) and group.
logical. Should the weight corresponding to crossing hazards be included?
The default is TRUE.
A list (or NULL) containing the exponents c(r, g) of the directions
\(w(x) = x^r (1-x)^g\). Both exponents r,g need to be natural numbers including 0.
Default is list(c(0, 0)) corresponding to proportional hazards.
The number of permutations used for calculating the permuted p-value. The default option is 10000.
The p-values are rounded to dig_p digits, the default is 3.
The test statistic is rounded to dig_stat digits, the default is 3.
An mdirLR object containing the following components:
The directions used and whether the directions specified by the user were linearly independent.
The p-values of the multiple-direction logrank test using the \(\chi^2\)-approximation (Approx.) as well as the one using the permutation approach (Perm.).
Value of the multiple-direction logrank statistic.
A list containing the exponents of the direction considered in the statistical analysis.
logical. Was the crossing direction considered in the statistical analysis?
logical. Were the directions specified by the user linearly independent?
The number of permutations used for calculating the permuted p-value.
The package provides the multiple-direction logrank statistic for
the two sample testing problem within right-censored survival data. Directions
of the form \(w(x) = 1 - 2x\) (cross = TRUE) and \(w(x) = x^r * (1-x)^g\) for natural numbers
r,g (including 0) can be specified.
The multiple-direction logrank test needs linearly independent directions.
A check for this is implemented. If the directions chosen by the user are
linearly dependent then a subset consisting of linearly independent directions
is selected automatically.
The mdir.logrank function returns the test statistic as well as two
corresponding p-values: the first is based on a \(chi^2\) approximation and
the second one is based on a permutation procedure.
Ditzhaus, M., Friedrich, S. (2018). More powerful logrank permutation tests for two-sample survival data. arXiv preprint arXiv:1807.05504.
mdir.onesided (one-sided test)
# NOT RUN {
library(coin)
data(GTSG)
out <- mdir.logrank(data = GTSG, nperm = 1000)
## Detailed information:
summary(out)
# }
Run the code above in your browser using DataLab