Title: | Multiple RMTL-Based Tests for Competing Risks Data in General Factorial Designs |
---|---|
Description: | We implemented multiple tests based on the restricted mean time lost (RMTL) for general factorial designs as described in Munko et al. (2024) <doi:10.48550/arXiv.2409.07917>. Therefore, an asymptotic test and a permutation test are incorporated with a Wald-type test statistic. The asymptotic test takes the asymptotic exact dependence structure of the test statistics into account to gain more power. Furthermore, confidence intervals for RMTL contrasts can be calculated and plotted and a stepwise extension that can improve the power of the multiple tests is available. |
Authors: | Marc Ditzhaus [aut], Dennis Dobler [aut], Merle Munko [aut, cre], Jannes Walter [aut] |
Maintainer: | Merle Munko <[email protected]> |
License: | GPL (>= 3) |
Version: | 0.1.0 |
Built: | 2024-11-03 05:21:46 UTC |
Source: | https://github.com/cran/GFDrmtl |
This function provides a shiny app for performing multiple RMTL-based tests. Here, the asymptotic or permutation tests can be applied.
GFDrmtlGUI()
GFDrmtlGUI()
Note that the calculations for the permutation test may take a while, especially with stepwise extension.
No return value, called for side effects.
Linear hypotheses of the restricted mean time losts (RMTLs) of k different groups in a competing risks setup can be tested simultaneously.
Therefore, the multivariate distribution of local Wald-type test statistics is approximated by (1) estimating the covariance between the test statistics (method = "asymptotic"
) or (3) a permutation approach with Bonferroni-correction (method = "permutation"
), respectively. Hence, adjusted p-values can be obtained.
RMTL.test( time = NULL, status = NULL, group = NULL, formula = NULL, event = NULL, data = NULL, hyp_mat, hyp_vec = NULL, M = NULL, tau, method = c("permutation", "asymptotic"), stepwise = FALSE, alpha = 0.05, Nres = 4999, seed = 1 )
RMTL.test( time = NULL, status = NULL, group = NULL, formula = NULL, event = NULL, data = NULL, hyp_mat, hyp_vec = NULL, M = NULL, tau, method = c("permutation", "asymptotic"), stepwise = FALSE, alpha = 0.05, Nres = 4999, seed = 1 )
time |
A vector containing the observed event times. Default option is |
status |
A vector of the same length as |
group |
A vector of the same length as |
formula |
A model |
event |
The name of censoring status indicator with values 0 = censored and 1,...,M for the M different competing events. Default option is |
data |
A data.frame or list containing the variables in formula and the censoring status indicator. Default option is |
hyp_mat |
A list containing all the hypothesis matrices H for the multiple tests or one of the options |
hyp_vec |
A list containing all the hypothesis vectors c for the multiple tests or a vector if only one hypothesis is of interest. By default ( |
M |
An integer specifying the number of competing risks. By default ( |
tau |
A numeric value specifying the end of the relevant time window for the analysis. Default option is |
method |
One of the methods |
stepwise |
A logical vector indicating whether a stepwise extension of the test should be performed. If |
alpha |
A numeric value specifying the global level of significance. Default option is |
Nres |
The number of random variables to approximate the limiting distribution. This is only used if at least one hypothesis matrix is not a row vector. The default option is |
seed |
A single value, interpreted as an integer, for providing reproducibility of the results or |
The restricted mean time lost (RMTL) of group and event
is defined as
for all , where
denotes the cumulative incidence function of group
and event
.
Let
be the vector of the RMTLs and
be the vector of their estimators.
Let with
and
for all
.
We are considering the multiple testing problem with null and alternative hypotheses
For the permutation test, the matrices additionally need to fulfill for all
, where
denote the vector of ones, the
th unit vector and the vector of zeros, respectively.
For the argument hyp_mat
, the options "Dunnett"
and "Tukey"
create the cause-wise many-to-one and all-pairs comparisons, respectively, as described in Example 3 of Munko et al. (2024) and the options "2by2"
and "2by2 cause-wisely"
create the hypothesis matrices as described in Example 4 of Munko et al. (2024).
If stepwise = TRUE
, the closed testing procedure is applied. In this case, no confidence intervals can be computed for the linear combinations but potentially more tests can reject.
Note that the calculations for the permutation test may take a while.
A list of class GFDrmst
containing the following components:
method |
A character containing the method which has been used. |
test_stat |
A numeric vector containing the calculated Wald-type test statistics for the local hypotheses. |
p.value |
A numeric vector containing the adjusted p-values for the local hypotheses. |
res |
A list containing the results of the multiple tests including the hypothesis matrices, estimators of the linear combinations of RMTLs, potentially confidence intervals for the linear combinations (if all matrices are row vectors and stepwise = |
alpha |
A numeric value containing the global level of significance. |
Munko, M., Dobler, D., Ditzhaus, M. (2024). Multiple tests for restricted mean time lost with competing risks data, arXiv preprint (arXiv:2409.07917). doi:10.48550/arXiv.2409.07917
library(mstate) data("ebmt2") # multiple asymptotic tests out <- RMTL.test(time = ebmt2$time, status = ebmt2$status, group = ebmt2$match, hyp_mat = "Dunnett", tau = 120, method = "asymptotic") summary(out) plot(out) ## or, equivalently, out <- RMTL.test(formula = "time ~ match", event = "status", data = ebmt2, hyp_mat = "Dunnett", tau = 120, method = "asymptotic") summary(out) plot(out) # multiple permutation tests # this may take a few minutes out_perm <- RMTL.test(formula = "time ~ match", event = "status", data = ebmt2, hyp_mat = "Dunnett", tau = 120, method = "permutation", Nres = 999) summary(out_perm) plot(out_perm)
library(mstate) data("ebmt2") # multiple asymptotic tests out <- RMTL.test(time = ebmt2$time, status = ebmt2$status, group = ebmt2$match, hyp_mat = "Dunnett", tau = 120, method = "asymptotic") summary(out) plot(out) ## or, equivalently, out <- RMTL.test(formula = "time ~ match", event = "status", data = ebmt2, hyp_mat = "Dunnett", tau = 120, method = "asymptotic") summary(out) plot(out) # multiple permutation tests # this may take a few minutes out_perm <- RMTL.test(formula = "time ~ match", event = "status", data = ebmt2, hyp_mat = "Dunnett", tau = 120, method = "permutation", Nres = 999) summary(out_perm) plot(out_perm)