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 G
be the binary treatment indicator with G=1
for treatment and G=0
for control and we assume throughout that subjects are randomly assigned to a treatment group at baseline. Let T
denote the time of the primary outcome of interest, death for example. We use potential outcomes notation such that T^{(g)}
denotes the time of the primary outcome under treatment G = g
. We define the treatment effect, \Delta(t)
, as the difference in survival rates by time t
under treatment versus control,
\Delta(t)=E\{ I(T^{(1)}>t)\} - E\{I(T^{(0)}>t)\} = P(T^{(1)}>t) - P(T^{(0)}>t)
where t>t_0
Due to censoring, our data consist of n_1
observations \{(X_{1i}, \delta_{1i}), i=1,...,n_1\}
from the treatment group G=1
and n_0
observations \{(X_{0i}, \delta_{0i}), i=1,...,n_0\}
from the control group G=0
where X_{gi} = \min(T_{gi}, C_{ gi})
, \delta_{gi} = I(T_{gi} < C_{gi})
, and C_{gi}
denotes the censoring time for g= 1,0
, for individual i
. Throughout, we estimate the treatment effect \Delta(t)
as
\hat{\Delta}(t) = n_1^{-1} \sum_{i=1}^{n_1} \frac{I(X_{1i}>t)}{\hat{W}^C_1(t)} - n_0^{-1} \sum_{i=1}^{n_0} \frac{I(X_{0i}>t)}{\hat{W}^C_0(t)}
where \hat{W}^C_g(\cdot)
is the Kaplan-Meier estimator of survival for censoring for g=1,0.
Variance estimation and confidence interval construction are performed using perturbation-resampling. Specifically, let \left \{ V^{(b)} = (V_{11}^{(b)}, ...V_{1n_1}^{(b)}, V_{01}^{(b)}, ...V_{0n_0}^{(b)})^T, b=1,....,D \right \}
be n \times D
independent copies of a positive random variables V
from a known distribution with unit mean and unit variance. Let
\hat{\Delta}^{(b)} (t) = \frac{ \sum_{i=1}^{n_1} V_{1i}^{(b)} I(X_{1i}>t)}{ \sum_{i=1}^{n_1} V_{1i}^{(b)} \hat{W}_1^{C(b)}(t)} -\frac{ \sum_{i=1}^{n_0} V_{0i}^{(b)} I(X_{0i}>t)}{ \sum_{i=1}^{n_0} V_{0i}^{(b)} \hat{W}_0^{C(b)}(t)}.
In this package, we use weights generated from an Exponential(1) distribution and use D=500
. The variance of \hat{\Delta}(t)
is obtained as the empirical variance of \{\hat{\Delta}(t)^{(b)}, b = 1,...,D\}.
We construct two versions of the 95\%
confidence interval for \hat{\Delta}(t)
: one based on a normal approximation confidence interval using the estimated variance and another taking the 2.5th and 97.5th empirical percentiles of \hat{\Delta}(t)^{(b)}
.
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)