Performs twosample comparisons using the restricted mean survival time (RMST) as a summary measure of the survival time distribution. Three kinds of betweengroup contrast metrics (i.e., the difference in RMST, the ratio of RMST and the ratio of the restricted mean time lost (RMTL)) are computed. It performs ANCOVAtype adjusted analyses when covariates are passed to it as an argument.
1 
time 
The followup time for right censored data. 
status 
The status indicator, 1=event, and 0=right censored. 
arm 
The group indicator for comparison. The elements of this vector take either 1 or 0. Normally, 0=control group, 1=active treatment group. 
tau 
A scaler value to specify the truncation time point for the RMST calculation.

covariates 
This specifies covariates to be used for the adjusted analyses. When NULL, unadjusted analyses are performed. When non NULL, the ANOCVAtype adjusted analyses are performed using those variables passed as 
alpha 
The default is 0.05. (1 
For more details, please see the package vignette.
an object of class rmst2.
tau 
the truncation time used in the analyses 
note 
a note regarding the truncation time 
RMST.arm1 
RMST results in arm 1. This is generated only when 
RMST.arm0 
RMST results in arm 0. This is generated only when 
unadjusted.result 
Results of the unadjusted analyses. This is generated only when 
The values below are generated when some covariates are passed to the function.
adjusted.result 
Results of the adjusted analyses. 
RMST.difference.adjusted 
Results of the parameter estimates with the model to derive an adjusted difference in RMST. 
RMST.ratio.adjusted 
Results of the parameter estimates with the model to derive an adjusted ratio of RMST. 
RMTL.ratio.adjusted 
Results of the parameter estimates with the model to derive an adjusted ratio of RMTL. 
Hajime Uno, Lu Tian, Angel Cronin, Chakib Battioui
Uno H, Claggett B, Tian L, Inoue E, Gallo P, Miyata T, Schrag D, Takeuchi M, Uyama Y, Zhao L, Skali H, Solomon S, Jacobus S, Hughes M, Packer M, Wei LJ. Moving beyond the hazard ratio in quantifying the betweengroup difference in survival analysis. Journal of clinical Oncology 2014, 32, 23802385.
Tian L, Zhao L, Wei LJ. Predicting the restricted mean event time with the subject's baseline covariates in survival analysis. Biostatistics 2014, 15, 222233.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16  # sample data #
D=rmst2.sample.data()
time=D$time
status=D$status
arm=D$arm
tau=NULL
x=D[,c(4,6,7)]
# without covariates 
a=rmst2(time, status, arm, tau=10)
print(a)
plot(a, xlab="Years", ylab="Probability", density=60)
# with covariates 
a=rmst2(time, status, arm, tau=10, covariates=x)
print(a)

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.