Package 'Rsurrogate'

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

Help Index


Calculates the augmented estimator of the proportion of treatment effect explained by the surrogate marker information measured at a specified time and primary outcome information up to that specified time

Description

This function calculates the augmented version of the proportion of treatment effect on the primary outcome explained by the surrogate marker information measured at t0t_0 and primary outcome information up to t0t_0. 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.

Usage

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)

Arguments

xone

numeric vector, the observed event times in the treatment group, X = min(T,C) where T is the time of the primary outcome and C is the censoring time.

xzero

numeric vector, the observed event times in the control group, X = min(T,C) where T is the time of the primary outcome and C is the censoring time.

deltaone

numeric vector, the event indicators for the treatment group, D = I(T<C) where T is the time of the primary outcome and C is the censoring time.

deltazero

numeric vector, the event indicators for the control group, D = I(T<C) where T is the time of the primary outcome and C is the censoring time.

sone

numeric vector; surrogate marker measurement at t0t_0 for treated observations, assumed to be continuous. If X1i<t0X_{1i}<t_0, then the surrogate marker measurement should be NA.

szero

numeric vector; surrogate marker measurement at t0t_0 for control observations, assumed to be continuous. If X1i<t0X_{1i}<t_0, then the surrogate marker measurement should be NA.

t

the time of interest.

weight.perturb

weights used for perturbation resampling.

landmark

the landmark time t0t_0 or time of surrogate marker measurement.

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 n1n_1 or a matrix with n1n_1 rows; this is the basis transformation used for augmentation of Δ^(t)\hat{\Delta}(t) for treated observations only, all values must be numeric

basis.delta.zero

either a vector of length n0n_0 or a matrix with n0n_0 rows; this is the basis transformation used for augmentation of Δ^(t)\hat{\Delta}(t) for control observations only, all values must be numeric

basis.delta.s.one

either a vector of length n1n_1 or a matrix with n1n_1 rows; this is the basis transformation used for augmentation of Δ^S(t,t0)\hat{\Delta}_S(t,t_0) for treated observations only, all values must be numeric; default is to assume this is the same as basis.delta.one i.e. that the same basis transformation is used for both quantities

basis.delta.s.zero

either a vector of length n0n_0 or a matrix with n0n_0 rows; this is the basis transformation used for augmentation of Δ^S(t,t0)\hat{\Delta}_S(t,t_0) for control observations only, all values must be numeric; default is to assume this is the same as basis.delta.zero i.e. that the same basis transformation is used for both quantities

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

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 ZZ, and the primary outcome. This function calculates the augmented estimates of the quantities of interest. For example, the augmented version of Δ^(t)\hat{\Delta}(t) is defined as:

Δ^(t)AUG=Δ^(t)+γ{n11i=1n1h(Z1i)n01i=1n0h(Z0i)}\hat{\Delta}(t)^{AUG} = \hat{\Delta}(t) + \gamma \{n_1^{-1}\sum_{i=1}^{n_1}h(Z_{1i})-n_0^{-1}\sum_{i=1}^{n_0}h(Z_{0i}) \}

where Zgi,i=1,2,,ngZ_{gi}, i=1, 2, \cdots, n_g are i.i.d. random vectors of baseline covariates from treatment group gg and h()h(\cdot) is a basis transformation given a priori. Due to treatment randomization, {n11i=1n1h(Z1i)n01i=1n0h(Z0i)}\{n_1^{-1}\sum_{i=1}^{n_1}h(Z_{1i})-n_0^{-1}\sum_{i=1}^{n_0}h(Z_{0i}) \} 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 γ\gamma is selected such that the variance of Δ^(t)AUG\hat{\Delta}(t)^{AUG} is minimized. That is, γ=(Ξ12)(Ξ22)1\gamma = (\Xi_{12}) ( \Xi_{22} ) ^{-1} where

Ξ12=cov{Δ^(t),n11i=1n1h(Z1i)n01i=1n0h(Z0i)},\Xi_{12} = \mbox{cov} \{ \hat{\Delta}(t), n_1^{-1}\sum_{i=1}^{n_1}h(Z_{1i})-n_0^{-1}\sum_{i=1}^{n_0}h(Z_{0i}) \},

Ξ22=var{n11i=1n1h(Z1i)n01i=1n0h(Z0i)}\Xi_{22} = \mbox{var} \{n_1^{-1}\sum_{i=1}^{n_1}h(Z_{1i})-n_0^{-1}\sum_{i=1}^{n_0}h(Z_{0i})\}

and thus we can obtain Δ^(t)AUG\hat{\Delta}(t)^{AUG} by replacing γ\gamma with a consistent estimator, γ^\hat{\gamma} obtained using perturbation-resampling. A similar approach is used to obtain Δ^S(t)AUG\hat{\Delta}_S(t)^{AUG} and thus construct

R^S(t,t0)AUG=1Δ^S(t,t0)AUGΔ^(t)AUG.\hat{R}_S(t,t_0)^{AUG}=1-\frac{\hat{\Delta}_S(t,t_0)^{AUG}}{\hat{\Delta}(t)^{AUG}}.

Value

A list is returned:

aug.delta

the estimate, Δ^(t)AUG\hat{\Delta}(t)^{AUG}.

aug.delta.s

the estimate, Δ^S(t,t0)AUG\hat{\Delta}_S(t,t_0)^{AUG}.

aug.R.s

the estimate, R^S(t,t0)AUG\hat{R}_S(t,t_0)^{AUG}.

aug.delta.var

the variance estimate of Δ^(t)AUG\hat{\Delta}(t)^{AUG}.

aug.delta.s.var

the variance estimate of Δ^S(t,t0)AUG\hat{\Delta}_S(t,t_0)^{AUG}.

aug.R.s.var

the variance estimate of R^S(t,t0)AUG\hat{R}_S(t,t_0)^{AUG}.

conf.int.normal.aug.delta

a vector of size 2; the 95% confidence interval for Δ^(t)AUG\hat{\Delta}(t)^{AUG} based on a normal approximation.

conf.int.quantile.aug.delta

a vector of size 2; the 95% confidence interval for Δ^(t)AUG\hat{\Delta}(t)^{AUG} based on sample quantiles of the perturbed values.

conf.int.normal.aug.delta.s

a vector of size 2; the 95% confidence interval for Δ^S(t,t0)AUG\hat{\Delta}_S(t,t_0)^{AUG} based on a normal approximation.

conf.int.quantile.aug.delta.s

a vector of size 2; the 95% confidence interval for Δ^S(t,t0)AUG\hat{\Delta}_S(t,t_0)^{AUG} based on sample quantiles of the perturbed values.

conf.int.normal.R.s

a vector of size 2; the 95% confidence interval for R^S(t,t0)AUG\hat{R}_S(t,t_0)^{AUG} based on a normal approximation.

conf.int.quantile.aug.R.s

a vector of size 2; the 95% confidence interval for R^S(t,t0)AUG\hat{R}_S(t,t_0)^{AUG} based on sample quantiles of the perturbed values..

conf.int.fieller.aug.R.s

a vector of size 2; the 95% confidence interval for R^S(t,t0)AUG\hat{R}_S(t,t_0)^{AUG} based on Fieller's approach.

aug.delta.t

the estimate, Δ^T(t,t0)AUG\hat{\Delta}_T(t,t_0)^{AUG}; if incremental.vaue = TRUE.

aug.R.t

the estimate, R^T(t,t0)AUG\hat{R}_T(t,t_0)^{AUG}; if incremental.vaue = TRUE.

aug.incremental.value

the estimate, IV^S(t,t0)AUG\hat{IV}_S(t,t_0)^{AUG}; if incremental.vaue = TRUE.

aug.delta.t.var

the variance estimate of Δ^T(t,t0)AUG\hat{\Delta}_T(t,t_0)^{AUG}; if incremental.vaue = TRUE.

aug.R.t.var

the variance estimate of R^T(t,t0)AUG\hat{R}_T(t,t_0)^{AUG}; if incremental.vaue = TRUE.

aug.incremental.value.var

the variance estimate of IV^S(t,t0)AUG\hat{IV}_S(t,t_0)^{AUG}; if incremental.vaue = TRUE.

aug.conf.int.normal.delta.t

a vector of size 2; the 95% confidence interval for Δ^T(t,t0)AUG\hat{\Delta}_T(t,t_0)^{AUG} based on a normal approximation; if incremental.vaue = TRUE.

aug.conf.int.quantile.delta.t

a vector of size 2; the 95% confidence interval for Δ^T(t,t0)AUG\hat{\Delta}_T(t,t_0)^{AUG} based on sample quantiles of the perturbed values; if incremental.vaue = TRUE.

aug.conf.int.normal.R.t

a vector of size 2; the 95% confidence interval for R^T(t,t0)AUG\hat{R}_T(t,t_0)^{AUG} based on a normal approximation; if incremental.vaue = TRUE.

aug.conf.int.quantile.R.t

a vector of size 2; the 95% confidence interval for R^T(t,t0)AUG\hat{R}_T(t,t_0)^{AUG} based on sample quantiles of the perturbed values; if incremental.vaue = TRUE.

aug.conf.int.fieller.R.t

