Type: | Package |
Title: | Multiple RMTL-Based Tests for Competing Risks Data in General Factorial Designs |
Version: | 0.1.0 |
Maintainer: | Merle Munko <merle.munko@ovgu.de> |
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. |
License: | GPL (≥ 3) |
Encoding: | UTF-8 |
Suggests: | mstate |
Imports: | GFDmcv, GFDrmst, lpSolve, shinyWidgets, shinyMatrix, shiny (≥ 1.5.0), tippy (≥ 0.1.0), mvtnorm, MASS (≥ 7.3-53), plyr (≥ 1.8.6), shinyjs (≥ 2.0.0), shinythemes (≥ 1.1.2) |
NeedsCompilation: | no |
Packaged: | 2024-10-02 08:39:01 UTC; munko |
Author: | Marc Ditzhaus [aut], Dennis Dobler [aut], Merle Munko [aut, cre], Jannes Walter [aut] |
Repository: | CRAN |
Date/Publication: | 2024-10-03 18:50:04 UTC |
A Shiny app for multiple RMTL-based tests
Description
This function provides a shiny app for performing multiple RMTL-based tests. Here, the asymptotic or permutation tests can be applied.
Usage
GFDrmtlGUI()
Details
Note that the calculations for the permutation test may take a while, especially with stepwise extension.
Value
No return value, called for side effects.
Function to perform multiple RMTL-based tests
Description
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.
Usage
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
)
Arguments
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 |
Details
The restricted mean time lost (RMTL) of group i
and event m
is defined as
\mu_{im} := \int\limits_0^{\tau} F_{im}(t) \mathrm{d}t
for all i\in\{1,...,k\}, m\in\{1,...,M\}
, where F_{im}
denotes the cumulative incidence function of group i
and event m
.
Let
\boldsymbol{\mu} := (\mu_{11},\mu_{12},...,\mu_{kM})^{\prime}
be the vector of the RMTLs and
\widehat{\boldsymbol{\mu}} := (\widehat{\mu}_{11},\widehat{\mu}_{12},...,\widehat{\mu}_{kM})^{\prime}
be the vector of their estimators.
Let \mathbf{H}_{\ell} \in {\rm I\!R}^{r_{\ell}\times kM}
with \mathrm{rank}(\mathbf{H}_{\ell}) >0
and \mathbf{c}_{\ell} \in {\rm I\!R}^{r_{\ell}}
for all \ell\in\{1,...,L\}
.
We are considering the multiple testing problem with null and alternative hypotheses
\mathcal{H}_{0,\ell}: \mathbf{H}_{\ell} \boldsymbol\mu = \mathbf{c}_{\ell} \quad \mathrm{vs.} \quad \mathcal{H}_{1,\ell}: \mathbf{H}_{\ell} \boldsymbol\mu \neq \mathbf{c}_{\ell}, \qquad \mathrm{for }\: \ell\in\{1,...,L\}.
For the permutation test, the matrices additionally need to fulfill \mathbf{H}_{\ell}(\mathbf{1}_k\otimes \mathbf{e}_m) = \mathbf{0}_{r_{\ell}}
for all m, \ell
, where \mathbf{1}_k\in {\rm I\!R}^{k}, \mathbf{e}_m \in {\rm I\!R}^{M}, \mathbf{0}_{r_{\ell}} \in {\rm I\!R}^{r_{\ell}}
denote the vector of ones, the m
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.
Value
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. |
References
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
Examples
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)