| Title: | Robust Estimation of the Proportion of Treatment Effect Explained by Surrogate Marker Information |
|---|---|
| Description: | Provides functions to estimate the proportion of treatment effect on the primary outcome that is explained by the treatment effect on the surrogate marker. |
| Authors: | Layla Parast |
| Maintainer: | Layla Parast <[email protected]> |
| License: | GPL |
| Version: | 3.2 |
| Built: | 2026-05-23 15:13:01 UTC |
| Source: | https://github.com/laylaparast/rsurrogate |
This function calculates the augmented version of the proportion of treatment effect on the primary outcome explained by the surrogate marker information measured at and primary outcome information up to . Variance estimates and 95 % confidence intervals for the augmented estimates are provided automatically; three versions of the confidence interval are provided: a normal approximation based interval, a quantile based interval and Fieller's confidence interval, all using perturbation-resampling. The user can also request an estimate of the incremental value of surrogate marker information.
Aug.R.s.surv.estimate(xone, xzero, deltaone, deltazero, sone, szero, t, weight.perturb = NULL, landmark, extrapolate = FALSE, transform = FALSE, basis.delta.one, basis.delta.zero, basis.delta.s.one = NULL, basis.delta.s.zero = NULL, incremental.value = FALSE, approx = T)Aug.R.s.surv.estimate(xone, xzero, deltaone, deltazero, sone, szero, t, weight.perturb = NULL, landmark, extrapolate = FALSE, transform = FALSE, basis.delta.one, basis.delta.zero, basis.delta.s.one = NULL, basis.delta.s.zero = NULL, incremental.value = 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. |
sone |
numeric vector; surrogate marker measurement at |
szero |
numeric vector; surrogate marker measurement at |
t |
the time of interest. |
weight.perturb |
weights used for perturbation resampling. |
landmark |
the landmark time |
extrapolate |
TRUE or FALSE; indicates whether the user wants to use extrapolation. |
transform |
TRUE or FALSE; indicates whether the user wants to use a transformation for the surrogate marker. |
basis.delta.one |
either a vector of length |
basis.delta.zero |
either a vector of length |
basis.delta.s.one |
either a vector of length |
basis.delta.s.zero |
either a vector of length |
incremental.value |
TRUE or FALSE; indicates whether the user would like to see the incremental value of the surrogate marker information, 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. |
Please see R.s.surv.estimate documention for details about the estimates before augmentation is performed. Recent work has shown that augmentation can lead to improvements in efficiency by taking advantage of the association between baseline information, denoted here as , and the primary outcome. This function calculates the augmented estimates of the quantities of interest. For example, the augmented version of is defined as:
where are i.i.d. random vectors of baseline covariates from treatment group and is a basis transformation given a priori. Due to treatment randomization, converges to zero in probability as the sample size goes to infinity and thus the augmented estimator converges to the same limit as the original counterparts. The quantity is selected such that the variance of is minimized. That is, where
and thus we can obtain by replacing with a consistent estimator, obtained using perturbation-resampling. A similar approach is used to obtain and thus construct
When only a single is provided in the basis argument, the following basis is used in this function:
A list is returned:
aug.delta |
the estimate, |
aug.delta.s |
the estimate, |
aug.R.s |
the estimate, |
aug.delta.var |
the variance estimate of |
aug.delta.s.var |
the variance estimate of |
aug.R.s.var |
the variance estimate of |
conf.int.normal.aug.delta |
a vector of size 2; the 95% confidence interval for |
conf.int.quantile.aug.delta |
a vector of size 2; the 95% confidence interval for |
conf.int.normal.aug.delta.s |
a vector of size 2; the 95% confidence interval for |
conf.int.quantile.aug.delta.s |
a vector of size 2; the 95% confidence interval for |
conf.int.normal.R.s |
a vector of size 2; the 95% confidence interval for |
conf.int.quantile.aug.R.s |
a vector of size 2; the 95% confidence interval for |
conf.int.fieller.aug.R.s |
a vector of size 2; the 95% confidence interval for |
aug.delta.t |
the estimate, |
aug.R.t |
the estimate, |
aug.incremental.value |
the estimate, |
aug.delta.t.var |
the variance estimate of |
aug.R.t.var |
the variance estimate of |
aug.incremental.value.var |
the variance estimate of |
aug.conf.int.normal.delta.t |
a vector of size 2; the 95% confidence interval for |
aug.conf.int.quantile.delta.t |
a vector of size 2; the 95% confidence interval for |
aug.conf.int.normal.R.t |
a vector of size 2; the 95% confidence interval for |
aug.conf.int.quantile.R.t |
a vector of size 2; the 95% confidence interval for |
aug.conf.int.fieller.R.t |
a vector of size 2; the 95% confidence interval for |
aug.conf.int.normal.iv |
a vector of size 2; the 95% confidence interval for |
aug.conf.int.quantile.iv |
a vector of size 2; the 95% confidence interval for |
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 observed support of the surrogate marker for the control group is outside the observed support of the surrogate marker for the treatment group, the user will receive the following message: "Warning: observed supports do not appear equal, may need to consider a transformation or extrapolation".
Layla Parast
Tian L, Cai T, Zhao L,Wei L. On the covariate-adjusted estimation for an overall treatment difference with data from a randomized comparative clinical trial. Biostatistics 2012; 13(2): 256-273.
Garcia TP, Ma Y, Yin G. Efficiency improvement in a class of survival models through model-free covariate incorporation. Lifetime Data Analysis 2011; 17(4): 552-565.
Zhang M, Tsiatis AA, Davidian M. Improving efficiency of inferences in randomized clinical trials using auxiliary covariates. Biometrics 2008; 64(3): 707-715.
Parast, L., Cai, T., & Tian, L. (2017). Evaluating surrogate marker information using censored data. Statistics in Medicine, 36(11), 1767-1782.
#computationally intensive #Aug.R.s.surv.estimate(xone = d_example_surv$x1, xzero = d_example_surv$x0, #deltaone = d_example_surv$delta1, deltazero = d_example_surv$delta0, #sone = d_example_surv$s1, szero = d_example_surv$s0, t=3, landmark = 1, #basis.delta.one = d_example_surv$z1 , basis.delta.zero = d_example_surv$z0)#computationally intensive #Aug.R.s.surv.estimate(xone = d_example_surv$x1, xzero = d_example_surv$x0, #deltaone = d_example_surv$delta1, deltazero = d_example_surv$delta0, #sone = d_example_surv$s1, szero = d_example_surv$s0, t=3, landmark = 1, #basis.delta.one = d_example_surv$z1 , basis.delta.zero = d_example_surv$z0)
Hypothetical data to be used in examples.
data(d_example)data(d_example)
A list with 8 elements representing 500 observations from a control group and 500 observations from a treatment group:
s1.aFirst surrogate marker measurement for treated observations.
s1.bSecond surrogate marker measurement for treated observations.
s1.cThird surrogate marker measurement for treated observations.
y1Primary outcome for treated observations.
s0.aFirst surrogate marker measurement for control observations.
s0.bSecond surrogate marker measurement for control observations.
s0.cThird surrogate marker measurement for control observations.
y0Primary outcome for control observations.
data(d_example) names(d_example)data(d_example) names(d_example)
Hypothetical data to be used in measurement error example.
data(d_example_me)data(d_example_me)
A list with 10 elements representing 500 observations from a control group and 500 observations from a treatment group:
y1Primary outcome for treated observations.
s1Surrogate marker for treated observations.
s1_rep1Replicate measurement of the surrogate marker for treated observations.
s1_rep2Replicate measurement of the surrogate marker for treated observations.
s1_rep3Replicate measurement of the surrogate marker for treated observations.
y0Primary outcome for control observations.
s0Surrogate marker for control observations.
s0_rep1Replicate measurement of the surrogate marker for control observations.
s0_rep2Replicate measurement of the surrogate marker for control observations.
s0_rep3Replicate measurement of the surrogate marker for control observations.
data(d_example_me) names(d_example_me)data(d_example_me) names(d_example_me)
Hypothetical survival data with multiple surrogate markers to be used in examples.
data(d_example_multiple)data(d_example_multiple)
A list with 6 elements representing 1000 observations from a control group and 1000 observations from a treatment group:
s1Surrogate marker measurements for treated observations; these markers are measured at time = 0.5. For observations that experience the primary outcome or are censored before 0.5, the surrogate values are NA.
x1The observed event or censoring time for treated observations; X = min(T, C) where T is the time of the primary outcome and C is the censoring time.
delta1The indicator identifying whether the treated observation was observed to have the event or was censored; D =1*(T<C) where T is the time of the primary outcome and C is the censoring time.
s0Surrogate marker measurements for control observations; these markers are measured at time = 0.5. For observations that experience the primary outcome or are censored before 0.5, the surrogate values are NA.
x0The observed event or censoring time for control observations; X = min(T, C) where T is the time of the primary outcome and C is the censoring time.
delta0The indicator identifying whether the control observation was observed to have the event or was censored; D =1*(T<C) where T is the time of the primary outcome and C is the censoring time.
data(d_example_multiple) names(d_example_multiple)data(d_example_multiple) names(d_example_multiple)
Hypothetical survival data to be used in examples.
data(d_example_surv)data(d_example_surv)
A list with 8 elements representing 500 observations from a control group and 500 observations from a treatment group:
s1Surrogate marker measurement for treated observations; this marker is measured at time = 0.5. For observations that experience the primary outcome or are censored before 0.5, this value is NA.
x1The observed event or censoring time for treated observations; X = min(T, C) where T is the time of the primary outcome and C is the censoring time.
delta1The indicator identifying whether the treated observation was observed to have the event or was censored; D =1*(T<C) where T is the time of the primary outcome and C is the censoring time.
s0Surrogate marker measurement for control observations; this marker is measured at time = 0.5. For observations that experience the primary outcome or are censored before 0.5, this value is NA.
x0The observed event or censoring time for control observations; X = min(T, C) where T is the time of the primary outcome and C is the censoring time.
delta0The indicator identifying whether the control observation was observed to have the event or was censored; D =1*(T<C) where T is the time of the primary outcome and C is the censoring time.
z1A baseline covariate value for treated observations.
z0A baseline covariate value for control observations.
data(d_example_surv) names(d_example_surv)data(d_example_surv) names(d_example_surv)
This function calculates the treatment effect estimate, the difference in the average outcome in the treatment group minus the control group. This function is intended to be used for a fully observed continuous outcome. 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.
delta.estimate(yone,yzero, var = FALSE, conf.int = FALSE, weight = NULL, weight.perturb = NULL)delta.estimate(yone,yzero, var = FALSE, conf.int = FALSE, weight = NULL, weight.perturb = NULL)
yone |
numeric vector; primary outcome for treated observations. |
yzero |
numeric vector; primary outcome for control observations. |
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 n1+n0 by x matrix of weights where n1 = length of yone and n0 = length of yzero, default is null; generally not supplied by use but only used by other functions. |
weight.perturb |
a n1+n0 by x matrix of weights where n1 = length of yone and n0 = length of yzero, default is null; generally used for confidence interval construction and may be supplied by user. |
Let and denote the primary outcome under the treatment and primary outcome under the control,respectively. The treatment effect, , is the expected difference in compared to , We estimate as
where is the observed primary outcome for person in the treated group, is the observed primary outcome for person in the control group, and and are the number of individuals in the treatment and control group, respectively. Randomized treatment assignment is assumed throughout this package.
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
The variance of is obtained as the empirical variance of In this package, we use weights generated from an Exponential(1) distribution and use . 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 .
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 |
Layla Parast
data(d_example) names(d_example) delta.estimate(yone=d_example$y1, yzero=d_example$y0)data(d_example) names(d_example) delta.estimate(yone=d_example$y1, yzero=d_example$y0)
This function calculates the robust estimate of the residual treatment effect accounting for multiple surrogate markers measured at and primary outcome information up to i.e. the hypothetical treatment effect if both the surrogate marker distributions at and survival up to in the treatment group look like the surrogate marker distributions and survival up to in the control group. Ideally this function is only used as a helper function and is not directly called.
delta.multiple.surv(xone, xzero, deltaone, deltazero, sone, szero, type =1, t, weight.perturb = NULL, landmark, extrapolate = FALSE, transform = FALSE, approx = T)delta.multiple.surv(xone, xzero, deltaone, deltazero, sone, szero, type =1, t, weight.perturb = NULL, landmark, extrapolate = FALSE, transform = 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. |
sone |
matrix of numeric values; surrogate marker measurements at |
szero |
matrix of numeric values; surrogate marker measurements at |
type |
type of estimate; options are 1 = two-stage robust estimator, 2 = weighted two-stage robust estimator, 3 = double-robust estimator, 4 = two-stage model-based estimator, 5 = weighted estimator, 6 = double-robust model-bsed estimator; default is 1. |
t |
the time of interest. |
weight.perturb |
weights used for perturbation resampling. |
landmark |
the landmark time |
extrapolate |
TRUE or FALSE; indicates whether the user wants to use extrapolation. |
transform |
TRUE or FALSE; indicates whether the user wants to use a transformation for the surrogate marker psuedo-score. |
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 are included in the documentation for R.multiple.surv.
, the residual treatment effect estimate accounting for multiple surrogarte markers measured at and primary outcome information up to .
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".
Layla Parast
Parast, L., Cai, T., & Tian, L. (2021). Evaluating multiple surrogate markers with censored data. Biometrics, 77(4), 1315-1327.
data(d_example_multiple) names(d_example_multiple) ## Not run: delta.multiple.surv(xone = d_example_multiple$x1, xzero = d_example_multiple$x0, deltaone = d_example_multiple$delta1, deltazero = d_example_multiple$delta0, sone = as.matrix(d_example_multiple$s1), szero = as.matrix(d_example_multiple$s0), type =1, t = 1, landmark=0.5) ## End(Not run)data(d_example_multiple) names(d_example_multiple) ## Not run: delta.multiple.surv(xone = d_example_multiple$x1, xzero = d_example_multiple$x0, deltaone = d_example_multiple$delta1, deltazero = d_example_multiple$delta0, sone = as.matrix(d_example_multiple$s1), szero = as.matrix(d_example_multiple$s0), type =1, t = 1, landmark=0.5) ## End(Not run)
This function calculates the model-based or robust estimate of the residual treatment effect i.e. the hypothetical treatment effect if the distribution of the surrogate in the treatment group looks like the distribution of the surrogate in the control group. Ideally, this function is only used as a helper function and is not directly called.
delta.s.estimate(sone, szero, yone, yzero, weight.perturb = NULL, number="single", type="robust", warn.te = FALSE, warn.support = FALSE, extrapolate = FALSE, transform = FALSE)delta.s.estimate(sone, szero, yone, yzero, weight.perturb = NULL, number="single", type="robust", warn.te = FALSE, warn.support = FALSE, extrapolate = FALSE, transform = FALSE)
sone |
numeric vector or matrix; surrogate marker for treated observations, assumed to be continuous. If there are multiple surrogates then this should be a matrix with |
szero |
numeric vector or matrix; surrogate marker for control observations, assumed to be continuous. If there are multiple surrogates then this should be a matrix with |
yone |
numeric vector; primary outcome for treated observations. |
yzero |
numeric vector; primary outcome for control observations. |
weight.perturb |
a |
number |
specifies the number of surrogate markers; choices are "multiple" or "single", default is "single". |
type |
specifies the type of estimation; choices are "robust" or "model", default is "robust". |
warn.te |
value passed from R.s.estimate function to control warnings; user does not need to specify. |
warn.support |
value passed from R.s.estimate function to control warnings; user does not need to specify. |
extrapolate |
TRUE or FALSE; indicates whether the user wants to use extrapolation. |
transform |
TRUE or FALSE; indicates whether the user wants to use a transformation for the surrogate marker. |
Details are included in the documentation for R.s.estimate.
, the model-based or robust residual treatment effect estimate.
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". In the single marker case with the robust estimation approach, if the observed support of the surrogate marker for the control group is outside the observed support of the surrogate marker for the treatment group, the user will receive the following message: "Warning: observed supports do not appear equal, may need to consider a transformation or extrapolation".
Layla Parast
Parast, L., McDermott, M., Tian, L. (2015). Robust estimation of the proportion of treatment effect explained by surrogate marker information. Statistics in Medicine, 35(10):1637-1653.
Wang, Y., & Taylor, J. M. (2002). A measure of the proportion of treatment effect explained by a surrogate marker. Biometrics, 58(4), 803-812.
data(d_example) names(d_example) delta.s.estimate(yone=d_example$y1, yzero=d_example$y0, sone=d_example$s1.a, szero= d_example$s0.a, number = "single", type = "robust") delta.s.estimate(yone=d_example$y1, yzero=d_example$y0, sone=d_example$s1.a, szero= d_example$s0.a, number = "single", type = "model") delta.s.estimate(yone=d_example$y1, yzero=d_example$y0, sone=cbind(d_example$s1.a, d_example$s1.b, d_example$s1.c), szero=cbind(d_example$s0.a, d_example$s0.b, d_example$s0.c), number = "multiple", type = "robust") delta.s.estimate(yone=d_example$y1, yzero=d_example$y0, sone=cbind(d_example$s1.a, d_example$s1.b, d_example$s1.c), szero=cbind(d_example$s0.a, d_example$s0.b, d_example$s0.c), number = "multiple", type = "model")data(d_example) names(d_example) delta.s.estimate(yone=d_example$y1, yzero=d_example$y0, sone=d_example$s1.a, szero= d_example$s0.a, number = "single", type = "robust") delta.s.estimate(yone=d_example$y1, yzero=d_example$y0, sone=d_example$s1.a, szero= d_example$s0.a, number = "single", type = "model") delta.s.estimate(yone=d_example$y1, yzero=d_example$y0, sone=cbind(d_example$s1.a, d_example$s1.b, d_example$s1.c), szero=cbind(d_example$s0.a, d_example$s0.b, d_example$s0.c), number = "multiple", type = "robust") delta.s.estimate(yone=d_example$y1, yzero=d_example$y0, sone=cbind(d_example$s1.a, d_example$s1.b, d_example$s1.c), szero=cbind(d_example$s0.a, d_example$s0.b, d_example$s0.c), number = "multiple", type = "model")
This function calculates the robust estimate of the residual treatment effect accounting for surrogate marker information measured at and primary outcome information up to i.e. the hypothetical treatment effect if both the surrogate marker distribution at and survival up to in the treatment group look like the surrogate marker distribution and survival up to in the control group. Ideally this function is only used as a helper function and is not directly called.
delta.s.surv.estimate(xone, xzero, deltaone, deltazero, sone, szero, t, weight.perturb = NULL, landmark, extrapolate = FALSE, transform = FALSE, approx = T, warn.te = FALSE, warn.support = FALSE)delta.s.surv.estimate(xone, xzero, deltaone, deltazero, sone, szero, t, weight.perturb = NULL, landmark, extrapolate = FALSE, transform = FALSE, approx = T, warn.te = FALSE, warn.support = FALSE)
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. |
sone |
numeric vector; surrogate marker measurement at |
szero |
numeric vector; surrogate marker measurement at |
t |
the time of interest. |
weight.perturb |
weights used for perturbation resampling. |
landmark |
the landmark time |
extrapolate |
TRUE or FALSE; indicates whether the user wants to use extrapolation. |
transform |
TRUE or FALSE; indicates whether the user wants to use a transformation for the surrogate marker. |
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. |
warn.te |
value passed from R.s.estimate function to control warnings; user does not need to specify. |
warn.support |
value passed from R.s.estimate function to control warnings; user does not need to specify. |
Details are included in the documentation for R.s.surv.estimate.
, the robust residual treatment effect estimate accounting for surrogate marker information measured at and primary outcome information up to .
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 observed support of the surrogate marker for the control group is outside the observed support of the surrogate marker for the treatment group, the user will receive the following message: "Warning: observed supports do not appear equal, may need to consider a transformation or extrapolation".
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)data(d_example_surv) names(d_example_surv)
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.
delta.surv.estimate(xone, xzero, deltaone, deltazero, t, var = FALSE, conf.int = FALSE, weight = NULL, weight.perturb = NULL, approx = T)delta.surv.estimate(xone, xzero, deltaone, deltazero, t, var = FALSE, conf.int = FALSE, weight = NULL, weight.perturb = NULL, 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. |
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. |
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 .
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 |
Layla Parast
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)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)
This function calculates the robust estimate of the residual treatment effect accounting only for primary outcome information up to i.e. the hypothetical treatment effect if survival up to in the treatment group looks like survival up to in the control group. Ideally this function is only used as a helper function and is not directly called.
delta.t.surv.estimate(xone, xzero, deltaone, deltazero, t, weight.perturb = NULL, landmark, approx = T)delta.t.surv.estimate(xone, xzero, deltaone, deltazero, t, weight.perturb = NULL, landmark, 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 |
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 are included in the documentation for R.t.surv.estimate.
, the robust residual treatment effect estimate accounting only for survival up to .
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".
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)data(d_example_surv) names(d_example_surv)
Constructs Fieller's confidence interval.
fieller.ci(perturb.delta.s, perturb.delta, delta.s, delta)fieller.ci(perturb.delta.s, perturb.delta, delta.s, delta)
perturb.delta.s |
numeric vector; the perturbed values for |
perturb.delta |
numeric vector; the perturbed values for |
delta.s |
the residual treatment effect, |
delta |
the treatment effect, |
See documention for R.s.estimate for more detail.
Returns a vector of length 2, lower bound of the 95% confidence interval and upper bound of the 95% confidence interval.
Layla Parast
Fieller, Edgar C. (1954). Some problems in interval estimation. Journal of the Royal Statistical Society. Series B (Methodological), 175-185.
Fieller, E. C. (1940). The biological standardization of insulin. Supplement to the Journal of the Royal Statistical Society, 1-64.
Parast, L., McDermott, M., Tian, L. (2016). Robust estimation of the proportion of treatment effect explained by surrogate marker information. Statistics in Medicine, 35(10):1637-1653.
Estimates measurement error variance given replicate data using a simple components of variance analysis.
me.variance.estimate(replicates)me.variance.estimate(replicates)
replicates |
matrix of data where each row indicates a subject and each column is a replicated measurement; columns can have NAs when subjects have different numbers of measurements. |
Estimates measurement error variance given replicate data using a simple components of variance analysis.
estimate of measurement error variance
Layla Parast
Carroll, R. J., Ruppert, D., Crainiceanu, C. M., and Stefanski, L. A. (2006). Measurement error in nonlinear models: a modern perspective. Chapman and Hall/CRC.
Parast, L., Garcia, T. P., Prentice, R. L., & Carroll, R. J. (2022). Robust methods to correct for measurement error when evaluating a surrogate marker. Biometrics, 78(1), 9-23.
This function calculates the proportion of treatment effect on the primary outcome explained by multiple surrogate markers measured at and primary outcome information up to . 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. The user can also request an estimate of the incremental value of the surrogate marker information.
R.multiple.surv(xone, xzero, deltaone, deltazero, sone, szero, type =1, t, weight.perturb = NULL, landmark, extrapolate = FALSE, transform = FALSE, conf.int = FALSE, var = FALSE, incremental.value = FALSE, approx = T)R.multiple.surv(xone, xzero, deltaone, deltazero, sone, szero, type =1, t, weight.perturb = NULL, landmark, extrapolate = FALSE, transform = FALSE, conf.int = FALSE, var = FALSE, incremental.value = 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. |
sone |
matrix of numeric values; surrogate marker measurements at |
szero |
matrix of numeric values; surrogate marker measurements at |
type |
type of estimate; options are 1 = two-stage robust estimator, 2 = weighted two-stage robust estimator, 3 = double-robust estimator, 4 = two-stage model-based estimator, 5 = weighted estimator, 6 = double-robust model-based estimator; default is 1. |
t |
the time of interest. |
weight.perturb |
weights used for perturbation resampling. |
landmark |
the landmark time |
extrapolate |
TRUE or FALSE; indicates whether the user wants to use extrapolation. |
transform |
TRUE or FALSE; indicates whether the user wants to use a transformation for the surrogate marker pseudo-score. |
conf.int |
TRUE or FALSE; indicates whether a 95% confidence interval for delta is requested, default is FALSE. |
var |
TRUE or FALSE; indicates whether a variance estimate is requested, default is FALSE. |
incremental.value |
TRUE or FALSE; indicates whether the user would like to see the incremental value of the surrogate marker information, 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 be the binary treatment indicator and we assume that subjects are randomly assigned to either treatment group or at baseline. Let denote the time to the occurrence of the primary outcome, death for example, and denote the vector of surrogate markers measured at a given time . Let and denote the counterfactual event time and surrogate marker measurements under treatment for . In practice, we only observe or depending on whether or The treatment effect, , is the treatment difference in survival rates at time ,
where is the indicator function. For individuals who are censored or experience the primary outcome before , we assume that their information is not available.
The surrogate marker information at time is defined as a combination of the observed information on and the observed at , denoted by , where
. With information on , the residual treatment effect is defined as:
where ,
The proportion of the treatment effect on the primary outcome that is explained by the treatment effect on is . This function provides 6 different estimators for using censored data.
Due to censoring, the observed data consist of observations from the two treatment groups, where , , and denotes the censoring time for the th subject. We assume independent censoring i.e., . For ease of notation, we also let denote observations from treatment group where and Without loss of generality, we assume that as . Throughout, we estimate the treatment effect as
where is the Kaplan-Meier estimator of .
We first describe the two-stage robust estimator which involves a two-stage procedure combining the use of a working model and a nonparametric estimation procedure for . The idea is simply to summarize into a univariate score and then construct a nonparametric estimator for treating as . To construct , we approximate the conditional distribution of by using a working semiparametric model such as the landmark proportional hazards model
where is the unspecified baseline cumulative hazard function for conditional on and is an unknown vector of coefficients. Let be the maximizer of the corresponding log partial likelihood function and be the Breslow-type estimate of baseline hazard. If one were to assume that this working model is correctly specified, then a consistent estimate of would simply be: We refer to this estimate as the two-stage model-based estimator (option 4 for type).
Instead of relying on correct specification of this model, we use the resulting score as a univariate “pseudo-marker" to summarize the surrogates. In the second stage, to estimate , we apply a nonparametric approach with represented by the univariate marker . Specifically, we use a kernel Nelson-Aalen estimator to nonparametrically estimate as , where
, , , is a smooth symmetric density function, and is a given monotone transformation function. We then estimate as
and We refer to this estimate as the two-stage robust estimator (option 1 for type).
The next estimator borrows ideas from the extensive causal inference literature focusing on double robust estimators two-stage weighted estimator with a propensity score weight explicitly balancing the two treatment groups with respect to the distribution of . The weighting enables us to “adjust" the distribution of before constructing the conditional survival estimate This approach results in a double-robust estimator of , which is consistent when either captures all the information about the relationship between and or the propensity score model for is correctly specified. While depends on , for simplicity, we drop from our notation and simply use .
Regression models can be imposed to obtain estimates for . For example, a simple logistic regression model can be imposed for
with
where and are estimated only among those with to account for censoring. The propensity score of interest, can be derived from directly since
which follows from the assumption that We then modify the above expression by weighting observations with the estimated and obtain
,
where
Subsequently, we define
and
where We refer to this estimate as the weighted two-stage robust estimator (option 2 for type).
While the two-stage weighted estimator reflects one way to enhance the robustness of an initial estimator, the idea of combining a propensity-score type model and a regression-type model has certainly been extensively studied in the causal inference literature and a more familiar double-robust estimator can be constructed as:
and , where is the (unweighted) estimate of used in . We refer to this estimate as the double robust estimator (option 3 for type).
The weighted estimator (option type 5) is defined as:
and This estimator completely relies on the correct specification of . The double-robust model-based estimator (option 6 for type) is defined as and which are constructed parallel to the construction of i.e., a combination of and .
Variance estimates are obtained using perturbation resampling. 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. An estimate of the incremental value of the surrogate marker information can also be requested; this essentially compared the proportion explained by the surrogate information vs. the proportion explained by alone up to . Details can be found in Parast, L., Cai, T., & Tian, L. (2021). Evaluating multiple surrogate markers with censored data. Biometrics, 77(4), 1315-1327.
A list is returned:
delta |
the estimate, |
delta.s |
the residual treatment effect estimate, |
R.s |
the estimated proportion of treatment effect explained by the set of markers, |
delta.var |
the variance estimate of |
delta.s.var |
the variance estimate of |
R.s.var |
the variance estimate of |
conf.int.normal.delta |
a vector of size 2; the 95% confidence interval for |
conf.int.quantile.delta |
a vector of size 2; the 95% confidence interval for |
conf.int.normal.delta.s |
a vector of size 2; the 95% confidence interval for |
conf.int.quantile.delta.s |
a vector of size 2; the 95% confidence interval for |
conf.int.normal.R.s |
a vector of size 2; the 95% confidence interval for |
conf.int.quantile.R.s |
a vector of size 2; the 95% confidence interval for |
conf.int.fieller.R.s |
a vector of size 2; the 95% confidence interval for |
delta.t |
the estimate, |
R.t |
the estimated proportion of treatment effect explained by survival only, |
incremental.value |
the estimate of the incremental value of the surrogate markers, |
delta.t.var |
the variance estimate of |
R.t.var |
the variance estimate of |
incremental.value.var |
the variance estimate of |
conf.int.normal.delta.t |
a vector of size 2; the 95% confidence interval for |
conf.int.quantile.delta.t |
a vector of size 2; the 95% confidence interval for |
conf.int.normal.R.t |
a vector of size 2; the 95% confidence interval for |
conf.int.quantile.R.t |
a vector of size 2; the 95% confidence interval for |
conf.int.fieller.R.t |
a vector of size 2; the 95% confidence interval for |
conf.int.normal.iv |
a vector of size 2; the 95% confidence interval for |
conf.int.quantile.iv |
a vector of size 2; the 95% confidence interval for |
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".
Layla Parast
Parast, L., Cai, T., & Tian, L. (2017). Evaluating surrogate marker information using censored data. Statistics in Medicine, 36(11), 1767-1782.
Parast, L., Cai, T., & Tian, L. (2021). Evaluating multiple surrogate markers with censored data. Biometrics, 77(4), 1315-1327.
data(d_example_multiple) names(d_example_multiple) ## Not run: R.multiple.surv(xone = d_example_multiple$x1, xzero = d_example_multiple$x0, deltaone = d_example_multiple$delta1, deltazero = d_example_multiple$delta0, sone = as.matrix(d_example_multiple$s1), szero = as.matrix(d_example_multiple$s0), type =1, t = 1, landmark=0.5) R.multiple.surv(xone = d_example_multiple$x1, xzero = d_example_multiple$x0, deltaone = d_example_multiple$delta1, deltazero = d_example_multiple$delta0, sone = as.matrix(d_example_multiple$s1), szero = as.matrix(d_example_multiple$s0), type =1, t = 1, landmark=0.5, conf.int = T) R.multiple.surv(xone = d_example_multiple$x1, xzero = d_example_multiple$x0, deltaone = d_example_multiple$delta1, deltazero = d_example_multiple$delta0, sone = as.matrix(d_example_multiple$s1), szero = as.matrix(d_example_multiple$s0), type =3, t = 1, landmark=0.5) ## End(Not run)data(d_example_multiple) names(d_example_multiple) ## Not run: R.multiple.surv(xone = d_example_multiple$x1, xzero = d_example_multiple$x0, deltaone = d_example_multiple$delta1, deltazero = d_example_multiple$delta0, sone = as.matrix(d_example_multiple$s1), szero = as.matrix(d_example_multiple$s0), type =1, t = 1, landmark=0.5) R.multiple.surv(xone = d_example_multiple$x1, xzero = d_example_multiple$x0, deltaone = d_example_multiple$delta1, deltazero = d_example_multiple$delta0, sone = as.matrix(d_example_multiple$s1), szero = as.matrix(d_example_multiple$s0), type =1, t = 1, landmark=0.5, conf.int = T) R.multiple.surv(xone = d_example_multiple$x1, xzero = d_example_multiple$x0, deltaone = d_example_multiple$delta1, deltazero = d_example_multiple$delta0, sone = as.matrix(d_example_multiple$s1), szero = as.matrix(d_example_multiple$s0), type =3, t = 1, landmark=0.5) ## End(Not run)
This function calculates the proportion of treatment effect on the primary outcome explained by the treatment effect on the surrogate marker(s). This function is intended to be used for a fully observed continuous outcome. The user can also request a variance estimate and a 95% confidence interval, both estimated using perturbating-resampling. If a confidence interval is requested three versions are provided: a normal approximation based interval, a quantile based interval, and Fieller's confidence interval.
R.s.estimate(sone, szero, yone, yzero, var = FALSE, conf.int = FALSE, weight.perturb = NULL, number = "single", type = "robust",extrapolate = FALSE, transform = FALSE,warn.te = FALSE, warn.support = FALSE)R.s.estimate(sone, szero, yone, yzero, var = FALSE, conf.int = FALSE, weight.perturb = NULL, number = "single", type = "robust",extrapolate = FALSE, transform = FALSE,warn.te = FALSE, warn.support = FALSE)
sone |
numeric vector or matrix; surrogate marker for treated observations, assumed to be continuous. If there are multiple surrogates then this should be a matrix with |
szero |
numeric vector; surrogate marker for control observations, assumed to be continuous.If there are multiple surrogates then this should be a matrix with |
yone |
numeric vector; primary outcome for treated observations, assumed to be continuous. |
yzero |
numeric vector; primary outcome for control observations, assumed to be continuous. |
var |
TRUE or FALSE; indicates whether a variance estimate is requested, default is FALSE. |
conf.int |
TRUE or FALSE; indicates whether a 95% confidence interval is requested, default is FALSE |
weight.perturb |
a |
number |
specifies the number of surrogate markers; choices are "multiple" or "single", default is "single" |
type |
specifies the type of estimation; choices are "robust" or "model" or "freedman", default is "robust" |
extrapolate |
TRUE or FALSE; indicates whether the user wants to use extrapolation. |
transform |
TRUE or FALSE; indicates whether the user wants to use a transformation for the surrogate marker. |
warn.te |
value to control warnings; user does not need to specify. |
warn.support |
value to control warnings; user does not need to specify. |
Let and denote the primary outcome under the treatment and primary outcome under the control,respectively. Let and denote the surrogate marker under the treatment and the surrogate marker under the control,respectively. The residual treatment effect is defined as
where and is the marginal cumulative distribution function of , the surrogate marker measure under the control. The proportion of treatment effect explained by the surrogate marker, which we denote by , can be expressed using a contrast between and :
The definition and estimation of is described in the delta.estimate documentation.
A flexible model-based approach to estimate in the single marker setting is to specify:
It can be shown that when these models hold, . Thus, reasonable estimates for and using this approach would be and
For robust estimation of in the single marker setting, we estimate nonparametrically using kernel smoothing:
where is the observed for person , is the observed for person , is a smooth symmetric density function with finite support, and is a specified bandwidth. As in most nonparametric functional estimation procedures, the choice of the smoothing parameter is critical. To eliminate the impact of the bias of the conditional mean function on the resulting estimator, we require the standard undersmoothing assumption of with To obtain an appropriate we first use bw.nrd to obtain ; and then we let with . We then estimate as
where is the observed for person and is the observed for person . Lastly, we estimate as .
This function also allows for estimation of using Freedman's approach. Let denote the primary outcome, denote the surrogate marker, and denote the treatment group (0 for control, 1 for treatment). Freedman's approach to calculating the proportion of treatment effect explained by the surrogate marker is to fit the following two regression models:
and estimating the proportion of treatment effect explained, denoted by , as .
This function also estimates in a multiple marking setting. A flexible model-based approach to estimate in the multiple marker setting is to specify models for and for each in (where p is the number of surrogate markers). Without loss of generality, consider the case where there are three surrogate markers, and one specifies the following linear models:
It can be shown that when these models hold
Thus, reasonable estimates for and here would be easily obtained by replacing the unknown regression coefficients in the models above by their consistent estimators.
For robust estimation of S in the multiple marker setting, we use a two-stage procedure combining the model-based approach and the nonparametric estimation procedure from the single marker setting. Specifically, we use a working semiparametric model:
and define and to reduce the dimension of in the first stage and in the second stage, we apply the robust approach used in the single marker setting to estimate its surrogacy.
To use Freedman's approach in the presence of multiple markers, the markers are simply additively entered into the second regression model.
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
The variance of is obtained as the empirical variance of In this package, we use weights generated from an Exponential(1) distribution and use . Variance estimates for and are calculated similarly. We construct two versions of the confidence interval for each estimate: one based on a normal approximation confidence interval using the estimated variance and another taking the 2.5th and 97.5th empirical percentile of the perturbed quantities. In addition, we use Fieller's method to obtain a third confidence interval for as
where and is the th percentile of
where .
Note that if the observed supports for S are not the same, then for outside the support of may return NA (depending on the bandwidth). If extrapolation = TRUE, then the values for these surrogate values are set to the closest non-NA value. If transform = TRUE, then and are transformed such that the new transformed values, and are defined as: for where is the cumulative distribution function for a standard normal random variable, and and are the sample mean and standard deviation, respectively, of .
A list is returned:
R.s |
the estimate, |
R.s.var |
the variance estimate of |
conf.int.normal.R.s |
a vector of size 2; the 95% confidence interval for |
conf.int.quantile.R.s |
a vector of size 2; the 95% confidence interval for |
conf.int.fieller.R.s |
a vector of size 2; the 95% confidence interval for |
For all options other then "freedman", the following are also returned:
delta |
the estimate, |
delta.s |
the estimate, |
delta.var |
the variance estimate of |
delta.s.var |
the variance estimate of |
conf.int.normal.delta |
a vector of size 2; the 95% confidence interval for |
conf.int.quantile.delta |
a vector of size 2; the 95% confidence interval for |
conf.int.normal.delta.s |
a vector of size 2; the 95% confidence interval for |
conf.int.quantile.delta.s |
a vector of size 2; the 95% confidence interval for |
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 proportion of treatment effect explained in this setting". In the single marker case with the robust estimation approach, if the observed support of the surrogate marker for the control group is outside the observed support of the surrogate marker for the treatment group, the user will receive the following message: "Warning: observed supports do not appear equal, may need to consider a transformation or extrapolation"
Layla Parast
Freedman, L. S., Graubard, B. I., & Schatzkin, A. (1992). Statistical validation of intermediate endpoints for chronic diseases. Statistics in medicine, 11(2), 167-178.
Parast, L., McDermott, M., Tian, L. (2016). Robust estimation of the proportion of treatment effect explained by surrogate marker information. Statistics in Medicine, 35(10):1637-1653.
Wang, Y., & Taylor, J. M. (2002). A measure of the proportion of treatment effect explained by a surrogate marker. Biometrics, 58(4), 803-812.
Fieller, Edgar C. (1954). Some problems in interval estimation. Journal of the Royal Statistical Society. Series B (Methodological), 175-185.
Fieller, E. C. (1940). The biological standardization of insulin. Supplement to the Journal of the Royal Statistical Society, 1-64.
data(d_example) names(d_example) R.s.estimate(yone=d_example$y1, yzero=d_example$y0, sone=d_example$s1.a, szero=d_example$s0.a, number = "single", type = "robust") R.s.estimate(yone=d_example$y1, yzero=d_example$y0, sone=cbind(d_example$s1.a,d_example$s1.b, d_example$s1.c), szero=cbind(d_example$s0.a, d_example$s0.b, d_example$s0.c), number = "multiple", type = "model")data(d_example) names(d_example) R.s.estimate(yone=d_example$y1, yzero=d_example$y0, sone=d_example$s1.a, szero=d_example$s0.a, number = "single", type = "robust") R.s.estimate(yone=d_example$y1, yzero=d_example$y0, sone=cbind(d_example$s1.a,d_example$s1.b, d_example$s1.c), szero=cbind(d_example$s0.a, d_example$s0.b, d_example$s0.c), number = "multiple", type = "model")
This function calculates the proportion of treatment effect on the primary outcome explained by the treatment effect on a surrogate marker, correcting for measurement error in the surrogate marker. This function is intended to be used for a fully observed continuous outcome. The user must specify what type of estimation they would like (parametric or nonparametric estimation of the proportion explained, denoted by R) and what estimator they would like (see below for details).
R.s.estimate.me(sone, szero, yone, yzero, parametric = FALSE, estimator = "n", me.variance, extrapolate = TRUE, transform = FALSE, naive = FALSE, Ronly = TRUE)R.s.estimate.me(sone, szero, yone, yzero, parametric = FALSE, estimator = "n", me.variance, extrapolate = TRUE, transform = FALSE, naive = FALSE, Ronly = TRUE)
sone |
numeric vector or matrix; surrogate marker for treated observations, assumed to be continuous. If there are multiple surrogates then this should be a matrix with |
szero |
numeric vector; surrogate marker for control observations, assumed to be continuous.If there are multiple surrogates then this should be a matrix with |
yone |
numeric vector; primary outcome for treated observations, assumed to be continuous. |
yzero |
numeric vector; primary outcome for control observations, assumed to be continuous. |
parametric |
TRUE or FALSE; indicates whether the user wants the parametric approach to be used (TRUE) or nonparametric (FALSE). |
estimator |
options are "d","q","n" for parametric and "q","n" for nonparametric; "d" stands for the disattenuated estimator, "q" stands for the SIMEX estimator with quadratic extrapolation, "n" stands for the SIMEX estimator with a nonlinear extrapolation. Note that the nonlinear extrapolation may have convergence issues with a small sample size; if this occurs, please consider using quadratic extrapolation instead. |
me.variance |
the variance of the measurement error; must be provided. |
extrapolate |
TRUE or FALSE; indicates whether the user wants to use extrapolation. |
transform |
TRUE or FALSE; indicates whether the user wants to use a transformation for the surrogate marker. |
naive |
TRUE or FALSE; indicates whether the user wants the naive estimate (not correcting for measurement error) to also be calculated |
Ronly |
TRUE or FALSE; indicates whether the user wants only R (and corresponding variance and confidence intervals) to be returned. |
While there are many methods available to quantify the value of a surrogate marker, most assume that the marker is measured without error. This function calculates the proportion of treatment effect on the primary outcome explained by the treatment effect on a surrogate marker, correcting for measurement error in the surrogate marker. The user can choose either the parametric framework or nonparametric framework for estmation. Within the parametric framework there are three options for measurement error correction: the disattenuated estimator, the SIMEX estimator with quadratic extrapolation, and the SIMEX estimator with nonlinear extrapolation. Within the nonparametric framework there are two options for measurement error correction: the SIMEX estimator with quadratic extrapolation and the SIMEX estimator with nonlinear extrapolation. We describe each below.
Let be the binary treatment indicator with indicating treatment and indicating control (or placebo). We assume throughout that subjects are randomly assigned to treatment or control at baseline. Let and denote the continuous primary outcome and continuous surrogate marker, respectively, where is measured post-baseline and is assumed to be a biomarker, clinical measurement, psychological test score, or other physiological measurement. In the absence of measurement error, the observed data consists of for . With measurement error, instead of observing we observe , where and the variance of is . Such measurement error may be attributable to, for example, laboratory error. Thus, our observed data will consist of for . Throughout, we assume that is known. Here, we are interested in estimating the proprtion of the treatment effect on the primary outcome that is explained by the treatment effect on the surrogate marker, denoted as .
To estimate parametrically, we assume the following models and . It can be shown that if these models hold, . When is available instead of , this measurement error does not affect estimation of , but it does affect estimation of , and . Since estimation of relies on estimation of and , we focus on the effect of measurement error on estimation. The attenuation bias for and can be written out in closed form when the proportion of treatment effect is parametrically estimated as described above, when these specified models hold, and when the surrogate marker is measured with error. There exist two methods to eliminate this bias when estimating . Taking advantage of the fact that we can express the attenuation bias in closed form, the first is a straightforward disattenuated estimator: and where denotes the sample variance or covariance.
The second method to eliminate this bias uses Simulation Extrapolation (SIMEX) estimation, which is a simulation-based method that involves first generating additional measurement error and observing how it affects the bias of the parameter estimate of interest, and then extrapolating this information to a setting with no measurement error. To incorporate SIMEX estimation within our surrogate marker framework, we define
for where , , is assumed known, and and for each iteration and value, obtaining by fitting the regression model: We then calculate the average estimate for each quantity over the iterations for each value, denoted as . The second step, extrapolation, takes these average estimates for each value and extrapolates using a function to obtain the estimated quantity if . For the extrapolation step, we use both a quadratic extrapolation and nonlinear extrapolation i.e., we solve for in and , respectively. Using the estimates of , we calculate the predicted when . In essence, the simulations add successively larger measurement errors of size and then extrapolate to the case when such that the measurement error is 0. We denote the resulting estimator of as and define
While the parametric approach to estimate the proportion of treatment effect explained by is most commonly used in clinical practice, previous work has demonstrated biased results when the assumed models are not correctly specified. An alternative approach involves estimating the treatment effect, , and residual treatment effect, , as is defined as . The quantity can be estimated simply by , where and denote the number of individuals in the treatment and control groups, respectively. The quantity can be estimated nonparametrically using kernel smoothing as
where , is a smooth symmetric density function with finite support, and is a specified bandwidth such that with
When is available instead of , estimation of is not affected whereas estimation of is affected and thus, the nonparametric estimation procedure described above results in a biased estimate of . Unlike the parametric approach, the attenuation bias cannot be expressed in closed form. Within this nonparametric framework, SIMEX estimation can be used to correct for measurement error. We implement the estimation procedure as described above where we first generate additional measurement error to obtain and for each iteration and values obtain We then calculate the average estimate for each quantity over the iterations for each value, denoted as and extrapolate using a function ; we specifically use the quadratic and nonlinear functions as in the parametric setting. We denote the resulting estimator of as and define
In this function, parametric estimation is equivalent to Freedman's approach in the R.s.estimate documentation; nonparametric estimation is equivalent to the robust approach in the R.s.estimate documentation. Variance estimates for all estimators are calculated in this function based on derived closed form variance expressions. For all approaches, confidence intervals for can be constructed using a normal approximation; confidence intervals for can be constructed using either a normal approximation or using Fieller's method, all of which are provided in this function. Details regarding the asymptotic properties of these estimators and closed form variance calculation can be found in: Parast, L., Garcia, T. P., Prentice, R. L., & Carroll, R. J. (2022). Robust methods to correct for measurement error when evaluating a surrogate marker. Biometrics, 78(1), 9-23.
A list is returned:
R.naive |
the naive estimate of the proportion of treatment effect explained by the surrogate marker; only if naive = TRUE |
R.naive.var |
the estimated variance of the naive estimate of the proportion of treatment effect explained by the surrogate marker; only if naive = TRUE |
R.naive.CI.normal |
the 95% confidence interval using the normal approximation for the naive estimate of the proportion of treatment effect explained by the surrogate marker; only if naive = TRUE |
R.naive.CI.fieller |
the 95% confidence interval using Fieller's approach for the naive estimate of the proportion of treatment effect explained by the surrogate marker; only if naive = TRUE |
B1star.naive |
the naive estimate of the adjusted regression coefficient for treatment; only if naive = TRUE and Ronly = FALSE and parametric = TRUE |
B1star.naive.var |
the estimated variance of the naive estimate of the adjusted regression coefficient for treatment; only if naive = TRUE and Ronly = FALSE and parametric = TRUE |
B1star.naive.CI.normal |
the 95% confidence interval using the normal approximation for the naive estimate of the adjusted regression coefficient for treatment; only if naive = TRUE and Ronly = FALSE and parametric = TRUE |
deltas.naive |
the naive estimate of the residual treatment effect; only if naive = TRUE and Ronly = FALSE and parametric = FALSE |
deltas.naive.var |
the estimated variance of the naive estimate of the residual treatment effect; only if naive = TRUE and Ronly = FALSE and parametric = FALSE |
deltas.naive.CI.normal |
the 95% confidence interval using the normal approximation for the naive estimate of the residual treatment effect; only if naive = TRUE and Ronly = FALSE and parametric = FALSE |
R.corrected.dis |
the corrected disattenuated estimate of the proportion of treatment effect explained by the surrogate marker; only if parametric = TRUE and estimator ="d" |
R.corrected.var.dis |
the estimated variance of the corrected disattenuated estimate of the proportion of treatment effect explained by the surrogate marker; only if naive = TRUE |
R.corrected.CI.normal.dis |
the 95% confidence interval using the normal approximation for the corrected disattenuated estimate of the proportion of treatment effect explained by the surrogate marker; only if parametric = TRUE and estimator ="d" |
R.corrected.CI.fieller.dis |
the 95% confidence interval using Fieller's approach for the corrected disattenuated estimate of the proportion of treatment effect explained by the surrogate marker; only if parametric = TRUE and estimator ="d" |
B1star.corrected.dis |
the corrected disattenuated estimate of the adjusted regression coefficient for treatment; only if parametric = TRUE and estimator = "d" and Ronly = FALSE |
B1star.corrected.var.dis |
the estimated variance of the corrected disattenuated estimate of the adjusted regression coefficient for treatment; only if parametric = TRUE and estimator = "d" and Ronly = FALSE |
B1star.corrected.CI.normal.dis |
the 95% confidence interval using the normal approximation for the corrected disattenuated estimate of the adjusted regression coefficient for treatment; only if parametric = TRUE and estimator = "d" and Ronly = FALSE |
R.corrected.q |
the corrected SIMEX (quadratic) estimate of the proportion of treatment effect explained by the surrogate marker; only if estimator = "q" |
R.corrected.var.q |
the estimated variance of the corrected SIMEX (quadratic) estimate of the proportion of treatment effect explained by the surrogate marker; only if estimator = "q" |
R.corrected.CI.normal.q |
the 95% confidence interval using the normal approximation for the corrected SIMEX (quadratic) estimate of the proportion of treatment effect explained by the surrogate marker; only if estimator = "q" |
R.corrected.CI.fieller.q |
the 95% confidence interval using Fieller's approach for the corrected SIMEX (quadratic) estimate of the proportion of treatment effect explained by the surrogate marker; only if estimator = "q" |
B1star.corrected.q |
the corrected SIMEX (quadratic) estimate of the adjusted regression coefficient for treatment; only if estimator = "q" and Ronly = FALSE and parametric = TRUE |
B1star.corrected.var.q |
the estimated variance of the corrected SIMEX (quadratic) estimate of the adjusted regression coefficient for treatment; only if estimator = "q" and Ronly = FALSE and parametric = TRUE |
B1star.corrected.CI.normal.q |
the 95% confidence interval using the normal approximation for the corrected SIMEX (quadratic) estimate of the adjusted regression coefficient for treatment; only if estimator = "q" and Ronly = FALSE and parametric = TRUE |
deltas.corrected.q |
the corrected SIMEX (quadratic) estimate of the residual treatment effect; only if estimator = "q" and Ronly = FALSE and parametric = FALSE |
deltas.corrected.var.q |
the estimated variance of the corrected SIMEX (quadratic) estimate of the residual treatment effect; only if estimator = "q" and Ronly = FALSE and parametric = FALSE |
deltas.corrected.CI.normal.q |
the 95% confidence interval using the normal approximation for the corrected SIMEX (quadratic) estimate of the residual treatment effect; only if estimator = "q" and Ronly = FALSE and parametric = FALSE |
R.corrected.nl |
the corrected SIMEX (nonlinear) estimate of the proportion of treatment effect explained by the surrogate marker; only if estimator = "q" |
R.corrected.var.nl |
the estimated variance of the corrected SIMEX (nonlinear) estimate of the proportion of treatment effect explained by the surrogate marker; only if estimator = "q" |
R.corrected.CI.normal.nl |
the 95% confidence interval using the normal approximation for the corrected SIMEX (nonlinear) estimate of the proportion of treatment effect explained by the surrogate marker; only if estimator = "q" |
R.corrected.CI.fieller.nl |
the 95% confidence interval using Fieller's approach for the corrected SIMEX (nonlinear) estimate of the proportion of treatment effect explained by the surrogate marker; only if estimator = "q" |
B1star.corrected.nl |
the corrected SIMEX (nonlinear) estimate of the adjusted regression coefficient for treatment; only if estimator = "q" and Ronly = FALSE and parametric = TRUE |
B1star.corrected.var.nl |
the estimated variance of the corrected SIMEX (nonlinear) estimate of the adjusted regression coefficient for treatment; only if estimator = "q" and Ronly = FALSE and parametric = TRUE |
B1star.corrected.CI.normal.nl |
the 95% confidence interval using the normal approximation for the corrected SIMEX (nonlinear) estimate of the adjusted regression coefficient for treatment; only if estimator = "q" and Ronly = FALSE and parametric = TRUE |
deltas.corrected.nl |
the corrected SIMEX (nonlinear) estimate of the residual treatment effect; only if estimator = "q" and Ronly = FALSE and parametric = FALSE |
deltas.corrected.var.nl |
the estimated variance of the corrected SIMEX (nonlinear) estimate of the residual treatment effect; only if estimator = "q" and Ronly = FALSE and parametric = FALSE |
deltas.corrected.CI.normal.nl |
the 95% confidence interval using the normal approximation for the corrected SIMEX (nonlinear) estimate of the residual treatment effect; only if estimator = "q" and Ronly = FALSE and parametric = FALSE |
Layla Parast
Parast, L., Garcia, T. P., Prentice, R. L., & Carroll, R. J. (2022). Robust methods to correct for measurement error when evaluating a surrogate marker. Biometrics, 78(1), 9-23.
data(d_example_me) names(d_example_me) R.s.estimate.me(yone=d_example_me$y1, yzero=d_example_me$y0, sone=d_example_me$s1, szero=d_example_me$s0, parametric = TRUE, estimator = "d", me.variance = 0.5, naive= TRUE, Ronly = FALSE) R.s.estimate.me(yone=d_example_me$y1, yzero=d_example_me$y0, sone=d_example_me$s1, szero=d_example_me$s0, parametric = TRUE, estimator = "q", me.variance = 0.5, naive= FALSE, Ronly = TRUE) #estimating measurement error variance with replicates replicates = rbind(cbind(d_example_me$s1_rep1, d_example_me$s1_rep2, d_example_me$s1_rep3), cbind(d_example_me$s0_rep1, d_example_me$s0_rep2, d_example_me$s0_rep3)) mean.i = apply(replicates,1,mean, na.rm = TRUE) num.i = apply(replicates,1,function(x) sum(!is.na(x))) var.u = sum((replicates-mean.i)^2, na.rm = TRUE)/sum(num.i) var.u R.s.estimate.me(yone=d_example_me$y1, yzero=d_example_me$y0, sone=d_example_me$s1, szero=d_example_me$s0, parametric = TRUE, estimator = "d", me.variance = var.u, naive= TRUE, Ronly = FALSE) R.s.estimate.me(yone=d_example_me$y1, yzero=d_example_me$y0, sone=d_example_me$s1, szero=d_example_me$s0, parametric = FALSE, estimator = "q", me.variance = 0.5, naive= FALSE, Ronly = TRUE)data(d_example_me) names(d_example_me) R.s.estimate.me(yone=d_example_me$y1, yzero=d_example_me$y0, sone=d_example_me$s1, szero=d_example_me$s0, parametric = TRUE, estimator = "d", me.variance = 0.5, naive= TRUE, Ronly = FALSE) R.s.estimate.me(yone=d_example_me$y1, yzero=d_example_me$y0, sone=d_example_me$s1, szero=d_example_me$s0, parametric = TRUE, estimator = "q", me.variance = 0.5, naive= FALSE, Ronly = TRUE) #estimating measurement error variance with replicates replicates = rbind(cbind(d_example_me$s1_rep1, d_example_me$s1_rep2, d_example_me$s1_rep3), cbind(d_example_me$s0_rep1, d_example_me$s0_rep2, d_example_me$s0_rep3)) mean.i = apply(replicates,1,mean, na.rm = TRUE) num.i = apply(replicates,1,function(x) sum(!is.na(x))) var.u = sum((replicates-mean.i)^2, na.rm = TRUE)/sum(num.i) var.u R.s.estimate.me(yone=d_example_me$y1, yzero=d_example_me$y0, sone=d_example_me$s1, szero=d_example_me$s0, parametric = TRUE, estimator = "d", me.variance = var.u, naive= TRUE, Ronly = FALSE) R.s.estimate.me(yone=d_example_me$y1, yzero=d_example_me$y0, sone=d_example_me$s1, szero=d_example_me$s0, parametric = FALSE, estimator = "q", me.variance = 0.5, naive= FALSE, Ronly = TRUE)
This function calculates the proportion of treatment effect on the primary outcome explained by the surrogate marker information measured at and primary outcome information up to . 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. The user can also request an estimate of the incremental value of surrogate marker information.
R.s.surv.estimate(xone, xzero, deltaone, deltazero, sone, szero, t, weight.perturb = NULL, landmark, extrapolate = FALSE, transform = FALSE, conf.int = FALSE, var = FALSE, incremental.value = FALSE, approx = T)R.s.surv.estimate(xone, xzero, deltaone, deltazero, sone, szero, t, weight.perturb = NULL, landmark, extrapolate = FALSE, transform = FALSE, conf.int = FALSE, var = FALSE, incremental.value = 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. |
sone |
numeric vector; surrogate marker measurement at |
szero |
numeric vector; surrogate marker measurement at |
t |
the time of interest. |
weight.perturb |
weights used for perturbation resampling. |
landmark |
the landmark time |
extrapolate |
TRUE or FALSE; indicates whether the user wants to use extrapolation. |
transform |
TRUE or FALSE; indicates whether the user wants to use a transformation for the surrogate marker. |
conf.int |
TRUE or FALSE; indicates whether a 95% confidence interval for delta is requested, default is FALSE. |
var |
TRUE or FALSE; indicates whether a variance estimate is requested, default is FALSE. |
incremental.value |
TRUE or FALSE; indicates whether the user would like to see the incremental value of the surrogate marker information, 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 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 and denote the time of the primary outcome of interest, death for example, under the treatment and under the control, respectively. Let and denote the surrogate marker measured at time under the treatment and the control, respectively.
The residual treatment effect is defined as
where is the cumulative distribution function of conditional on and . The proportion of treatment effect explained by the surrogate marker information measured at and primary outcome information up to , which we denote by , can be expressed using a contrast between and :
The definition and estimation of is described in the delta.surv.estimate documentation.
Due to censoring, our data consist of observations from the treatment group and observations from the control group where , , denotes the censoring time, and denotes the surrogate marker information measured at time , for , for individual . Note that if , then should be NA (not available).
To estimate , we use a nonparametric kernel Nelson-Aalen estimator to estimate as , where
is a consistent estimate of is a smooth symmetric density function, is a given monotone transformation function, and is a specified bandwidth. To obtain an appropriate we first use bw.nrd to obtain ; and then we let with .
Since , we empirically estimate using all subjects with as
Subsequently, we construct an estimator for as
where is the Kaplan-Meier estimator of survival for censoring for Finally, we estimate as
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 . Variance estimates for and are calculated similarly. We construct two versions of the confidence interval for each estimate: one based on a normal approximation confidence interval using the estimated variance and another taking the 2.5th and 97.5th empirical percentile of the perturbed quantities. In addition, we use Fieller's method to obtain a third confidence interval for as
where and is the th percentile of
where .
Since the definition of considers the surrogate information as a combination of both information and information up to , a logical inquiry would be how to assess the incremental value of the information in terms of the proportion of treatment effect explained, when added to information up to . The proportion of treatment effect explained by information up to only is denoted as and is described in the documentation for R.t.surv.estimate. The incremental value of information is defined as:
For estimation of , see documentation for R.t.surv.estimate. The quantity is then estimated by . Perturbation-resampling is used for variance estimation and confidence interval construction for this quantity, similar to the other quantities in this package.
Note that if the observed supports for S are not the same, then for outside the support of may return NA (depending on the bandwidth). If extrapolation = TRUE, then the values for these surrogate values are set to the closest non-NA value. If transform = TRUE, then and are transformed such that the new transformed values, and are defined as: for where is the cumulative distribution function for a standard normal random variable, and and are the sample mean and standard deviation, respectively, of .
A list is returned:
delta |
the estimate, |
delta.s |
the estimate, |
R.s |
the estimate, |
delta.var |
the variance estimate of |
delta.s.var |
the variance estimate of |
R.s.var |
the variance estimate of |
conf.int.normal.delta |
a vector of size 2; the 95% confidence interval for |
conf.int.quantile.delta |
a vector of size 2; the 95% confidence interval for |
conf.int.normal.delta.s |
a vector of size 2; the 95% confidence interval for |
conf.int.quantile.delta.s |
a vector of size 2; the 95% confidence interval for |
conf.int.normal.R.s |
a vector of size 2; the 95% confidence interval for |
conf.int.quantile.R.s |
a vector of size 2; the 95% confidence interval for |
conf.int.fieller.R.s |
a vector of size 2; the 95% confidence interval for |
delta.t |
the estimate, |
R.t |
the estimate, |
incremental.value |
the estimate, |
delta.t.var |
the variance estimate of |
R.t.var |
the variance estimate of |
incremental.value.var |
the variance estimate of |
conf.int.normal.delta.t |
a vector of size 2; the 95% confidence interval for |
conf.int.quantile.delta.t |
a vector of size 2; the 95% confidence interval for |
conf.int.normal.R.t |
a vector of size 2; the 95% confidence interval for |
conf.int.quantile.R.t |
a vector of size 2; the 95% confidence interval for |
conf.int.fieller.R.t |
a vector of size 2; the 95% confidence interval for |
conf.int.normal.iv |
a vector of size 2; the 95% confidence interval for |
conf.int.quantile.iv |
a vector of size 2; the 95% confidence interval for |
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 observed support of the surrogate marker for the control group is outside the observed support of the surrogate marker for the treatment group, the user will receive the following message: "Warning: observed supports do not appear equal, may need to consider a transformation or extrapolation".
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)data(d_example_surv) names(d_example_surv)
This function calculates the proportion of treatment effect on the primary outcome explained by the treatment effect on the primary outcome up to . 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)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 |
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 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 . The proportion of treatment effect explained by T observed up to only is where
To estimate , we use the estimator where and for where is the Kaplan-Meier estimator of survival for censoring for
A list is returned:
delta |
the estimate, |
delta.t |
the estimate, |
R.t |
the estimate, |
delta.var |
the variance estimate of |
delta.t.var |
the variance estimate of |
R.t.var |
the variance estimate of |
conf.int.normal.delta |
a vector of size 2; the 95% confidence interval for |
conf.int.quantile.delta |
a vector of size 2; the 95% confidence interval for |
conf.int.normal.delta.t |
a vector of size 2; the 95% confidence interval for |
conf.int.quantile.delta.t |
a vector of size 2; the 95% confidence interval for |
conf.int.normal.R.t |
a vector of size 2; the 95% confidence interval for |
conf.int.quantile.R.t |
a vector of size 2; the 95% confidence interval for |
conf.int.fieller.R.t |
a vector of size 2; the 95% confidence interval for |
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".
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)data(d_example_surv) names(d_example_surv)