a vector of size 2; the 95% confidence interval for R^T(t,t0)AUG\hat{R}_T(t,t_0)^{AUG} based on Fieller's approach, described above; if incremental.vaue = TRUE.

aug.conf.int.normal.iv

a vector of size 2; the 95% confidence interval for IV^S(t,t0)AUG\hat{IV}_S(t,t_0)^{AUG} based on a normal approximation; if incremental.vaue = TRUE.

aug.conf.int.quantile.iv

a vector of size 2; the 95% confidence interval for IV^S(t,t0)AUG\hat{IV}_S(t,t_0)^{AUG} based on sample quantiles of the perturbed values; if incremental.vaue = TRUE.

Note

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".

Author(s)

Layla Parast

References

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.

Examples

#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

Description

Hypothetical data to be used in examples.

Usage

data(d_example)

Format

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.

Examples

data(d_example)
names(d_example)

Hypothetical survival data with multiple surrogate markers

Description

Hypothetical survival data with multiple surrogate markers to be used in examples.

Usage

data(d_example_multiple)

Format

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.

Examples

data(d_example_multiple)
names(d_example_multiple)

Hypothetical survival data

Description

Hypothetical survival data to be used in examples.

Usage

data(d_example_surv)

Format

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.

Examples

data(d_example_surv)
names(d_example_surv)

Calculates treatment effect

Description

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.

Usage

delta.estimate(yone,yzero, var = FALSE, conf.int = FALSE, weight = NULL, 
weight.perturb = NULL)

Arguments

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.

Details

Let Y(1)Y^{(1)} and Y(0)Y^{(0)} denote the primary outcome under the treatment and primary outcome under the control,respectively. The treatment effect, Δ\Delta, is the expected difference in Y(1)Y^{(1)} compared to Y(0)Y^{(0)}, Δ=E(Y(1)Y(0)).\Delta=E(Y^{(1)}-Y^{(0)}). We estimate Δ\Delta as

Δ^=n11i=1n1Y1in01i=1n0Y0i\hat{\Delta} = n_1^{-1} \sum_{i=1}^{n_1} Y_{1i} - n_0^{-1} \sum_{i=1}^{n_0} Y_{0i}

where Y1iY_{1i} is the observed primary outcome for person ii in the treated group, Y0iY_{0i} is the observed primary outcome for person ii in the control group, and n1n_1 and n0n_0 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 {V(b)=(V11(b),...V1n1(b),V01(b),...V0n0(b))T,b=1,....,D}\left \{ V^{(b)} = (V_{11}^{(b)}, ...V_{1n_1}^{(b)}, V_{01}^{(b)}, ...V_{0n_0}^{(b)})^T, b=1,....,D \right \} be n×Dn \times D independent copies of a positive random variables VV from a known distribution with unit mean and unit variance. Let

Δ^(b)=i=1n1V1i(b)Y1ii=1n1V1i(b)i=1n0V0i(b)Y0ii=1n0V0i(b).\hat{\Delta}^{(b)} = \frac{ \sum_{i=1}^{n_1} V_{1i}^{(b)} Y_{1i}}{ \sum_{i=1}^{n_1} V_{1i}^{(b)}} - \frac{ \sum_{i=1}^{n_0} V_{0i}^{(b)} Y_{0i}}{ \sum_{i=1}^{n_0} V_{0i}^{(b)}}.

The variance of Δ^\hat{\Delta} is obtained as the empirical variance of {Δ^(b),b=1,...,D}.\{\hat{\Delta}^{(b)}, b = 1,...,D\}. In this package, we use weights generated from an Exponential(1) distribution and use D=500D=500. We construct two versions of the 95%95\% confidence interval for Δ^\hat{\Delta}: one based on a normal approximation confidence interval using the estimated variance and another taking the 2.5th and 97.5th empirical percentiles of Δ^(b)\hat{\Delta}^{(b)}.

Value

A list is returned:

delta

the estimate, Δ^\hat{\Delta}, described above.

var

the variance estimate of Δ^\hat{\Delta}; if var = TRUE or conf.int = TRUE.

conf.int.normal

a vector of size 2; the 95% confidence interval for Δ^\hat{\Delta} based on a normal approximation; if conf.int = TRUE.

conf.int.quantile

a vector of size 2; the 95% confidence interval for Δ^\hat{\Delta} based on sample quantiles of the perturbed values, described above; if conf.int = TRUE.

Author(s)

Layla Parast

Examples

data(d_example)
names(d_example)
delta.estimate(yone=d_example$y1, yzero=d_example$y0)

Calculates robust residual treatment effect accounting for multiple surrogate markers at a specified time and primary outcome information up to that specified time

Description

This function calculates the robust estimate of the residual treatment effect accounting for multiple surrogate markers measured at t0t_0 and primary outcome information up to t0t_0 i.e. the hypothetical treatment effect if both the surrogate marker distributions at t0t_0 and survival up to t0t_0 in the treatment group look like the surrogate marker distributions and survival up to t0t_0 in the control group. Ideally this function is only used as a helper function and is not directly called.

Usage

delta.multiple.surv(xone, xzero, deltaone, deltazero, sone, szero, type =1, t, 
weight.perturb = NULL, landmark, extrapolate = FALSE, transform = FALSE,
approx = T)

Arguments

xone

numeric vector, the observed event times in the treatment group, X = min(T,C) where T is the time of the primary outcome and C is the censoring time.

xzero

numeric vector, the observed event times in the control group, X = min(T,C) where T is the time of the primary outcome and C is the censoring time.

deltaone

numeric vector, the event indicators for the treatment group, D = I(T<C) where T is the time of the primary outcome and C is the censoring time.

deltazero

numeric vector, the event indicators for the control group, D = I(T<C) where T is the time of the primary outcome and C is the censoring time.

sone

matrix of numeric values; surrogate marker measurements at t0t_0 for treated observations. If X1i<t0X_{1i}<t_0, then the surrogate marker measurements should be NA.

szero

matrix of numeric values; surrogate marker measurements at t0t_0 for control observations. If X0i<t0X_{0i}<t_0, then the surrogate marker measurements should be NA.

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 t0t_0 or time of surrogate marker measurement.

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

Details are included in the documentation for R.multiple.surv.

Value

Δ^S(t,t0)\hat{\Delta}_S(t,t_0), the residual treatment effect estimate accounting for multiple surrogarte markers measured at t0t_0 and primary outcome information up to t0t_0.

Note

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.

Author(s)

Layla Parast

References

Details can be found in Parast, L., Cai, T., Tian, L. (2020+). Evaluating Multiple Surrogate Markers with Censored Data. Under Review.

Examples

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)

Calculates model-based or robust residual treatment effect

Description

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.

Usage

delta.s.estimate(sone, szero, yone, yzero, weight.perturb = NULL, number="single",
type="robust", warn.te = FALSE, warn.support = FALSE, extrapolate = FALSE, 
transform = FALSE)

Arguments

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 n1n_1 (number of treated observations) rows and n.s (number of surrogate markers) columns.

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 n0n_0 (number of control observations) rows and n.s (number of surrogate markers) columns.

yone

numeric vector; primary outcome for treated observations.

yzero

numeric vector; primary outcome for control observations.

weight.perturb

a n1+n0n_1+n_0 by x matrix of weights where n1=n_1 = length of yone and n0=n_0 = length of yzero; generally used for variance estimation and confidence interval construction, default is null.

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

Details are included in the documentation for R.s.estimate.

Value

Δ^S\hat{\Delta}_S, the model-based or robust residual treatment effect estimate.

Note

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".

Author(s)

Layla Parast

References

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.

Examples

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")

Calculates robust residual treatment effect accounting for surrogate marker information measured at a specified time and primary outcome information up to that specified time

Description

This function calculates the robust estimate of the residual treatment effect accounting for surrogate marker information measured at t0t_0 and primary outcome information up to t0t_0 i.e. the hypothetical treatment effect if both the surrogate marker distribution at t0t_0 and survival up to t0t_0 in the treatment group look like the surrogate marker distribution and survival up to t0t_0 in the control group. Ideally this function is only used as a helper function and is not directly called.

Usage

delta.s.surv.estimate(xone, xzero, deltaone, deltazero, sone, szero, t, 
weight.perturb = NULL, landmark, extrapolate = FALSE, transform = FALSE,
approx = T)

Arguments

xone

numeric vector, the observed event times in the treatment group, X = min(T,C) where T is the time of the primary outcome and C is the censoring time.

xzero

numeric vector, the observed event times in the control group, X = min(T,C) where T is the time of the primary outcome and C is the censoring time.

deltaone

numeric vector, the event indicators for the treatment group, D = I(T<C) where T is the time of the primary outcome and C is the censoring time.

deltazero

numeric vector, the event indicators for the control group, D = I(T<C) where T is the time of the primary outcome and C is the censoring time.

sone

numeric vector; surrogate marker measurement at t0t_0 for treated observations, assumed to be continuous. If X1i<t0X_{1i}<t_0, then the surrogate marker measurement should be NA.

szero

numeric vector; surrogate marker measurement at t0t_0 for control observations, assumed to be continuous. If X1i<t0X_{1i}<t_0, then the surrogate marker measurement should be NA.

t

the time of interest.

weight.perturb

weights used for perturbation resampling.

