Performs two-sample comparisons using the restricted mean survival time (RMST) as a summary measure of the survival time distribution. Three kinds of between-group contrast metrics (i.e., the difference in RMST, the ratio of RMST and the ratio of the restricted mean time lost (RMTL)) are computed. The Greenwood plug-in estimator is used for the asymptotic variance. It performs ANCOVA-type adjusted analyses when covariates are passed to it as an argument.
rmst2(time, status, arm, tau = NULL, covariates = NULL, alpha = 0.05)
The follow-up time for right censored data.
The status indicator, 1=event, and 0=right censored.
The group indicator for comparison. The elements of this vector take either 1 or 0. Normally, 0=control group, 1=active treatment group.
A scaler value to specify the truncation time point for the RMST calculation.
When tau = NULL
, the default value is used. See Details for the definition of the default tau.
This specifies covariates to be used for the adjusted analyses. When NULL, unadjusted analyses are performed.
When non NULL, the ANCOVA-type adjusted analyses are performed using those variables passed as covariates
.
This can be one variable (vector) or more than one variables (matrix).
The default is 0.05. (1-alpha
) confidence intervals are reported.
an object of class rmst2.
the truncation time used in the analyses
a note regarding the truncation time
RMST results in arm 1. This is generated only when covariates
is not specified.
RMST results in arm 0. This is generated only when covariates
is not specified.
Results of the unadjusted analyses. This is generated only when covariates
is not specified.
Results of the adjusted analyses.
Results of the parameter estimates with the model to derive an adjusted difference in RMST.
Results of the parameter estimates with the model to derive an adjusted ratio of RMST.
Results of the parameter estimates with the model to derive an adjusted ratio of RMTL.
The definition of the default tau. Let x1 and x0 be the maximum observed time in Group 1 and Group 0, respectively. Case 1: if the last observations in Group 1 and Group 0 are "event," then tau = max(x1, x0). Case 2-1: if the last observation in Group 1 is "event," the last observation in Group 0 is "censor," and x1 <= x0, tau = max(x1, x0) = x0. Case 2-2: if the last observation in Group 0 is "event," the last observation in Group 1 is "censor," and x1 > x0, tau = max(x1, x0) = x1. Case 3-1: if the last observation in Group 1 is "event," the last observation in Group 0 is "censor," and x1 > x0, tau = min(x1, x0) = x0. Case 3-2: if the last observation in Group 0 is "event," the last observation in Group 1 is "censor," and x1 <= x0, tau = min(x1, x0) = x1. Case 4: the last observations in Group 1 and Group 0 are "censor," then tau = min(x1, x0).
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, HughesM, Packer M, Wei LJ. Moving beyond the hazard ratio in quantifying the between-group difference in survival analysis. Journal of clinical Oncology 2014, 32, 2380-2385. doi:10.1200/JCO.2014.55.2208.
Tian L, Zhao L, Wei LJ. Predicting the restricted mean event time with the subject's baseline covariates in survival analysis. Biostatistics 2014, 15, 222-233. doi:10.1093/biostatistics/kxt050.
# NOT RUN {
#--- 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)
# }
Run the code above in your browser using DataLab