The mdir.onesided function calculates the multiple-direction logrank statistic for (one-sided) stochastic ordered alternatives and its p-value based on a wild bootstrap approach
mdir.onesided(data, group1, rg = list(c(0, 0), c(0, 4), c(4, 0)),
w.user = NA, wild = "rade", iter = 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.
The name or the coding for the first group in the data set (neceassary for a one-sided testing problem).
A list containing the exponents c(r, g) of the directions
\(w(x) = x^r (1-x)^g\) or NA. Both exponents r,g need to be natural numbers including 0.
Default is list(c(0, 0), c(0, 4), c(4, 0)) corresponding to the choice of the
proportional, early and late direction/weight.
A list containing the user specified functions or NA (default).
The wild bootstrap approach used for estimating the p-value. The Rademacher
(rade, default), the normal distribution (norm) or the centred
Poisson distribution (pois) approach can be selected.
The number of iteration used for calculating the wild bootstrap 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 mdirone object containing the following components:
The directions used and whether the directions specified by the user were linearly independent.
The p-value of the one-sided multiple-direction logrank test using the the using the permutation approach (Perm.).
The wild bootstrap approach which was used
Value of the one-sided multiple-direction logrank statistic.
The argument rg.
The argument w.user.
The name of the first group.
logical or NA. indep\(=\)TRUE/FALSE when the directions specified by rg were linearly independent.
indep\(=\)NA when rg\(=\)NA.
The number of iterations used for calculating the wild bootstrap p-value.
The function provides the multiple-direction logrank statistic for
the two sample one-sided testing problem of stochastic ordering within right-censored survival data.
The null hypothesis \(H:F_1=F_2\) is tested against the one-sided alternative \(K:F_1 \ge F_2,
F_1 \neq F_2\). The first group corresponding to \(F_1\) can be specified
by the argument group1. An arbitrary amount of directions/weights of the form
\(w(x) = x^r (1-x)^g\) for natural numbers r,g (including 0) can be chosen in the list
rg. The multiple-direction onesided 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 user can also specify weights of a different shape in the list
w.user. But if the user specified own weights in w.user then there is no
automatic check for linear independence.
The mdir.onesided function returns the test statistic and the p-value
based on a wild bootstrap procedure wild.
Ditzhaus, M., Pauly, M. (2018). Wild bootstrap logrank tests with broader power functions for testing superiority. arXiv preprint arXiv:arXiv:1808.05627.
# NOT RUN {
library(coin)
data(GTSG)
out <- mdir.onesided(data = GTSG, group1 = "Chemotherapy+Radiation", iter = 1000)
## Detailed information:
summary(out)
# }
Run the code above in your browser using DataLab