landmark

the landmark time t0t_0 or time of surrogate marker measurement.

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

Details are included in the documentation for R.s.surv.estimate.

Value

Δ^S(t,t0)\hat{\Delta}_S(t,t_0), the robust residual treatment effect estimate accounting for surrogate marker information measured at t0t_0 and primary outcome information up to t0t_0.

Note

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".

Author(s)

Layla Parast

References

Parast, L., Cai, T., & Tian, L. (2017). Evaluating surrogate marker information using censored data. Statistics in Medicine, 36(11), 1767-1782.

Examples

data(d_example_surv)
names(d_example_surv)

Calculates treatment effect in a survival setting

Description

This function calculates the treatment effect in the survival setting i.e. the difference in survival at time t between the treatment group and the control group. The user can also request a variance estimate, estimated using perturbating-resampling, and a 95% confidence interval. If a confidence interval is requested two versions are provided: a normal approximation based interval and a quantile based interval, both use perturbation-resampling.

Usage

delta.surv.estimate(xone, xzero, deltaone, deltazero, t, var = FALSE, conf.int 
= FALSE, weight = NULL, weight.perturb = NULL, approx = T)

Arguments

xone

numeric vector, the observed event times in the treatment group, X = min(T,C) where T is the time of the primary outcome and C is the censoring time.

xzero

numeric vector, the observed event times in the control group, X = min(T,C) where T is the time of the primary outcome and C is the censoring time.

deltaone

numeric vector, the event indicators for the treatment group, D = I(T<C) where T is the time of the primary outcome and C is the censoring time.

deltazero

numeric vector, the event indicators for the control group, D = I(T<C) where T is the time of the primary outcome and C is the censoring time.

t

the time of interest.

var

TRUE or FALSE; indicates whether a variance estimate for delta is requested, default is FALSE.

conf.int

TRUE or FALSE; indicates whether a 95% confidence interval for delta is requested, default is FALSE.

weight

a n1+n0n_1+n_0 by xx matrix of weights where n1=n_1 = sample size in treatment group and n0=n_0 = sample size in the control group, default is null; generally not supplied by use but only used by other functions.

weight.perturb

a n1+n0n_1+n_0 by xx matrix of weights where n1=n_1 =sample size in treatment group and n0=n_0 = sample size in the control group, default is null; generally used for confidence interval construction and may be supplied by user.

approx

TRUE or FALSE indicating whether an approximation should be used when calculating the probability of censoring; most relevant in settings where the survival time of interest for the primary outcome is greater than the last observed event but before the last censored case, default is TRUE.

Details

Let GG be the binary treatment indicator with G=1G=1 for treatment and G=0G=0 for control and we assume throughout that subjects are randomly assigned to a treatment group at baseline. Let TT denote the time of the primary outcome of interest, death for example. We use potential outcomes notation such that T(g)T^{(g)} denotes the time of the primary outcome under treatment G=gG = g. We define the treatment effect, Δ(t)\Delta(t), as the difference in survival rates by time tt under treatment versus control,

Δ(t)=E{I(T(1)>t)}E{I(T(0)>t)}=P(T(1)>t)P(T(0)>t)\Delta(t)=E\{ I(T^{(1)}>t)\} - E\{I(T^{(0)}>t)\} = P(T^{(1)}>t) - P(T^{(0)}>t)

where t>t0t>t_0

Due to censoring, our data consist of n1n_1 observations {(X1i,δ1i),i=1,...,n1}\{(X_{1i}, \delta_{1i}), i=1,...,n_1\} from the treatment group G=1G=1 and n0n_0 observations {(X0i,δ0i),i=1,...,n0}\{(X_{0i}, \delta_{0i}), i=1,...,n_0\} from the control group G=0G=0 where Xgi=min(Tgi,Cgi)X_{gi} = \min(T_{gi}, C_{ gi}), δgi=I(Tgi<Cgi)\delta_{gi} = I(T_{gi} < C_{gi}), and CgiC_{gi} denotes the censoring time for g=1,0g= 1,0, for individual ii. Throughout, we estimate the treatment effect Δ(t)\Delta(t) as

Δ^(t)=n11i=1n1I(X1i>t)W^1C(t)n01i=1n0I(X0i>t)W^0C(t)\hat{\Delta}(t) = n_1^{-1} \sum_{i=1}^{n_1} \frac{I(X_{1i}>t)}{\hat{W}^C_1(t)} - n_0^{-1} \sum_{i=1}^{n_0} \frac{I(X_{0i}>t)}{\hat{W}^C_0(t)}

where W^gC()\hat{W}^C_g(\cdot) is the Kaplan-Meier estimator of survival for censoring for g=1,0.g=1,0.

Variance estimation and confidence interval construction are performed using perturbation-resampling. Specifically, let {V(b)=(V11(b),...V1n1(b),V01(b),...V0n0(b))T,b=1,....,D}\left \{ V^{(b)} = (V_{11}^{(b)}, ...V_{1n_1}^{(b)}, V_{01}^{(b)}, ...V_{0n_0}^{(b)})^T, b=1,....,D \right \} be n×Dn \times D independent copies of a positive random variables VV from a known distribution with unit mean and unit variance. Let

Δ^(b)(t)=i=1n1V1i(b)I(X1i>t)i=1n1V1i(b)W^1C(b)(t)i=1n0V0i(b)I(X0i>t)i=1n0V0i(b)W^0C(b)(t).\hat{\Delta}^{(b)} (t) = \frac{ \sum_{i=1}^{n_1} V_{1i}^{(b)} I(X_{1i}>t)}{ \sum_{i=1}^{n_1} V_{1i}^{(b)} \hat{W}_1^{C(b)}(t)} -\frac{ \sum_{i=1}^{n_0} V_{0i}^{(b)} I(X_{0i}>t)}{ \sum_{i=1}^{n_0} V_{0i}^{(b)} \hat{W}_0^{C(b)}(t)}.

In this package, we use weights generated from an Exponential(1) distribution and use D=500D=500. The variance of Δ^(t)\hat{\Delta}(t) is obtained as the empirical variance of {Δ^(t)(b),b=1,...,D}.\{\hat{\Delta}(t)^{(b)}, b = 1,...,D\}. We construct two versions of the 95%95\%confidence interval for Δ^(t)\hat{\Delta}(t): one based on a normal approximation confidence interval using the estimated variance and another taking the 2.5th and 97.5th empirical percentiles of Δ^(t)(b)\hat{\Delta}(t)^{(b)}.

Value

A list is returned:

delta

the estimate, Δ^(t)\hat{\Delta}(t), described above.

var

the variance estimate of Δ^(t)\hat{\Delta}(t); if var = TRUE or conf.int = TRUE.

conf.int.normal

a vector of size 2; the 95% confidence interval for Δ^(t)\hat{\Delta}(t) based on a normal approximation; if conf.int = TRUE.

conf.int.quantile

a vector of size 2; the 95% confidence interval for Δ^(t)\hat{\Delta}(t) based on sample quantiles of the perturbed values, described above; if conf.int = TRUE.

Author(s)

Layla Parast

Examples

data(d_example_surv)
names(d_example_surv)
delta.surv.estimate(xone = d_example_surv$x1, xzero = d_example_surv$x0,  
deltaone = d_example_surv$delta1, deltazero = d_example_surv$delta0, t = 3)

Calculates robust residual treatment effect accounting only for primary outcome information up to a specified time

Description

This function calculates the robust estimate of the residual treatment effect accounting only for primary outcome information up to t0t_0 i.e. the hypothetical treatment effect if survival up to t0t_0 in the treatment group looks like survival up to t0t_0 in the control group. Ideally this function is only used as a helper function and is not directly called.

Usage

delta.t.surv.estimate(xone, xzero, deltaone, deltazero, t, weight.perturb = NULL,
landmark, approx = T)

Arguments

xone

numeric vector, the observed event times in the treatment group, X = min(T,C) where T is the time of the primary outcome and C is the censoring time.

xzero

numeric vector, the observed event times in the control group, X = min(T,C) where T is the time of the primary outcome and C is the censoring time.

deltaone

numeric vector, the event indicators for the treatment group, D = I(T<C) where T is the time of the primary outcome and C is the censoring time.

deltazero

numeric vector, the event indicators for the control group, D = I(T<C) where T is the time of the primary outcome and C is the censoring time.

t

the time of interest.

weight.perturb

weights used for perturbation resampling.

landmark

the landmark time t0t_0 or time of surrogate marker measurement.

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

Details are included in the documentation for R.t.surv.estimate.

Value

Δ^T(t,t0)\hat{\Delta}_T(t,t_0), the robust residual treatment effect estimate accounting only for survival up to t0t_0.

Note

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.

Author(s)

Layla Parast

References

Parast, L., Cai, T., & Tian, L. (2017). Evaluating surrogate marker information using censored data. Statistics in Medicine, 36(11), 1767-1782.

Examples

data(d_example_surv)
names(d_example_surv)

Constructs Fieller's confidence interval.

Description

Constructs Fieller's confidence interval.

Usage

fieller.ci(perturb.delta.s, perturb.delta, delta.s, delta)

Arguments

perturb.delta.s

