Package 'survRM2'

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

Help Index


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. The package has a function to perform an ANCOVA-type covariate adjustment as well as unadjusted analyses for those measures.

Author(s)

Hajime Uno, Lu Tian, Miki Horiguchi, Angel Cronin, Chakib Battioui, James Bell

Maintainer: Hajime Uno <[email protected]>

References

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.

See Also

survival

Examples

#--- 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)

plot.rmst2

Description

S3 method for class 'rmst2'

Usage

## S3 method for class 'rmst2'
plot(
  x,
  xlab = "",
  ylab = "",
  col = "red",
  col.RMST = "pink",
  col.RMTL = "orange",
  density = 80,
  angle = 85,
  ...
)

Arguments

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.

Value

returns a plot


print.rmst2

Description

S3 method for class 'rmst2'

Usage

## S3 method for class 'rmst2'
print(x, digits = 3, ...)

Arguments

x

Object to be printed.

digits

Integer indicating the number of decimal places.

...

Further arguments ignored in this function.

Value

returns summary output for class 'rmst2'


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

Usage

rmst2(time, status, arm, tau = NULL, covariates = NULL, alpha = 0.05)

Arguments

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 tau = NULL, the default value is used. See Details for the definition of the default tau.

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 covariates. This can be one variable (vector) or more than one variables (matrix).

alpha

The default is 0.05. (1-alpha) confidence intervals are reported.

Details

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).

Value

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 covariates is not specified.

RMST.arm0

RMST results in arm 0. This is generated only when covariates is not specified.

unadjusted.result

Results of the unadjusted analyses. This is generated only when covariates is not specified.

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.

Author(s)

Hajime Uno, Lu Tian, Miki Horiguchi, Angel Cronin, Chakib Battioui, James Bell

References

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.

Examples

#--- 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)

Generate a sample data from the pbc data

Description

This is a function to retrieve 312 randomized patients from the pbc data.

Usage

rmst2.sample.data(t.unit="year")

Arguments

t.unit

Specify the time unit. It supports "year" (default), "month", and "day".

Details

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.

Value

returns a data frame

See Also

pbc in survival package

Examples

D=rmst2.sample.data()
head(D)