Package 'survRM2adapt'

Title: Flexible and Coherent Test/Estimation Procedure Based on Restricted Mean Survival Times
Description: Estimates the restricted mean survival time (RMST) with the time window [0, tau], where tau is adaptively selected from the procedure, proposed by Horiguchi et al. (2018) <doi:10.1002/sim.7661>. It also estimates the RMST with the time window [tau1, tau2], where tau1 is adaptively selected from the procedure, proposed by Horiguchi et al. (2023) <doi:10.1002/sim.9662>.
Authors: Miki Horiguchi [aut, cre] , Lu Tian [aut] , Hajime Uno [aut]
Maintainer: Miki Horiguchi <[email protected]>
License: GPL-2
Version: 1.1.0
Built: 2025-02-15 02:38:24 UTC
Source: https://github.com/cran/survRM2adapt

Help Index


Flexible and Coherent Test/Estimation Procedure Based on Restricted Mean Survival Times

Description

Estimates the restricted mean survival time (RMST) with a time window [0, tau], where tau is selected during the procedure from among the time points provided by the user. It also estimates the RMST with a time window [tau1, tau2], where tau1 is selected during the procedure, same as above.

Author(s)

Miki Horiguchi, Lu Tian, Hajime Uno

Maintainer: Miki Horiguchi <[email protected]>

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.

Horiguchi M, Tian L, Uno H. On assessing survival benefit of immunotherapy using long-term restricted mean survival time. Statistics in Medicine 2023. DOI:10.1002/sim.9662.

See Also

survival survRM2

Examples

#--- Adaptive RMST test/estimation method by rmst2adapt() ---#
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", seed=123)
print(a)

#--- Adaptive long-term RMST test/estimation method by ltrmst2adapt() ---#
data    = cm214_pfs
b       = ltrmst2adapt(indata=data, tau1=c(0,1,2,3), tau2=10, 
               test="2_side", seed=123)
print(b)

Sample Reconstructed Data of CheckMate214 Study

Description

The progression-free survival data reconstructed from the publication of the CheckMate214 study.

Usage

data(cm214_pfs)

Format

A dataset containing 3 columns:

time

the time-to-event variable (the time unit is month)

status

the event indicator (1=event, 0=censor)

arm

the treatment indicator (1=treatment, 0=control)

Details

This is a reconstructed patient-level data from the results reported by Motzer et al.(2018) <doi:10.1056/NEJMoa1712126>. The data consists of 847 patients with previously untreated clear-cell advanced renal-cell carcinoma; 425 for the nivolumab plus ipilimumab group (treatment) and 422 for the sunitinib group (control).

Source

Motzer RJ, Tannir NM, McDermott DF, et al. Nivolumab plus ipilimumab versus sunitinib in advanced renal-cell carcinoma. New England Journal of Medicine. 2018;378(14):1277-1290. <doi:10.1056/NEJMoa1712126> Guyot P, Ades AE, Ouwens MJ, Welton NJ. Enhanced secondary analysis of survival data: reconstructing the data from published Kaplan-Meier survival curves. BMC Med Res Methodol. 2012;12(1):9. <doi:10.1186/1471-2288-12-9>


Long-Term Restricted Mean Survival Times with Adaptively Selected Lower End of Time Window

Description

This function performs the method proposed by Horiguchi, Tian, and Uno. (2023) <doi:10.1002/sim.9662>. Specifically, it estimates the restricted mean survival time (RMST) within a prespecified time window (from tau1 to tau2) to quantify the long-term treatment benefit. Instead of choosing one specific time point as the lower end of the time window (tau1), the procedure allows users to prespecify a set of time points. The procedure picks one time point among the set of tau1 values that gives the most significant difference in the long-term RMST between the two groups. It then performs testing for equality of the long-term RMSTs between the two groups and estimates the difference in RMST within the adaptively selected time window [tau1, tau2] between the two groups. Multiplicity as a result of specifying several values for tau1 is taken into account in this procedure.

Usage

ltrmst2adapt(indata, tau1, tau2, iteration=50000, seed=NULL, test="2_side", conf.int=0.95)

Arguments

indata

A data matrix (data frame). The 1st column is the time-to-event variable, the 2nd column is the 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.

tau1

An integer value or a vector indicating a set of tau1 values for the lower end of the time window.

tau2

An integer value indicating the upper end of the time window. When tau2 = NULL, the default value is used. See Details for the definition of the default value for tau2.

iteration

A number of iterations for the resampling (the multivariate normal distribution-based perturbation method). It is recommended to specify at least 50000 (default) or larger.

seed

An integer value used for random number generation in the resampling procedure. Default is NULL.

test

Specify "1_side" for the one-sided test where the alternative hypothesis is that the treatment group is superior to the control group with respect to survival time. Specify "2_side" for the two-sided test where the alternative hypothesis is that the treatment group is not equal to the control group with respect to survival time. Default is "2_side".

conf.int

Specify a confidence coefficient for calculating confidence bands for the differences in long-term RMST. Default is 0.95.

Details

The definition of the default value for tau2. 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, tau2 = 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, tau2 = 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, tau2 = 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, tau2 = min(x1, x0) = x1. Case 4: If the last observations in Group 1 and Group 0 are "censor," then tau = min(x1, x0).

Value

an object of class ltrmst2adapt.

iteration

The number of iterations for resampling from a multivariate normal distribution with a mean 0 and a variance-covariance matrix.

test

The type of test used in the analyses

arm1

The RMST [tau1, tau2] estimation for arm1

arm0

The RMST [tau1, tau2] estimation for arm0

diff10

The difference in RMST [tau1, tau2] between the two groups (arm1 minus arm0)

diff10_selected

The difference in RMST within the selected time window [tau1, tau2] between the two groups (arm1 minus arm0) with the normal confidence interval considering the randomness of selecting one time window. The p-value for the RMST difference test within the selected time window [tau1, tau2] is also provided.

Author(s)

Miki Horiguchi, Lu Tian, Hajime Uno

References

Horiguchi M, Tian L, Uno H. On assessing survival benefit of immunotherapy using long-term restricted mean survival time. Statistics in Medicine 2023. DOI:10.1002/sim.9662.

Examples

#--- sample data ---#
data = cm214_pfs
b    = ltrmst2adapt(indata=data, tau1=c(0,1,2,3), tau2=10, 
               test="2_side", seed=123)
print(b)

print.ltrmst2adapt

Description

S3 method for class 'ltrmst2adapt'

Usage

## S3 method for class 'ltrmst2adapt'
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 'ltrmst2adapt'


print.rmst2adapt

Description

S3 method for class 'rmst2adapt'

Usage

## S3 method for class 'rmst2adapt'
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 'rmst2adapt'


Restricted Mean Survival Times with Adaptively Selected Truncation Time Point

Description

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

Usage

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

method

A type of the resampling method. It supports "perturbation" (default).

nmethod

A number of iterations for resampling. It is recommended to specify at least 100000 (default) or larger.

seed

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

conf.int

Specify a confidence coefficient for calculating confidence bands for 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 taus used in the analyses

observed_z

The observed test statistic Z_star

p_value

The p-value of testing for equality of the RMSTs between the two groups

conf_band

The difference in RMST between the two groups at the specified taus

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

#--- 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", seed=123)
print(a)

Generate a sample data from the pbc data

Description

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

Usage

rmst2adapt.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 rmst2adapt() 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=rmst2adapt.sample.data()
head(D)