Learn R Programming

SurrogateOutcome (version 1.1)

delta.q.event.RMST: Calculates the residual treatment effect (the difference in restricted mean survival time at time t) after accounting for the treatment effect on the surrogate outcome information up to the landmark time

Description

Calculates the residual treatment effect (the difference in restricted mean survival time at time t) after accounting for the treatment effect on the surrogate outcome information up to the landmark time; uses nonparametric estimation.

Usage

delta.q.event.RMST(xone, xzero, deltaone, deltazero, sone, szero, t, weight = NULL,
 landmark = landmark, deltaslist = TRUE, transform = FALSE, extrapolate=TRUE, 
 number, warn.extrapolate=TRUE)

Arguments

xone

numeric vector, observed event times for the primary outcome in the treatment group.

xzero

numeric vector, observed event times for the primary outcome in the control group.

deltaone

numeric vector, event/censoring indicators for the primary outcome in the treatment group.

deltazero

numeric vector, event/censoring indicators for the primary outcome in the control group.

sone

numeric vector, observed event times for the surrogate outcome in the treatment group.

szero

numeric vector, observed event times for the surrogate outcome in the control group.

t

time of interest for treatment effect.

weight

optional weight.

landmark

landmark time of interest, \(t_0\).

deltaslist

TRUE or FALSE; if TRUE, each component of the residual treatment effect is returned along with the residual treatment effect itself, if FALSE, only the residual treatment effect is returned.

transform

TRUE or FALSE; indicates whether a transformation should be used, default is FALSE.

extrapolate

TRUE or FALSE; indicates whether local constant extrapolation should be used, default is TRUE.

number

number of points for RMST calculation, default is 40.

warn.extrapolate

TRUE or FALSE; indicates whether user prefers a warning message when extrapolation is used, default is TRUE.

Value

A list is returned:

delta.q

the estimated residual treatment effect

first.term

the first term of the residual treatment effect, if deltaslist = TRUE

second.term

the second term of the residual treatment effect, if deltaslist = TRUE

third.term

the third term of the residual treatment effect, if deltaslist = TRUE

Details

See documentation for R.q.event for details.

References

Parast L, Tian L, and Cai T (2020). Assessing the Value of a Censored Surrogate Outcome. Lifetime Data Analysis, 26(2):245-265.

Examples

Run this code
# NOT RUN {
data(ExampleData)
names(ExampleData)
# }
# NOT RUN {
delta.q.event.RMST(xone = ExampleData$x1, xzero = ExampleData$x0, deltaone = ExampleData$delta1, 
deltazero = ExampleData$delta0, sone = ExampleData$s1, szero = ExampleData$s0, t = 5, landmark=2, 
number = 40)
delta.q.event.RMST(xone = ExampleData$x1, xzero = ExampleData$x0, deltaone = ExampleData$delta1, 
deltazero = ExampleData$delta0, sone = ExampleData$s1, szero = ExampleData$s0, t = 4, landmark=2, 
number = 40)
# }

Run the code above in your browser using DataLab