mdir.logrank: Two-sample multiple-direction log rank test In mdir.logrank: Multiple-Direction Logrank Test

Description

The mdir.logrank function calculates the multiple-direction logrank statistic and its corresponding p-values based on a χ^2-approximation and a permutation approach

Usage

 ```1 2``` ```mdir.logrank(data, cross = TRUE, rg = list(c(0, 0)), nperm = 10000, dig_p = 3, dig_stat = 3) ```

Arguments

 `data` A data.frame, list or environment containing the variables `time`, `event` (with values 0 for censored and 1 for uncensored) and `group`. `cross` logical. Should the weight corresponding to crossing hazards be included? The default is `TRUE`. `rg` 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. `nperm` The number of permutations used for calculating the permuted p-value. The default option is 10000. `dig_p` The p-values are rounded to `dig_p` digits, the default is 3. `dig_stat` The test statistic is rounded to `dig_stat` digits, the default is 3.

Details

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.

Value

An `mdirLR` object containing the following components:

 `Descriptive` The directions used and whether the directions specified by the user were linearly independent. `p.values` The p-values of the multiple-direction logrank test using the χ^2-approximation (Approx.) as well as the one using the permutation approach (Perm.). `stat` Value of the multiple-direction logrank statistic. `rg` A list containing the exponents of the direction considered in the statistical analysis. `cross` logical. Was the crossing direction considered in the statistical analysis? `indep` logical. Were the directions specified by the user linearly independent? `nperm` The number of permutations used for calculating the permuted p-value.

References

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)
 ```1 2 3 4 5 6``` ```library(coin) data(GTSG) out <- mdir.logrank(data = GTSG, nperm = 1000) ## Detailed information: summary(out) ```