numeric vector; the perturbed values for Δ^S\hat{\Delta}_S, the residual treatment effect estimate, used in variance estimation and confidence interval construction.

perturb.delta

numeric vector; the perturbed values for Δ^\hat{\Delta}, the treatment effect estimate, used in variance estimation and confidence interval construction.

delta.s

the residual treatment effect, ΔS\Delta_S, estimate, Δ^S\hat{\Delta}_S.

delta

the treatment effect, Δ\Delta, estimate, Δ^\hat{\Delta}.

Details

See documention for R.s.estimate for more detail.

Value

Returns a vector of length 2, lower bound of the 95% confidence interval and upper bound of the 95% confidence interval.

Author(s)

Layla Parast

References

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.

Description

Estimates measurement error variance given replicate data using a simple components of variance analysis.

Usage

me.variance.estimate(replicates)

Arguments

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.

Details

Estimates measurement error variance given replicate data using a simple components of variance analysis.

Value

estimate of measurement error variance

Author(s)

Layla Parast

References

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.


Calculates the proportion of treatment effect explained by multiple surrogate markers measured at a specified time and primary outcome information up to that specified time

Description

This function calculates the proportion of treatment effect on the primary outcome explained by multiple surrogate markers measured at t0t_0 and primary outcome information up to t0t_0. The user can also request a variance estimate, estimated using perturbating-resampling, and a 95% confidence interval. If a confidence interval is requested three versions are provided: a normal approximation based interval, a quantile based interval and Fieller's confidence interval, all using perturbation-resampling. The user can also request an estimate of the incremental value of the surrogate marker information.

Usage

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)

Arguments

xone

numeric vector, the observed event times in the treatment group, X = min(T,C) where T is the time of the primary outcome and C is the censoring time.

xzero

numeric vector, the observed event times in the control group, X = min(T,C) where T is the time of the primary outcome and C is the censoring time.

deltaone

numeric vector, the event indicators for the treatment group, D = I(T<C) where T is the time of the primary outcome and C is the censoring time.

deltazero

numeric vector, the event indicators for the control group, D = I(T<C) where T is the time of the primary outcome and C is the censoring time.

sone

matrix of numeric values; surrogate marker measurements at t0t_0 for treated observations. If X1i<t0X_{1i}<t_0, then the surrogate marker measurements should be NA.

szero

matrix of numeric values; surrogate marker measurements at t0t_0 for control observations. If X0i<t0X_{0i}<t_0, then the surrogate marker measurements should be NA.

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 t0t_0 or time of surrogate marker measurement.

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

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.

Value

A list is returned:

delta

the estimate, Δ^(t)\hat{\Delta}(t), described in delta.estimate documentation.

delta.s

the residual treatment effect estimate, Δ^S(t,t0)\hat{\Delta}_S(t,t_0).

R.s

the estimated proportion of treatment effect explained by the set of markers, R^S(t,t0)\hat{R}_S(t,t_0).

delta.var

the variance estimate of Δ^(t)\hat{\Delta}(t); if var = TRUE or conf.int = TRUE.

delta.s.var

the variance estimate of Δ^S(t,t0)\hat{\Delta}_S(t,t_0); if var = TRUE or conf.int = TRUE.

R.s.var

the variance estimate of R^S(t,t0)\hat{R}_S(t,t_0); if var = TRUE or conf.int = TRUE.

conf.int.normal.delta

a vector of size 2; the 95% confidence interval for Δ^(t)\hat{\Delta}(t) based on a normal approximation; if conf.int = TRUE.

conf.int.quantile.delta

a vector of size 2; the 95% confidence interval for Δ^(t)\hat{\Delta}(t) based on sample quantiles of the perturbed values; if conf.int = TRUE.

conf.int.normal.delta.s

a vector of size 2; the 95% confidence interval for Δ^S(t,t0)\hat{\Delta}_S(t,t_0) based on a normal approximation; if conf.int = TRUE.

conf.int.quantile.delta.s

a vector of size 2; the 95% confidence interval for Δ^S(t,t0)\hat{\Delta}_S(t,t_0) based on sample quantiles of the perturbed values; if conf.int = TRUE.

conf.int.normal.R.s

a vector of size 2; the 95% confidence interval for R^S(t,t0)\hat{R}_S(t,t_0) based on a normal approximation; if conf.int = TRUE.

conf.int.quantile.R.s

a vector of size 2; the 95% confidence interval for R^S(t,t0)\hat{R}_S(t,t_0) based on sample quantiles of the perturbed values; if conf.int = TRUE.

conf.int.fieller.R.s

a vector of size 2; the 95% confidence interval for R^S(t,t0)\hat{R}_S(t,t_0) based on Fieller's approach; if conf.int = TRUE.

delta.t

the estimate, Δ^T(t,t0)\hat{\Delta}_T(t,t_0); if incremental.vaue = TRUE.

R.t

the estimated proportion of treatment effect explained by survival only, R^T(t,t0)\hat{R}_T(t,t_0); if incremental.vaue = TRUE.

incremental.value

the estimate of the incremental value of the surrogate markers, IV^S(t,t0)\hat{IV}_S(t,t_0); if incremental.vaue = TRUE.

delta.t.var

the variance estimate of Δ^T(t,t0)\hat{\Delta}_T(t,t_0); if var = TRUE or conf.int = TRUE and incremental.vaue = TRUE.

R.t.var

the variance estimate of R^T(t,t0)\hat{R}_T(t,t_0); if var = TRUE or conf.int = TRUE and incremental.vaue = TRUE.

incremental.value.var

the variance estimate of IV^S(t,t0)\hat{IV}_S(t,t_0); if var = TRUE or conf.int = TRUE and incremental.vaue = TRUE.

conf.int.normal.delta.t

a vector of size 2; the 95% confidence interval for Δ^T(t,t0)\hat{\Delta}_T(t,t_0) based on a normal approximation; if conf.int = TRUE and incremental.vaue = TRUE.

conf.int.quantile.delta.t

a vector of size 2; the 95% confidence interval for Δ^T(t,t0)\hat{\Delta}_T(t,t_0) based on sample quantiles of the perturbed values; if conf.int = TRUE and incremental.vaue = TRUE.

conf.int.normal.R.t

a vector of size 2; the 95% confidence interval for R^T(t,t0)\hat{R}_T(t,t_0) based on a normal approximation; if conf.int = TRUE and incremental.vaue = TRUE.

conf.int.quantile.R.t

a vector of size 2; the 95% confidence interval for R^T(t,t0)\hat{R}_T(t,t_0) based on sample quantiles of the perturbed values; if conf.int = TRUE and incremental.vaue = TRUE.

conf.int.fieller.R.t

a vector of size 2; the 95% confidence interval for R^T(t,t0)\hat{R}_T(t,t_0) based on Fieller's approach; if conf.int = TRUE and incremental.vaue = TRUE.

conf.int.normal.iv

a vector of size 2; the 95% confidence interval for IV^S(t,t0)\hat{IV}_S(t,t_0) based on a normal approximation; if conf.int = TRUE and incremental.vaue = TRUE.

conf.int.quantile.iv

a vector of size 2; the 95% confidence interval for IV^S(t,t0)\hat{IV}_S(t,t_0) based on sample quantiles of the perturbed values; if conf.int = TRUE and incremental.vaue = TRUE.

Note

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.

Author(s)

Layla Parast

References

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.

Examples

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)

Calculates the proportion of treatment effect explained

Description

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.

Usage

R.s.estimate(sone, szero, yone, yzero, var = FALSE, conf.int = FALSE, 
weight.perturb = NULL, number = "single", type = "robust",extrapolate = FALSE, 
transform = FALSE)

Arguments

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 n1n_1 (number of treated observations) rows and n.s (number of surrogate markers) columns.

szero

numeric vector; surrogate marker for control observations, assumed to be continuous.If there are multiple surrogates then this should be a matrix with n0n_0 (number of control observations) rows and n.s (number of surrogate markers) columns.

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 n1+n0n_1+n_0 by xx matrix of weights where n1=n_1 = length of yone and n0=n_0 = length of yzero; used for perturbation-resampling, default is null.

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.

Details

Let Y(1)Y^{(1)} and Y(0)Y^{(0)} denote the primary outcome under the treatment and primary outcome under the control,respectively. Let S(1)S^{(1)} and S(0)S^{(0)} denote the surrogate marker under the treatment and the surrogate marker under the control,respectively. The residual treatment effect is defined as

ΔS=E(Y(1)S(1)=s)dF0(s)E(Y(0)S(0)=s)dF0(s),\Delta_S=\int_{-\infty}^{\infty} E(Y^{(1)}|S^{(1)}=s) dF_0(s) - \int_{-\infty}^{\infty} E(Y^{(0)}|S^{(0)}=s) dF_0(s),

where ΔS(s)=E(Y(1)S(1)=s)E(Y(0)S(0)=s)\Delta_S(s)= E(Y^{(1)}|S^{(1)}=s)-E(Y^{(0)}|S^{(0)}=s) and F0()F_0(\cdot) is the marginal cumulative distribution function of S(0)S^{(0)}, the surrogate marker measure under the control. The proportion of treatment effect explained by the surrogate marker, which we denote by RSR_S, can be expressed using a contrast between ΔS\Delta_S and Δ\Delta:

