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.1 |
Built: | 2025-02-03 02:53:03 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
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 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. 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.a
First surrogate marker measurement for treated observations.
s1.b
Second surrogate marker measurement for treated observations.
s1.c
Third surrogate marker measurement for treated observations.
y1
Primary outcome for treated observations.
s0.a
First surrogate marker measurement for control observations.
s0.b
Second surrogate marker measurement for control observations.
s0.c
Third surrogate marker measurement for control observations.
y0
Primary outcome for control observations.
data(d_example) names(d_example)
data(d_example) names(d_example)
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:
s1
Surrogate 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.
x1
The 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.
delta1
The 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.
s0
Surrogate 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.
x0
The 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.
delta0
The 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:
s1
Surrogate 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.
x1
The 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.
delta1
The 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.
s0
Surrogate 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.
x0
The 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.
delta0
The 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.
z1
A baseline covariate value for treated observations.
z0
A 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". 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
Details can be found in Parast, L., Cai, T., Tian, L. (2020+). Evaluating Multiple Surrogate Markers with Censored Data. Under Review.
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". 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 higher values are better. 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)
delta.s.surv.estimate(xone, xzero, deltaone, deltazero, sone, szero, 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 |
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. |
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 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. 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". 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)
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, TP, Prentice, RL, Carroll, RJ (2019+). Robust Methods to Correct for Measurement Error when Evaluating a Surrogate Marker. Under Review.
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-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 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. |
Details can be found in Parast, L., Cai, T., Tian, L. (2020+). Evaluating Multiple Surrogate Markers with Censored Data. Under Review.
Please email [email protected] if you would like a copy of this article.
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". 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.
Details can be found in Parast, L., Cai, T., Tian, L. (2020+). Evaluating Multiple Surrogate Markers with Censored Data. Under Review.
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)
R.s.estimate(sone, szero, yone, yzero, var = FALSE, conf.int = FALSE, weight.perturb = NULL, number = "single", type = "robust",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; 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. |
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". 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 higher values are better. 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. |
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. |
Details can be found in Parast, L., Garcia, TP, Prentice, RL, Carroll, RJ (2019+). Robust Methods to Correct for Measurement Error when Evaluating a Surrogate Marker. Under Review.
Please email [email protected] if you would like a copy of this article.
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, TP, Prentice, RL, Carroll, RJ (2019+). Robust Methods to Correct for Measurement Error when Evaluating a Surrogate Marker. Under Review.
data(d_example) names(d_example) R.s.estimate.me(yone=d_example$y1, yzero=d_example$y0, sone=d_example$s1.a, szero=d_example$s0.a, parametric = TRUE, estimator = "d", me.variance = 0.5, naive= TRUE, Ronly = FALSE) R.s.estimate.me(yone=d_example$y1, yzero=d_example$y0, sone=d_example$s1.a, szero=d_example$s0.a, parametric = TRUE, estimator = "q", me.variance = 0.5, naive= FALSE, Ronly = TRUE) R.s.estimate.me(yone=d_example$y1, yzero=d_example$y0, sone=d_example$s1.a, szero=d_example$s0.a, parametric = FALSE, estimator = "q", me.variance = 0.5, naive= FALSE, Ronly = TRUE)
data(d_example) names(d_example) R.s.estimate.me(yone=d_example$y1, yzero=d_example$y0, sone=d_example$s1.a, szero=d_example$s0.a, parametric = TRUE, estimator = "d", me.variance = 0.5, naive= TRUE, Ronly = FALSE) R.s.estimate.me(yone=d_example$y1, yzero=d_example$y0, sone=d_example$s1.a, szero=d_example$s0.a, parametric = TRUE, estimator = "q", me.variance = 0.5, naive= FALSE, Ronly = TRUE) R.s.estimate.me(yone=d_example$y1, yzero=d_example$y0, sone=d_example$s1.a, szero=d_example$s0.a, 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 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. 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". 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)
data(d_example_surv) names(d_example_surv)