Title: | Multiple RMST-Based Tests in General Factorial Designs |
---|---|
Description: | We implemented multiple tests based on the restricted mean survival time (RMST) for general factorial designs as described in Munko et al. (2024) <doi:10.1002/sim.10017>. Therefore, an asymptotic test, a groupwise bootstrap test, and a permutation test are incorporated with a Wald-type test statistic. The asymptotic and groupwise bootstrap test take the asymptotic exact dependence structure of the test statistics into account to gain more power. Furthermore, confidence intervals for RMST 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], Marc Kindop [aut], Merle Munko [aut, cre] |
Maintainer: | Merle Munko <[email protected]> |
License: | GPL (>= 3) |
Version: | 0.1.1 |
Built: | 2025-02-25 05:16:28 UTC |
Source: | https://github.com/cran/GFDrmst |
This function provides a shiny app for performing multiple RMST-based tests. Here, the asymptotic, groupwise bootstrap or permutation test can be applied.
GFDrmstGUI()
GFDrmstGUI()
Note that the calculations for the groupwise bootstrap and the permutation test may take a while, especially with stepwise extension.
No return value, called for side effects.
GFDrmst
object
Simultaneous confidence intervals for the linear combinations of restricted mean survival times are plotted.
## S3 method for class 'GFDrmst' plot(x, ...)
## S3 method for class 'GFDrmst' plot(x, ...)
x |
An object of class |
... |
Further arguments are ignored. |
The displayed vectors on the y-axis are the coefficients for the linear combinations of the RMSTs.
No return value, called for side effects.
data(colonCS, package = "condSURV") out <- RMST.test(formula = "Stime ~ rx", event = "event", data = colonCS, hyp_mat = "Tukey", tau = 3000, method = "asymptotic") plot(out)
data(colonCS, package = "condSURV") out <- RMST.test(formula = "Stime ~ rx", event = "event", data = colonCS, hyp_mat = "Tukey", tau = 3000, method = "asymptotic") plot(out)
Linear hypotheses of the restricted mean survival times (RMSTs) of k different groups 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"
), (2) a groupwise bootstrap procedure (method = "groupwise"
) or (3) a permutation approach (method = "permutation"
), respectively. Hence, adjusted p-values can be obtained.
RMST.test( time = NULL, status = NULL, group = NULL, formula = NULL, event = NULL, data = NULL, hyp_mat, hyp_vec = NULL, tau, method = c("groupwise", "permutation", "asymptotic"), stepwise = FALSE, alpha = 0.05, Nres = 4999, seed = 1 )
RMST.test( time = NULL, status = NULL, group = NULL, formula = NULL, event = NULL, data = NULL, hyp_mat, hyp_vec = NULL, tau, method = c("groupwise", "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 = uncensored. 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 ( |
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 survival time (RMST) of group is defined as
for all , where
denotes the survival function of group
.
Let
be the vector of the RMSTs 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, all matrices specified in
hyp_mat
need to be contrast matrices.
The following options are already implemented for hyp_mat
. "Tukey", "Dunnett"
or "center"
lead to Tukey's or Dunnett's contrasts or the centering matrix, respectively.
If formula
is specified, the option "crossed factorial"
is also available to test simultaneously on main/interaction effects of a crossed factorial design; cf. Example 1 in Munko et al. (2024) for the crossed two-way design.
If stepwise = TRUE
, the closed testing procedure is applied. In this case, no confidence intervals can be computed for the linear combinations but it may be that more tests can reject.
Note that the calculations for the groupwise bootstrap and the permutation test may take a while, especially with stepwise extension.
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 RMSTs, 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., Ditzhaus, M., Dobler, D., Genuneit, J. (2024). RMST-based multiple contrast tests in general factorial designs. Statistics in Medicine, 1-18. doi:10.1002/sim.10017
data(colonCS, package = "condSURV") # multiple asymptotic tests out <- RMST.test(formula = "Stime ~ rx", event = "event", data = colonCS, hyp_mat = "Tukey", tau = 3000, method = "asymptotic") summary(out) plot(out) ## or, equivalently, out <- RMST.test(time = colonCS$Stime, status = colonCS$event, group = colonCS$rx, hyp_mat = "Tukey", tau = 3000, method = "asymptotic") summary(out) plot(out) ## an example for a crossed two-way design out_tw <- RMST.test(formula = "Stime ~ rx * sex", event = "event", data = colonCS, hyp_mat = "Tukey", tau = 3000, method = "asymptotic") summary(out_tw) plot(out_tw) # multiple groupwise bootstrap tests # this may take a few seconds out_gw <- RMST.test(formula = "Stime ~ rx", event = "event", data = colonCS, hyp_mat = "Tukey", tau = 3000, method = "groupwise") summary(out_gw) plot(out_gw) # multiple permutation tests # this may take a few seconds out_perm <- RMST.test(formula = "Stime ~ rx", event = "event", data = colonCS, hyp_mat = "Tukey", tau = 3000, method = "permutation") summary(out_perm) plot(out_perm)
data(colonCS, package = "condSURV") # multiple asymptotic tests out <- RMST.test(formula = "Stime ~ rx", event = "event", data = colonCS, hyp_mat = "Tukey", tau = 3000, method = "asymptotic") summary(out) plot(out) ## or, equivalently, out <- RMST.test(time = colonCS$Stime, status = colonCS$event, group = colonCS$rx, hyp_mat = "Tukey", tau = 3000, method = "asymptotic") summary(out) plot(out) ## an example for a crossed two-way design out_tw <- RMST.test(formula = "Stime ~ rx * sex", event = "event", data = colonCS, hyp_mat = "Tukey", tau = 3000, method = "asymptotic") summary(out_tw) plot(out_tw) # multiple groupwise bootstrap tests # this may take a few seconds out_gw <- RMST.test(formula = "Stime ~ rx", event = "event", data = colonCS, hyp_mat = "Tukey", tau = 3000, method = "groupwise") summary(out_gw) plot(out_gw) # multiple permutation tests # this may take a few seconds out_perm <- RMST.test(formula = "Stime ~ rx", event = "event", data = colonCS, hyp_mat = "Tukey", tau = 3000, method = "permutation") summary(out_perm) plot(out_perm)
summary
method for class "GFDrmst"
.
## S3 method for class 'GFDrmst' summary(object, digits = 8,...)
## S3 method for class 'GFDrmst' summary(object, digits = 8,...)
object |
An object of class |
digits |
An integer indicating the number of decimal places to be used. Default option is |
... |
Further arguments are ignored. |
The function prints the information about the used method, significance level, hypothesis matrices, Wald-type test statistics, adjusted p-values and the overall results of the tests.
No return value, called for side effects.
data(colonCS, package = "condSURV") out <- RMST.test(formula = "Stime ~ rx", event = "event", data = colonCS, hyp_mat = "Tukey", tau = 3000, method = "asymptotic") summary(out, digits = 3)
data(colonCS, package = "condSURV") out <- RMST.test(formula = "Stime ~ rx", event = "event", data = colonCS, hyp_mat = "Tukey", tau = 3000, method = "asymptotic") summary(out, digits = 3)