RS={ΔΔS}/Δ=1ΔS/Δ.R_S=\{\Delta-\Delta_S\}/\Delta=1-\Delta_S/\Delta.

The definition and estimation of Δ\Delta is described in the delta.estimate documentation.

A flexible model-based approach to estimate ΔS\Delta_S in the single marker setting is to specify:

E(S(0))=α0andE(S(1))E(S(0))=α1,E(S^{(0)})=\alpha_0 \quad\mbox{and}\quad E(S^{(1)})-E(S^{(0)}) = \alpha_1,

E(Y(0)S(0))=β0+β1S(0)andE(Y(1)S(1))=(β0+β2)+(β1+β3)S(1).E(Y^{(0)} | S^{(0)}) = \beta_0 + \beta_1 S^{(0)} \quad \mbox{and} \quad E(Y^{(1)} | S^{(1)}) = (\beta_0 +\beta_2)+ (\beta_1+\beta_3) S^{(1)}.

It can be shown that when these models hold, ΔS=β2+β3α0\Delta_S = \beta_2 + \beta_3 \alpha_0. Thus, reasonable estimates for ΔS\Delta_S and RSR_S using this approach would be Δ^S=β^2+β^3α^0\hat{\Delta}_S = \hat{\beta}_2 + \hat{\beta}_3 \hat{\alpha}_0 and R^S=1Δ^S/Δ^.\hat{R}_S = 1-\hat{\Delta}_S / \hat{\Delta}.

For robust estimation of ΔS\Delta_S in the single marker setting, we estimate μ1(s)=E(Y(1)S(1)=s)\mu_1(s) = E(Y^{(1)}|S^{(1)}=s) nonparametrically using kernel smoothing:

μ^1(s)=i=1n1Kh(S1is)Y1ii=1n1Kh(S1is)\hat{\mu}_1(s) = \frac{\sum_{i=1}^{n_1} K_h\left (S_{1i}-s \right ) Y_{1i} }{\sum_{i=1}^{n_1} K_h\left (S_{1i}-s \right )}

where S1iS_{1i} is the observed S(1)S^{(1)} for person ii, Y1iY_{1i} is the observed Y(1)Y^{(1)} for person ii, K()K(\cdot) is a smooth symmetric density function with finite support, Kh()=K(/h)/hK_h(\cdot)=K(\cdot/h)/h and hh is a specified bandwidth. As in most nonparametric functional estimation procedures, the choice of the smoothing parameter hh 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 h=O(n1δ)h=O(n_1^{-\delta}) with δ(1/4,1/3).\delta \in (1/4,1/3). To obtain an appropriate hh we first use bw.nrd to obtain hopth_{opt}; and then we let h=hoptn1c0h = h_{opt}n_1^{-c_0} with c0=0.25c_0 = 0.25. We then estimate ΔS\Delta_S as

Δ^S=i=1n0μ^1(S0i)Y0in0\hat{\Delta}_S= \sum_{i=1}^{n_0} \frac{\hat{\mu}_1(S_{0i})- Y_{0i}}{n_0}

where S0iS_{0i} is the observed S(0)S^{(0)} for person ii and Y0iY_{0i} is the observed Y(0)Y^{(0)} for person ii. Lastly, we estimate RSR_S as R^S=1Δ^S/Δ^\hat{R}_S = 1-\hat{\Delta}_S/\hat{\Delta}.

This function also allows for estimation of RSR_S using Freedman's approach. Let YY denote the primary outcome, SS denote the surrogate marker, and GG 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:

E(YG)=γ0+γ1I(G=1)andE(YG,S)=γ0S+γ1SI(G=1)+γ2SSE(Y|G) = \gamma_0 + \gamma_1 I(G=1) \quad \mbox{and} \quad E(Y|G, S) = \gamma_{0S} + \gamma_{1S}I(G=1) + \gamma_{2S} S

and estimating the proportion of treatment effect explained, denoted by RSR_S, as 1γ^1S/γ^11-\hat{\gamma}_{1S}/\hat{\gamma}_1.

This function also estimates RSR_S in a multiple marking setting. A flexible model-based approach to estimate ΔS\Delta_S in the multiple marker setting is to specify models for E(YG,S)E(Y|G, S) and E(SjG)E(S_j | G) for each SjS_j in S={S1,...Sp}S = \{S_1,...S_p\} (where p is the number of surrogate markers). Without loss of generality, consider the case where there are three surrogate markers, S={S1,S2,S3}S = \{S_1, S_2, S_3\} and one specifies the following linear models:

E(Y(0)S(0))=β0+β1S1(0)+β2S2(0)+β3S3(0)E(Y^{(0)} | S^{(0)}) = \beta_0 + \beta_1 S_1^{(0)} + \beta_2 S_2^{(0)} + \beta_3 S_3^{(0)}

E(Y(1)S(1))=(β0+β4)+(β1+β5)S1(1)+(β2+β6)S2(1)+(β3+β7)S3(1)E(Y^{(1)} | S^{(1)}) = (\beta_0+\beta_4) + (\beta_1+\beta_5) S_1^{(1)} + (\beta_2+\beta_6) S_2^{(1)} + (\beta_3+\beta_7) S_3^{(1)}

E(Sj(0))=αj,    j=1,2,3.E(S_j^{(0)}) = \alpha_j, ~~~~j=1,2,3.

It can be shown that when these models hold

ΔS=β4+β5α1+β6α2+β7α3.\Delta_{S} = \beta_4 + \beta_5\alpha_1 + \beta_6 \alpha_2 + \beta_7 \alpha_3.

Thus, reasonable estimates for ΔS\Delta_{S} and RSR_{S} here would be easily obtained by replacing the unknown regression coefficients in the models above by their consistent estimators.

For robust estimation of S ΔS\Delta_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:

E(Y(1)S(1)=S)=β0+β1S1(1)+β2S2(1)+β3S3(1)E(Y^{(1)}|S^{(1)}=S)=\beta_0 + \beta_1 S_1^{(1)} + \beta_2 S_2^{(1)} + \beta_3 S_3^{(1)}

and define Q(1)=β^0+β^1S1(1)+β^2S2(1)+β^3S3(1)Q^{(1)} = \hat{\beta}_0 + \hat{\beta}_1 S_1^{(1)} + \hat{\beta}_2 S_2^{(1)} + \hat{\beta}_3 S_3^{(1)} and Q(0)=β^0+β^1S1(0)+β^2S2(0)+β^3S3(0)Q^{(0)} = \hat{\beta}_0 + \hat{\beta}_1 S_1^{(0)} + \hat{\beta}_2 S_2^{(0)} + \hat{\beta}_3 S_3^{(0)} to reduce the dimension of SS 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 {V(b)=(V11(b),...V1n1(b),V01(b),...V0n0(b))T,b=1,....,D}\left \{ V^{(b)} = (V_{11}^{(b)}, ...V_{1n_1}^{(b)}, V_{01}^{(b)}, ...V_{0n_0}^{(b)})^T, b=1,....,D \right \} be n×Dn \times D independent copies of a positive random variables VV from a known distribution with unit mean and unit variance. Let

Δ^(b)=i=1n1V1i(b)Y1ii=1n1V1i(b)i=1n0V0i(b)Y0ii=1n0V0i(b).\hat{\Delta}^{(b)} = \frac{ \sum_{i=1}^{n_1} V_{1i}^{(b)} Y_{1i}}{ \sum_{i=1}^{n_1} V_{1i}^{(b)}} - \frac{ \sum_{i=1}^{n_0} V_{0i}^{(b)} Y_{0i}}{ \sum_{i=1}^{n_0} V_{0i}^{(b)}}.

The variance of Δ^\hat{\Delta} is obtained as the empirical variance of {Δ^(b),b=1,...,D}.\{\hat{\Delta}^{(b)}, b = 1,...,D\}. In this package, we use weights generated from an Exponential(1) distribution and use D=500D=500. Variance estimates for Δ^S\hat{\Delta}_S and R^S\hat{R}_S are calculated similarly. We construct two versions of the 95%95\% 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 RSR_S as

{1r:(Δ^SrΔ^)2σ^112rσ^12+r2σ^22cα},\left\{1-r: \frac{(\hat{\Delta}_S-r\hat{\Delta})^2}{\hat{\sigma}_{11}-2r\hat\sigma_{12}+r^2\hat\sigma_{22}} \le c_{\alpha}\right\},

where Σ^=(σ^ij)1i,j2\hat{\Sigma}=(\hat\sigma_{ij})_{1\le i,j\le 2} and cαc_\alpha is the (1α)(1-\alpha)th percentile of

{{Δ^S(b)(1R^S)Δ^(b)}2σ^112(1R^S)σ^12+(1R^S)2σ^22,b=1,,C}\left\{\frac{\{\hat{\Delta}^{(b)}_S-(1-\hat R_S)\hat{\Delta}^{(b)}\}^2}{\hat{\sigma}_{11}-2(1-\hat R_S)\hat\sigma_{12}+(1-\hat R_S)^2\hat\sigma_{22}}, b=1, \cdots, C\right\}

where α=0.05\alpha=0.05.

