Learn R Programming

Rsurrogate (version 3.2)

delta.s.estimate: 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)

Value

\(\hat{\Delta}_S\), the model-based or robust residual treatment effect estimate.

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 \(n_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 \(n_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 \(n_1+n_0\) by x matrix of weights where \(n_1 = \) length of yone and \(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.

Author

Layla Parast

Details

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

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

Run this code
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")

Run the code above in your browser using DataLab