Learn R Programming

SurrogateOutcome (version 1.2)

R.opt.event: Calculates the proportion of the treatment effect (the difference in survival at time t) explained by surrogate outcome information observed up to the landmark time, using the optimal transformation of the surrogate

Description

Calculates the proportion of the treatment effect (the difference in survival at time t) explained by surrogate outcome information observed up to the landmark time, using the optimal transformation of the surrogate; also provides standard error estimate and confidence interval. Details are provided in: Wang X, Cai T, Tian L, Parast L (2025). Model-free Approach to Evaluate a Censored Intermediate Outcome as a Surrogate for Overall Survival. Statistics in Medicine, 44(20-22): e70268.

Usage

R.opt.event(xone, xzero, deltaone, deltazero, sone, szero, t, landmark, std = FALSE, 
conf.int = FALSE, gopt = FALSE, ind = FALSE)

Value

A list is returned:

R.opt

the estimate of the PTE of the surrogate outcome

R.opt.ind

the estimate of the PTE for primary outcome information only up to the landmark time; if ind=TRUE

g1.opt

the estimate of the optimal transformation g1(s); if gopt=TRUE

g2.opt

the estimate of the optimal transformation g2; if gopt=TRUE

R.opt.std

the standard error estimate of the PTE of the surrogate outcome; if std=TRUE

conf.int.R

the confidence interval for the PTE of the surrogate outcome; if cont.int=TRUE

g1.opt.sd

the standard error estimate of the optimal transformation g1(s); if gopt=TRUE and std=TRUE

g2.opt.sd

the standard error estimate of the optimal transformation g2; if gopt=TRUE and std=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.

landmark

landmark time of interest, \(t_0\).

std

TRUE or FALSE; indicates whether standard error estimates should be provided, default is FALSE. Estimates are calculated using perturbation-resampling.

conf.int

TRUE or FALSE; indicates whether a 95% confidence interval for the PTE should be provided. Confidence intervals are calculated using the percentiles of perturbed estimates, default is FALSE.

gopt

TRUE or FALSE; indicates whether the estimates of the optimal g1(s) and g2 should be provided, default is FALSE.

ind

TRUE or FALSE; indicates whether the estimate of PTE for primary outcome information only up to the landmark time should be provided, default is FALSE.

Author

Xuan Wang

References

Wang X, Cai T, Tian L, Parast L (2025). Model-free Approach to Evaluate a Censored Intermediate Outcome as a Surrogate for Overall Survival. arXiv preprint arXiv:2412.14129.

Examples

Run this code
data(ExampleData)
names(ExampleData)
# \donttest{
R.opt.event(xone = ExampleData$x1, xzero = ExampleData$x0, deltaone = ExampleData$delta1, 
deltazero = ExampleData$delta0, sone = ExampleData$s1, szero = ExampleData$s0, t = 5, 
landmark=2)

#with all options as TRUE
R.opt.event(xone = ExampleData$x1, xzero = ExampleData$x0, deltaone = ExampleData$delta1, 
deltazero = ExampleData$delta0, sone = ExampleData$s1, szero = ExampleData$s0, t = 5, 
landmark=2, std = TRUE, conf.int = TRUE, gopt = TRUE, ind = TRUE)
# }

Run the code above in your browser using DataLab