Note that if the observed supports for S are not the same, then μ^1(s)\hat{\mu}_1(s) for S0i=sS_{0i} = s outside the support of S1iS_{1i} may return NA (depending on the bandwidth). If extrapolation = TRUE, then the μ^1(s)\hat{\mu}_1(s) values for these surrogate values are set to the closest non-NA value. If transform = TRUE, then S1iS_{1i} and S0iS_{0i} are transformed such that the new transformed values, S1itrS^{tr}_{1i} and S0itrS^{tr}_{0i} are defined as: Sgitr=F([Sgiμ]/σ)S^{tr}_{gi} = F([S_{gi} - \mu]/\sigma) for g=0,1g=0,1 where F()F(\cdot) is the cumulative distribution function for a standard normal random variable, and μ\mu and σ\sigma are the sample mean and standard deviation, respectively, of (S1i,S0i)T(S_{1i}, S_{0i})^T.

Value

A list is returned:

R.s

the estimate, R^S\hat{R}_S, described above.

R.s.var

the variance estimate of R^S\hat{R}_S; if var = TRUE or conf.int = TRUE.

conf.int.normal.R.s

a vector of size 2; the 95% confidence interval for R^S\hat{R}_S based on a normal approximation; if conf.int = TRUE.

conf.int.quantile.R.s

a vector of size 2; the 95% confidence interval for R^S\hat{R}_S based on sample quantiles of the perturbed values, described above; if conf.int = TRUE.

conf.int.fieller.R.s

a vector of size 2; the 95% confidence interval for R^S\hat{R}_S based on Fieller's approach, described above; if conf.int = TRUE.

For all options other then "freedman", the following are also returned:

delta

the estimate, Δ^\hat{\Delta}, described in delta.estimate documentation.

delta.s

the estimate, Δ^S\hat{\Delta}_S, described above.

delta.var

the variance estimate of Δ^\hat{\Delta}; if var = TRUE or conf.int = TRUE.

delta.s.var

the variance estimate of Δ^S\hat{\Delta}_S; if var = TRUE or conf.int = TRUE.

conf.int.normal.delta

a vector of size 2; the 95% confidence interval for Δ^\hat{\Delta} based on a normal approximation; if conf.int = TRUE.

conf.int.quantile.delta

a vector of size 2; the 95% confidence interval for Δ^\hat{\Delta} based on sample quantiles of the perturbed values, described above; if conf.int = TRUE.

conf.int.normal.delta.s

a vector of size 2; the 95% confidence interval for Δ^S\hat{\Delta}_S based on a normal approximation; if conf.int = TRUE.

conf.int.quantile.delta.s

a vector of size 2; the 95% confidence interval for Δ^S\hat{\Delta}_S based on sample quantiles of the perturbed values, described above; if conf.int = TRUE.

Note

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"

Author(s)

Layla Parast

References

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.

Examples

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")

Calculates the proportion of treatment effect explained correcting for measurement error in the surrogate marker

Description

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).

Usage

R.s.estimate.me(sone, szero, yone, yzero, parametric = FALSE, estimator = "n", 
me.variance, extrapolate = TRUE, transform = FALSE, naive = FALSE, Ronly = TRUE)

Arguments

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 n1n_1 (number of treated observations) rows and n.s (number of surrogate markers) columns.

szero

numeric vector; surrogate marker for control observations, assumed to be continuous.If there are multiple surrogates then this should be a matrix with n0n_0 (number of control observations) rows and n.s (number of surrogate markers) columns.

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

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.

Value

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

Author(s)

Layla Parast

References

Parast, L., Garcia, TP, Prentice, RL, Carroll, RJ (2019+). Robust Methods to Correct for Measurement Error when Evaluating a Surrogate Marker. Under Review.

Examples

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)

Calculates the proportion of treatment effect explained by the surrogate marker information measured at a specified time and primary outcome information up to that specified time

Description

This function calculates the proportion of treatment effect on the primary outcome explained by the surrogate marker information measured at t0t_0 and primary outcome information up to t0t_0. The user can also request a variance estimate, estimated using perturbating-resampling, and a 95% confidence interval. If a confidence interval is requested three versions are provided: a normal approximation based interval, a quantile based interval and Fieller's confidence interval, all using perturbation-resampling. The user can also request an estimate of the incremental value of surrogate marker information.

Usage

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)

Arguments

xone

numeric vector, the observed event times in the treatment group, X = min(T,C) where T is the time of the primary outcome and C is the censoring time.

xzero

numeric vector, the observed event times in the control group, X = min(T,C) where T is the time of the primary outcome and C is the censoring time.

deltaone

numeric vector, the event indicators for the treatment group, D = I(T<C) where T is the time of the primary outcome and C is the censoring time.

deltazero

numeric vector, the event indicators for the control group, D = I(T<C) where T is the time of the primary outcome and C is the censoring time.

sone

numeric vector; surrogate marker measurement at t0t_0 for treated observations, assumed to be continuous. If X1i<t0X_{1i}<t_0, then the surrogate marker measurement should be NA.

szero

numeric vector; surrogate marker measurement at t0t_0 for control observations, assumed to be continuous. If X1i<t0X_{1i}<t_0, then the surrogate marker measurement should be NA.

t

the time of interest.

weight.perturb

weights used for perturbation resampling.

landmark

the landmark time t0t_0 or time of surrogate marker measurement.

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.

Details

Let GG be the binary treatment indicator with G=1G=1 for treatment and G=0G=0 for control and we assume throughout that subjects are randomly assigned to a treatment group at baseline. Let T(1)T^{(1)} and T(0)T^{(0)} denote the time of the primary outcome of interest, death for example, under the treatment and under the control, respectively. Let S(1)S^{(1)} and S(0)S^{(0)} denote the surrogate marker measured at time t0t_0 under the treatment and the control, respectively.

The residual treatment effect is defined as

ΔS(t,t0)=P(T(0)>t0){ψ1(ts,t0)dF0(st0)P(T(0)>tT(0)>t0)}\Delta_S(t,t_0) = P(T^{(0)} > t_0) \left \{\int \psi_1(t | s, t_0) dF_0(s | t_0)-P(T^{(0)}> t| T^{(0)}> t_0) \right \}

where F0(t0)F_0(\cdot | t_0) is the cumulative distribution function of S(0)S^{(0)} conditional on T(0)>t0T^{(0)}> t_0 and ψ1(ts,t0)=P(T(1)>tS(1)=s,T(1)>t0)\psi_1(t | s,t_0) = P(T^{(1)}> t | S^{(1)}=s, T ^{(1)} > t_0). The proportion of treatment effect explained by the surrogate marker information measured at t0t_0 and primary outcome information up to t0t_0, which we denote by RS(t,t0)R_S(t,t_0), can be expressed using a contrast between ΔS(t,t0)\Delta_S(t,t_0) and Δ(t)\Delta(t):

RS(t,t0)={Δ(t)ΔS(t,t0)}/Δ(t)=1ΔS(t,t0)/Δ(t).R_S(t,t_0)=\{\Delta(t)-\Delta_S(t,t_0)\}/\Delta(t)=1-\Delta_S(t,t_0)/\Delta(t).

The definition and estimation of Δ(t)\Delta(t) is described in the delta.surv.estimate documentation.

Due to censoring, our data consist of n1n_1 observations {(X1i,δ1i,S1i),i=1,...,n1}\{(X_{1i}, \delta_{1i}, S_{1i}), i=1,...,n_1\} from the treatment group G=1G=1 and n0n_0 observations {(X0i,δ0i,S0i),i=1,...,n0}\{(X_{0i}, \delta_{0i}, S_{0i}), i=1,...,n_0\} from the control group G=0G=0 where Xgi=min(Tgi,Cgi)X_{gi} = \min(T_{gi}, C_{ gi}), δgi=I(Tgi<Cgi)\delta_{gi} = I(T_{gi} < C_{gi}), CgiC_{gi} denotes the censoring time, and SgiS_{gi} denotes the surrogate marker information measured at time t0t_0, for g=1,0g= 1,0, for individual ii. Note that if Xgi<t0X_{gi} < t_0, then SgiS_{gi} should be NA (not available).

To estimate ΔS(t,t0)\Delta_S(t,t_0), we use a nonparametric kernel Nelson-Aalen estimator to estimate ψ1(ts,t0)\psi_1(t | s,t_0) as ψ^1(ts,t0)=exp{Λ^1(ts,t0)}\hat{\psi}_1(t| s,t_0) = \exp\{-\hat{\Lambda}_1(t| s,t_0) \}, where

Λ^1(ts,t0)=t0ti=1n1I(X1i>t0)Kh{γ(S1i)γ(s)}dN1i(z)i=1n1I(X1i>t0)Kh{γ(S1i)γ(s)}Y1i(z),\hat{\Lambda}_1(t| s,t_0) = \int_{t_0}^t \frac{\sum_{i=1}^{n_1} I(X_{1i}>t_0) K_h\{\gamma(S_{1i}) - \gamma(s)\}dN_{1i}(z)}{\sum_{i=1}^{n_1} I(X_{1i}>t_0) K_h\{\gamma(S_{1i}) - \gamma(s)\} Y_{1i}(z)},

