Skip to contents

This function performs the procedure proposed by Horiguchi et al. (2018) <doi:10.1002/sim.7661>. The method specifies a set of truncation time points, taus, for calculating restricted mean survival times (RMST), performs testing for equality of the RMSTs between the two groups, and estimates the difference in RMST between the two groups at the specified tau's. The multiplicity as a result of specifying several taus is taken into account in this procedure.

Usage

rmst2adapt(indata, tau_star, method="perturbation", nmethod=100000,
        seed=NULL, test="2_side", conf.int=0.95)

Arguments

indata

A data matrix (data frame). The 1st column is the time-to-event variable, the 2nd column is the event indicator (1=event, 0=censor), and the 3rd column is the treatment indicator (1=treatment, 0=control). No missing values are allowed in this data matrix.

tau_star

A vector indicating a set of tau's. All elements in tau_star need to be shorter than or equal to the minimum time point of the largest observed time in each of the two groups.

method

A type of the resampling method. It supports "perturbation" (default).

nmethod

A number of iterations for resampling. It is recommended to specify at least 100000 (default) or larger.

seed

An integer value used for random number generation in the resampling procedures. Default is NULL.

test

Specify "1_side" for the one-sided test where the alternative hypothesis is that the treatment group is superior to the control group with respect to survival time. Specify "2_side" for the two-sided test where the alternative hypothesis is that the treatment group is not equal to the control group with respect to survival time. Default is "2_side".

conf.int

Specify a confidence coefficient for calculating confidence bands for the differences in RMST. Default is 0.95.

Value

an object of class rmst2adapt.

method

The resampling method used in the analyses

nmethod

The number of iterations for the resampling

test

The type of test used in the analyses

candidate_taus

The set of taus used in the analyses

observed_z

The observed test statistic Z_star

p_value

The p-value of testing for equality of the RMSTs between the two groups

conf_band

The difference in RMST between the two groups at the specified taus

selected_tau

The value of tau selected to summarize the treatment effect

References

Horiguchi M, Cronin A, Takeuchi M, Uno H. A flexible and coherent test/estimation procedure based on restricted mean survival times for censored time-to-event data in randomized clinical trials. Statistics in Medicine 2018. doi:10.1002/sim.7661.

Author

Miki Horiguchi, Hajime Uno

Examples

#--- sample data ---#
data    = rmst2adapt.sample.data()
nmethod = 100 #This is only for example use.
              #Recommended to specify at least 100000 (default) or larger.

a = rmst2adapt(indata=data, tau_star=seq(6,12,2), method="perturbation",
               nmethod=nmethod, test="2_side", seed=123)
print(a)
#> 
#> <Test result> 
#> Candidate values of tau1: 6 8 10 12 
#> 
#> P-value: 0.85 
#> 
#> 
#> <Treatment effect estimation> 
#> Selected tau: 6 
#> 
#> RMST(arm1) RMST(arm0) 
#>      4.985      4.885 
#> 
#> RMST(arm1-arm0)      lower 0.95      upper 0.95 
#>           0.100          -0.360           0.561 
#> 
#>