Title: | Comparing Restricted Mean Survival Time |
---|---|
Description: | 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. It performs an ANCOVA-type covariate adjustment as well as unadjusted analyses for those measures. |
Authors: | Hajime Uno, Lu Tian, Miki Horiguchi, Angel Cronin, Chakib Battioui, James Bell |
Maintainer: | Hajime Uno <[email protected]> |
License: | GPL-2 |
Version: | 1.0-4 |
Built: | 2024-12-04 07:14:23 UTC |
Source: | CRAN |
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 package has a function to perform an ANCOVA-type covariate adjustment as well as unadjusted analyses for those measures.
Hajime Uno, Lu Tian, Miki Horiguchi, Angel Cronin, Chakib Battioui, James Bell
Maintainer: Hajime Uno <[email protected]>
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.
survival
#--- 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)
#--- 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)
S3 method for class 'rmst2'
## S3 method for class 'rmst2' plot( x, xlab = "", ylab = "", col = "red", col.RMST = "pink", col.RMTL = "orange", density = 80, angle = 85, ... )
## S3 method for class 'rmst2' plot( x, xlab = "", ylab = "", col = "red", col.RMST = "pink", col.RMTL = "orange", density = 80, angle = 85, ... )
x |
Results of the unadjusted analyses. |
xlab |
x label. |
ylab |
y label. |
col |
Color for line. Default is red. |
col.RMST |
Color for areas of RMST. Default is pink. |
col.RMTL |
Color for areas of RMTL. Default is orange. |
density |
Density of shading lines, in lines per inch. Default is 80. |
angle |
Slope of shading lines, given as an angle in degrees (counter-clockwise). Default is 85. |
... |
Further arguments ignored in this function. |
returns a plot
S3 method for class 'rmst2'
## S3 method for class 'rmst2' print(x, digits = 3, ...)
## S3 method for class 'rmst2' print(x, digits = 3, ...)
x |
Object to be printed. |
digits |
Integer indicating the number of decimal places. |
... |
Further arguments ignored in this function. |
returns summary output for class 'rmst2'
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)
rmst2(time, status, arm, tau = NULL, covariates = NULL, alpha = 0.05)
time |
The follow-up 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.
When |
covariates |
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 |
alpha |
The default is 0.05. (1- |
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).
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, Miki Horiguchi, Angel Cronin, Chakib Battioui, James Bell
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.
#--- 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)
#--- 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)
This is a function to retrieve 312 randomized patients from the pbc data.
rmst2.sample.data(t.unit="year")
rmst2.sample.data(t.unit="year")
t.unit |
Specify the time unit. It supports "year" (default), "month", and "day". |
The function creates a sample dataset to illustrate the usage of the function rmst2()
in this package.
The original pbc data in survival
package consists of 418 patients data.
This function loads the pbc data, select the 312 patients who were randomized.
The status variable is edited, so that 1 indicates death and 0 indicates alive.
returns a data frame
pbc
in survival package
D=rmst2.sample.data() head(D)
D=rmst2.sample.data() head(D)