is a consistent estimate of Λ1(ts,t0)=log[ψ1(ts,t0)],Y1i(t)=I(X1it),N1i(t)=I(X1it)δi,K()\Lambda_1(t| s,t_0 ) = -\log [\psi_1(t| s,t_0)], Y_{1i}(t) = I(X_{1i} \geq t), N_{1i}(t) = I(X_{1i} \leq t) \delta_i, K(\cdot) is a smooth symmetric density function, Kh(x)=K(x/h)/h,γ()K_h(x) = K(x/h)/h, \gamma(\cdot) is a given monotone transformation function, and hh is a specified bandwidth. To obtain an appropriate hh we first use bw.nrd to obtain hopth_{opt}; and then we let h=hoptn1c0h = h_{opt}n_1^{-c_0} with c0=0.11c_0 = 0.11.

Since F0(st0)=P(S0isX0i>t0)F_0(s | t_0) = P(S_{0i} \le s | X_{0i} > t_0), we empirically estimate F0(st0)F_0(s | t_0) using all subjects with X0i>t0X_{0i} > t_0 as

F^0(st0)=i=1n0I(S0is,X0i>t0)i=1n0I(X0i>t0).\hat{F}_0(s | t_0) = \frac{\sum_{i=1}^{n_0} I(S_{0i} \le s, X_{0i} > t_0)}{\sum_{i=1}^{n_0} I(X_{0i} > t_0)}.

Subsequently, we construct an estimator for ΔS(t,t0)\Delta_{S}(t,t_0) as

Δ^S(t,t0)=n01i=1n0[ψ^1(tS0i,t0)I(X0i>t0)W^0C(t0)I(X0i>t)W^0C(t)]\hat{\Delta}_S(t,t_0) = n_0^{-1} \sum_{i=1}^{n_0} \left[\hat{\psi}_1(t| S_{0i},t_0) \frac{I(X_{0i} > t_0)}{\hat{W}^C_0(t_0)} - \frac{I(X_{0i} > t)}{\hat{W}^C_0(t)}\right]

where W^gC()\hat{W}^C_g(\cdot) is the Kaplan-Meier estimator of survival for censoring for g=1,0.g=1,0. Finally, we estimate RS(t,t0)R_S(t,t_0) as R^S(t,t0)=1Δ^S(t,t0)/Δ^(t).\hat{R}_S(t,t_0) =1- \hat{\Delta}_S(t,t_0)/\hat{\Delta}(t).

Variance estimation and confidence interval construction are performed using perturbation-resampling. Specifically, let {V(b)=(V11(b),...V1n1(b),V01(b),...V0n0(b))T,b=1,....,D}\left \{ V^{(b)} = (V_{11}^{(b)}, ...V_{1n_1}^{(b)}, V_{01}^{(b)}, ...V_{0n_0}^{(b)})^T, b=1,....,D \right \} be n×Dn \times D independent copies of a positive random variables VV from a known distribution with unit mean and unit variance. Let

Δ^(b)(t)=i=1n1V1i(b)I(X1i>t)i=1n1V1i(b)W^1C(b)(t)i=1n0V0i(b)I(X0i>t)i=1n0V0i(b)W^0C(b)(t).\hat{\Delta}^{(b)}(t) = \frac{ \sum_{i=1}^{n_1} V_{1i}^{(b)} I(X_{1i}>t)}{ \sum_{i=1}^{n_1} V_{1i}^{(b)} \hat{W}_1^{C(b)}(t)} -\frac{ \sum_{i=1}^{n_0} V_{0i}^{(b)} I(X_{0i}>t)}{ \sum_{i=1}^{n_0} V_{0i}^{(b)} \hat{W}_0^{C(b)}(t)}.

In this package, we use weights generated from an Exponential(1) distribution and use D=500D=500. The variance of Δ^(t)\hat{\Delta}(t) is obtained as the empirical variance of {Δ^(t)(b),b=1,...,D}\{\hat{\Delta}(t)^{(b)}, b = 1,...,D\}. Variance estimates for Δ^S(t,t0)\hat{\Delta}_S(t,t_0) and R^S(t,t0)\hat{R}_S(t,t_0) are calculated similarly. We construct two versions of the 95%95\% 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 RS(t,t0)R_S(t,t_0) as

{1r:(Δ^S(t,t0)rΔ^(t))2σ^112rσ^12+r2σ^22cα},\left\{1-r: \frac{(\hat{\Delta}_S(t,t_0)-r\hat{\Delta}(t))^2}{\hat{\sigma}_{11}-2r\hat\sigma_{12}+r^2\hat\sigma_{22}} \le c_{\alpha}\right\},

where Σ^=(σ^ij)1i,j2\hat{\Sigma}=(\hat\sigma_{ij})_{1\le i,j\le 2} and cαc_\alpha is the (1α)(1-\alpha)th percentile of

{{Δ^S(b)(t)(1R^S(t,t0))Δ^(t)(b)}2σ^112(1R^S(t,t0))σ^12+(1R^S(t,t0))2σ^22,b=1,,C}\left\{\frac{\{\hat{\Delta}^{(b)}_S(t)-(1-\hat R_S(t,t_0))\hat{\Delta}(t)^{(b)}\}^2}{\hat{\sigma}_{11}-2(1-\hat R_S(t,t_0))\hat\sigma_{12}+(1-\hat R_S(t,t_0))^2\hat\sigma_{22}}, b=1, \cdots, C\right\}

where α=0.05\alpha=0.05.

Since the definition of RS(t,t0)R_S(t,t_0) considers the surrogate information as a combination of both SS information and TT information up to t0t_0, a logical inquiry would be how to assess the incremental value of the SS information in terms of the proportion of treatment effect explained, when added to TT information up to t0t_0. The proportion of treatment effect explained by TT information up to t0t_0 only is denoted as RT(t,t0)R_T(t,t_0) and is described in the documentation for R.t.surv.estimate. The incremental value of SS information is defined as:

IVS(t,t0)=RS(t,t0)RT(t,t0)=ΔT(t,t0)ΔS(t,t0)Δ(t).IV_S(t,t_0) = R_S(t,t_0) - R_T(t,t_0) = \frac{\Delta_T(t,t_0) - \Delta_S(t,t_0)}{\Delta (t)}.

For estimation of RT(t0)R_T(t_0), see documentation for R.t.surv.estimate. The quantity IVS(t,t0)IV_S(t,t_0) is then estimated by IV^S(t,t0)=R^S(t,t0)R^T(t,t0)\hat{IV}_S(t,t_0) = \hat{R}_S(t,t_0) - \hat{R}_T(t,t_0). 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 Λ^1(ts,t0)\hat{\Lambda}_1(t| s,t_0) for S0i=sS_{0i} = s outside the support of S1iS_{1i} may return NA (depending on the bandwidth). If extrapolation = TRUE, then the Λ^1(ts,t0)\hat{\Lambda}_1(t| s,t_0) values for these surrogate values are set to the closest non-NA value. If transform = TRUE, then S1iS_{1i} and S0iS_{0i} are transformed such that the new transformed values, S1itrS^{tr}_{1i} and S0itrS^{tr}_{0i} are defined as: Sgitr=F([Sgiμ]/σ)S^{tr}_{gi} = F([S_{gi} - \mu]/\sigma) for g=0,1g=0,1 where F()F(\cdot) is the cumulative distribution function for a standard normal random variable, and μ\mu and σ\sigma are the sample mean and standard deviation, respectively, of {(S1i,S0i)T,is.t.Xgi>t0}\{(S_{1i}, S_{0i})^T, i \quad s.t. X_{gi} > t_0\}.

Value

A list is returned:

delta

the estimate, Δ^(t)\hat{\Delta}(t), described in delta.estimate documentation.

delta.s

the estimate, Δ^S(t,t0)\hat{\Delta}_S(t,t_0), described above.

R.s

the estimate, R^S(t,t0)\hat{R}_S(t,t_0), described above.

delta.var

the variance estimate of Δ^(t)\hat{\Delta}(t); if var = TRUE or conf.int = TRUE.

delta.s.var

the variance estimate of Δ^S(t,t0)\hat{\Delta}_S(t,t_0); if var = TRUE or conf.int = TRUE.

R.s.var

the variance estimate of R^S(t,t0)\hat{R}_S(t,t_0); if var = TRUE or conf.int = TRUE.

conf.int.normal.delta

a vector of size 2; the 95% confidence interval for Δ^(t)\hat{\Delta}(t) based on a normal approximation; if conf.int = TRUE.

conf.int.quantile.delta

a vector of size 2; the 95% confidence interval for Δ^(t)\hat{\Delta}(t) based on sample quantiles of the perturbed values, described above; if conf.int = TRUE.

conf.int.normal.delta.s

a vector of size 2; the 95% confidence interval for Δ^S(t,t0)\hat{\Delta}_S(t,t_0) based on a normal approximation; if conf.int = TRUE.

conf.int.quantile.delta.s

a vector of size 2; the 95% confidence interval for Δ^S(t,t0)\hat{\Delta}_S(t,t_0) based on sample quantiles of the perturbed values, described above; if conf.int = TRUE.

conf.int.normal.R.s

a vector of size 2; the 95% confidence interval for R^S(t,t0)\hat{R}_S(t,t_0) based on a normal approximation; if conf.int = TRUE.

conf.int.quantile.R.s

