delta.surv.estimate {Rsurrogate} | R Documentation |
Calculates treatment effect in a survival setting
Description
This function calculates the treatment effect in the survival setting i.e. the difference in survival at time t between the treatment group and the control group. The user can also request a variance estimate, estimated using perturbating-resampling, and a 95% confidence interval. If a confidence interval is requested two versions are provided: a normal approximation based interval and a quantile based interval, both use perturbation-resampling.
Usage
delta.surv.estimate(xone, xzero, deltaone, deltazero, t, var = FALSE, conf.int
= FALSE, weight = NULL, weight.perturb = NULL, approx = T)
Arguments
xone |
numeric vector, the observed event times in the treatment group, X = min(T,C) where T is the time of the primary outcome and C is the censoring time. |
xzero |
numeric vector, the observed event times in the control group, X = min(T,C) where T is the time of the primary outcome and C is the censoring time. |
deltaone |
numeric vector, the event indicators for the treatment group, D = I(T<C) where T is the time of the primary outcome and C is the censoring time. |
deltazero |
numeric vector, the event indicators for the control group, D = I(T<C) where T is the time of the primary outcome and C is the censoring time. |
t |
the time of interest. |
var |
TRUE or FALSE; indicates whether a variance estimate for delta is requested, default is FALSE. |
conf.int |
TRUE or FALSE; indicates whether a 95% confidence interval for delta is requested, default is FALSE. |
weight |
a |
weight.perturb |
a |
approx |
TRUE or FALSE indicating whether an approximation should be used when calculating the probability of censoring; most relevant in settings where the survival time of interest for the primary outcome is greater than the last observed event but before the last censored case, default is TRUE. |
Details
Let be the binary treatment indicator with
for treatment and
for control and we assume throughout that subjects are randomly assigned to a treatment group at baseline. Let
denote the time of the primary outcome of interest, death for example. We use potential outcomes notation such that
denotes the time of the primary outcome under treatment
. We define the treatment effect,
, as the difference in survival rates by time
under treatment versus control,
where
Due to censoring, our data consist of observations
from the treatment group
and
observations
from the control group
where
,
, and
denotes the censoring time for
, for individual
. Throughout, we estimate the treatment effect
as
where is the Kaplan-Meier estimator of survival for censoring for
Variance estimation and confidence interval construction are performed using perturbation-resampling. Specifically, let be
independent copies of a positive random variables
from a known distribution with unit mean and unit variance. Let
In this package, we use weights generated from an Exponential(1) distribution and use . The variance of
is obtained as the empirical variance of
We construct two versions of the
confidence interval for
: one based on a normal approximation confidence interval using the estimated variance and another taking the 2.5th and 97.5th empirical percentiles of
.
Value
A list is returned:
delta |
the estimate, |
var |
the variance estimate of |
conf.int.normal |
a vector of size 2; the 95% confidence interval for |
conf.int.quantile |
a vector of size 2; the 95% confidence interval for |
Author(s)
Layla Parast
Examples
data(d_example_surv)
names(d_example_surv)
delta.surv.estimate(xone = d_example_surv$x1, xzero = d_example_surv$x0,
deltaone = d_example_surv$delta1, deltazero = d_example_surv$delta0, t = 3)