rmst2adapt: Flexible and Coherent Test/Estimation Procedure Based on...

Description Usage Arguments Value Author(s) References Examples

View source: R/rmst2adapt-ver001.R

Description

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

Usage

1
2
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 time-to-event variable, the 2nd column is 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 of the largest observed time on each of the two groups.

method

A name of the resampling method. It supports "perturbation" (default) and "permutation".

nmethod

A number of iterations for the resampling. Recommended to specify at least 100000 (default) or larger.

seed

An integer value, used for the 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 treatment group is superior to control group with respect to survival. Specify "2_side" for the two-sided test where the alternative hypothesis is that treatment group is not equal to control group with respect to survival. Default is "2_side".

conf.int

Specify confidence coefficient for confidence bands of 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 tau's used in the analyses

observed_z

The observed test statistic Z_star

p_value

The p-value of testing for equality

conf_band

The difference in RMST between two groups at the specified tau's

selected_tau

The value of tau selected to summarize the treatment effect

Author(s)

Miki Horiguchi, Hajime Uno

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.

Examples

1
2
3
4
5
6
7
8
#--- 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")
print(a)

Example output

<Test result> 
Candidate tau's: 6 8 10 12 

P-value: 0.81 


<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.367           0.568 

survRM2adapt documentation built on May 1, 2019, 9:13 p.m.