a vector of size 2; the 95% confidence interval for R^S(t,t0)\hat{R}_S(t,t_0) based on sample quantiles of the perturbed values, described above; if conf.int = TRUE.

conf.int.fieller.R.s

a vector of size 2; the 95% confidence interval for R^S(t,t0)\hat{R}_S(t,t_0) based on Fieller's approach, described above; if conf.int = TRUE.

delta.t

the estimate, Δ^T(t,t0)\hat{\Delta}_T(t,t_0), described above; if incremental.vaue = TRUE.

R.t

the estimate, R^T(t,t0)\hat{R}_T(t,t_0), described above; if incremental.vaue = TRUE.

incremental.value

the estimate, IV^S(t,t0)\hat{IV}_S(t,t_0), described above; if incremental.vaue = TRUE.

delta.t.var

the variance estimate of Δ^T(t,t0)\hat{\Delta}_T(t,t_0); if var = TRUE or conf.int = TRUE and incremental.vaue = TRUE.

R.t.var

the variance estimate of R^T(t,t0)\hat{R}_T(t,t_0); if var = TRUE or conf.int = TRUE and incremental.vaue = TRUE.

incremental.value.var

the variance estimate of IV^S(t,t0)\hat{IV}_S(t,t_0); if var = TRUE or conf.int = TRUE and incremental.vaue = TRUE.

conf.int.normal.delta.t

a vector of size 2; the 95% confidence interval for Δ^T(t,t0)\hat{\Delta}_T(t,t_0) based on a normal approximation; if conf.int = TRUE and incremental.vaue = TRUE.

conf.int.quantile.delta.t

a vector of size 2; the 95% confidence interval for Δ^T(t,t0)\hat{\Delta}_T(t,t_0) based on sample quantiles of the perturbed values, described above; if conf.int = TRUE and incremental.vaue = TRUE.

conf.int.normal.R.t

a vector of size 2; the 95% confidence interval for R^T(t,t0)\hat{R}_T(t,t_0) based on a normal approximation; if conf.int = TRUE and incremental.vaue = TRUE.

conf.int.quantile.R.t

a vector of size 2; the 95% confidence interval for R^T(t,t0)\hat{R}_T(t,t_0) based on sample quantiles of the perturbed values, described above; if conf.int = TRUE and incremental.vaue = TRUE.

conf.int.fieller.R.t

a vector of size 2; the 95% confidence interval for R^T(t,t0)\hat{R}_T(t,t_0) based on Fieller's approach, described above; if conf.int = TRUE and incremental.vaue = TRUE.

conf.int.normal.iv

a vector of size 2; the 95% confidence interval for IV^S(t,t0)\hat{IV}_S(t,t_0) based on a normal approximation; if conf.int = TRUE and incremental.vaue = TRUE.

conf.int.quantile.iv

a vector of size 2; the 95% confidence interval for IV^S(t,t0)\hat{IV}_S(t,t_0) based on sample quantiles of the perturbed values, described above; if conf.int = TRUE and incremental.vaue = TRUE.

Note

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".

Author(s)

Layla Parast

References

Parast, L., Cai, T., & Tian, L. (2017). Evaluating surrogate marker information using censored data. Statistics in Medicine, 36(11), 1767-1782.

Examples

data(d_example_surv)
names(d_example_surv)

Calculates the proportion of treatment effect explained by the primary outcome information up to a specified time

Description

This function calculates the proportion of treatment effect on the primary outcome explained by the treatment effect on the primary outcome up to t0t_0. The user can also request a variance estimate, estimated using perturbating-resampling, and a 95% confidence interval. If a confidence interval is requested three versions are provided: a normal approximation based interval, a quantile based interval and Fieller's confidence interval, all using perturbation-resampling.

Usage

R.t.surv.estimate(xone, xzero, deltaone, deltazero, t, weight.perturb = NULL, 
landmark, var = FALSE, conf.int = FALSE, approx = T)

Arguments

xone

numeric vector, the observed event times in the treatment group, X = min(T,C) where T is the time of the primary outcome and C is the censoring time.

xzero

numeric vector, the observed event times in the control group, X = min(T,C) where T is the time of the primary outcome and C is the censoring time.

deltaone

numeric vector, the event indicators for the treatment group, D = I(T<C) where T is the time of the primary outcome and C is the censoring time.

deltazero

numeric vector, the event indicators for the control group, D = I(T<C) where T is the time of the primary outcome and C is the censoring time.

t

the time of interest.

weight.perturb

weights used for perturbation resampling.

landmark

the landmark time t0t_0 or time of surrogate marker measurement.

var

TRUE or FALSE; indicates whether a variance estimate for delta is requested, default is FALSE.

conf.int

TRUE or FALSE; indicates whether a 95% confidence interval for delta is requested, default is FALSE.

approx

TRUE or FALSE indicating whether an approximation should be used when calculating the probability of censoring; most relevant in settings where the survival time of interest for the primary outcome is greater than the last observed event but before the last censored case, default is TRUE.

Details

Let GG be the binary treatment indicator with G=1G=1 for treatment and G=0G=0 for control and we assume throughout that subjects are randomly assigned to a treatment group at baseline. Let TT denote the time of the primary outcome of interest, death for example. We use potential outcomes notation such that T(g)T^{(g)} denotes the time of the primary outcome under treatment G=gG = g. The proportion of treatment effect explained by T observed up to t0t_0 only is RT(t,t0)=1ΔT(t,t0)/Δ(t)R_T(t,t_0) = 1-\Delta_T(t,t_0)/\Delta(t) where

ΔT(t,t0)=P(T(0)>t0)P(T(1)>tT(1)>t0)P(T(0)>t).\Delta_T(t, t_0) = P(T^{(0)}>t_0)P(T^{(1)}>t\mid T^{(1)}>t_0)-P(T^{(0)}>t).

To estimate RT(t,t0)R_T(t,t_0), we use the estimator R^T(t,t0)=1Δ^T(t,t0)/Δ^(t)\hat{R}_T(t,t_0) = 1-\hat{\Delta}_T(t,t_0)/\hat{\Delta}(t) where Δ^T(t,t0)=ϕ^0(t0)ϕ^1(t)/ϕ^1(t0)ϕ^0(t)\hat{\Delta}_T(t,t_0) = \hat{\phi}_0(t_0)\hat{\phi}_1(t)/\hat{\phi}_1(t_0) - \hat{\phi}_0(t) and ϕ^g(u)=ng1i=1ngI(Xgi>u)W^gC(u)\hat{\phi}_g(u) = n_g^{-1} \sum_{i=1}^{n_g} \frac{I(X_{gi}>u)}{\hat{W}^C_g(u)} for g=1,0g=1,0 where W^gC()\widehat{W}^C_g(\cdot) is the Kaplan-Meier estimator of survival for censoring for g=1,0.g=1,0.

Value

A list is returned:

delta

the estimate, Δ^(t)\hat{\Delta}(t), described in delta.estimate documentation.

delta.t

the estimate, Δ^T(t,t0)\hat{\Delta}_T(t,t_0), described above.

R.t

the estimate, R^T(t,t0)\hat{R}_T(t,t_0), described above.

delta.var

the variance estimate of Δ^(t)\hat{\Delta}(t); if var = TRUE or conf.int = TRUE.

delta.t.var

the variance estimate of Δ^T(t,t0)\hat{\Delta}_T(t,t_0); if var = TRUE or conf.int = TRUE.

R.t.var

the variance estimate of R^T(t,t0)\hat{R}_T(t,t_0); if var = TRUE or conf.int = TRUE.

conf.int.normal.delta

a vector of size 2; the 95% confidence interval for Δ^(t)\hat{\Delta}(t) based on a normal approximation; if conf.int = TRUE.

conf.int.quantile.delta

a vector of size 2; the 95% confidence interval for Δ^(t)\hat{\Delta}(t) based on sample quantiles of the perturbed values, described above; if conf.int = TRUE.

conf.int.normal.delta.t

a vector of size 2; the 95% confidence interval for Δ^T(t,t0)\hat{\Delta}_T(t,t_0) based on a normal approximation; if conf.int = TRUE.

conf.int.quantile.delta.t

a vector of size 2; the 95% confidence interval for Δ^T(t,t0)\hat{\Delta}_T(t,t_0) based on sample quantiles of the perturbed values, described above; if conf.int = TRUE.

conf.int.normal.R.t

a vector of size 2; the 95% confidence interval for R^T(t,t0)\hat{R}_T(t,t_0) based on a normal approximation; if conf.int = TRUE.

conf.int.quantile.R.t

a vector of size 2; the 95% confidence interval for R^T(t,t0)\hat{R}_T(t,t_0) based on sample quantiles of the perturbed values, described above; if conf.int = TRUE.

conf.int.fieller.R.t

a vector of size 2; the 95% confidence interval for R^T(t,t0)\hat{R}_T(t,t_0) based on Fieller's approach, described above; if conf.int = TRUE.

Note

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.

Author(s)

Layla Parast

References

Parast, L., Cai, T., & Tian, L. (2017). Evaluating surrogate marker information using censored data. Statistics in Medicine, 36(11), 1767-1782.

Examples

data(d_example_surv)
names(d_example_surv)