View source: R/Functions_Rsurrogate.R
R.t.surv.estimate | R Documentation |
This function calculates the proportion of treatment effect on the primary outcome explained by the treatment effect on the primary outcome up to t_0. The user can also request a variance estimate, estimated using perturbating-resampling, and a 95% confidence interval. If a confidence interval is requested three versions are provided: a normal approximation based interval, a quantile based interval and Fieller's confidence interval, all using perturbation-resampling.
R.t.surv.estimate(xone, xzero, deltaone, deltazero, t, weight.perturb = NULL, landmark, var = FALSE, conf.int = FALSE, approx = T)
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. |
weight.perturb |
weights used for perturbation resampling. |
landmark |
the landmark time t_0 or time of surrogate marker measurement. |
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. |
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. |
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. The proportion of treatment effect explained by T observed up to t_0 only is R_T(t,t_0) = 1-Δ_T(t,t_0)/Δ(t) where
Δ_T(t, t_0) = P(T^{(0)}>t_0)P(T^{(1)}>t\mid T^{(1)}>t_0)-P(T^{(0)}>t).
To estimate R_T(t,t_0), we use the estimator \hat{R}_T(t,t_0) = 1-\hat{Δ}_T(t,t_0)/\hat{Δ}(t) where \hat{Δ}_T(t,t_0) = \hat{φ}_0(t_0)\hat{φ}_1(t)/\hat{φ}_1(t_0) - \hat{φ}_0(t) and \hat{φ}_g(u) = n_g^{-1} ∑_{i=1}^{n_g} \frac{I(X_{gi}>u)}{\hat{W}^C_g(u)} for g=1,0 where \widehat{W}^C_g(\cdot) is the Kaplan-Meier estimator of survival for censoring for g=1,0.
A list is returned:
delta |
the estimate, \hat{Δ}(t), described in delta.estimate documentation. |
delta.t |
the estimate, \hat{Δ}_T(t,t_0), described above. |
R.t |
the estimate, \hat{R}_T(t,t_0), described above. |
delta.var |
the variance estimate of \hat{Δ}(t); if var = TRUE or conf.int = TRUE. |
delta.t.var |
the variance estimate of \hat{Δ}_T(t,t_0); if var = TRUE or conf.int = TRUE. |
R.t.var |
the variance estimate of \hat{R}_T(t,t_0); if var = TRUE or conf.int = TRUE. |
conf.int.normal.delta |
a vector of size 2; the 95% confidence interval for \hat{Δ}(t) based on a normal approximation; if conf.int = TRUE. |
conf.int.quantile.delta |
a vector of size 2; the 95% confidence interval for \hat{Δ}(t) based on sample quantiles of the perturbed values, described above; if conf.int = TRUE. |
conf.int.normal.delta.t |
a vector of size 2; the 95% confidence interval for \hat{Δ}_T(t,t_0) based on a normal approximation; if conf.int = TRUE. |
conf.int.quantile.delta.t |
a vector of size 2; the 95% confidence interval for \hat{Δ}_T(t,t_0) based on sample quantiles of the perturbed values, described above; if conf.int = TRUE. |
conf.int.normal.R.t |
a vector of size 2; the 95% confidence interval for \hat{R}_T(t,t_0) based on a normal approximation; if conf.int = TRUE. |
conf.int.quantile.R.t |
a vector of size 2; the 95% confidence interval for \hat{R}_T(t,t_0) based on sample quantiles of the perturbed values, described above; if conf.int = TRUE. |
conf.int.fieller.R.t |
a vector of size 2; the 95% confidence interval for \hat{R}_T(t,t_0) based on Fieller's approach, described above; if conf.int = TRUE. |
If the treatment effect is not significant, the user will receive the following message: "Warning: it looks like the treatment effect is not significant; may be difficult to interpret the residual treatment effect in this setting". If the treatment effect is negative, the user will receive the following message: "Warning: it looks like you need to switch the treatment groups" as this package assumes throughout that larger values of the event time are better.
Layla Parast
Parast, L., Cai, T., & Tian, L. (2017). Evaluating surrogate marker information using censored data. Statistics in Medicine, 36(11), 1767-1782.
data(d_example_surv) names(d_example_surv)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.