calculate.var.np: calculates closed form variance estimate for R

Description Usage Arguments Value Author(s) References

View source: R/Functions_Rsurrogate.R

Description

calculates closed form variance estimate for R; used in R function that corrects for measurement error

Usage

1
calculate.var.np(s1, s0, y1, y0, extrapolate = 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 n_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 n_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.

extrapolate

TRUE or FALSE; indicates whether the user wants to use extrapolation.

Value

total

matrix needed for variance calculation

psionly

matrix needed for variance calculation

Author(s)

Layla Parast

References

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.

Parast, L., Garcia, TP, Prentice, RL, Carroll, RJ (2021). Robust Methods to Correct for Measurement Error when Evaluating a Surrogate Marker. Biometrics, In press.


Rsurrogate documentation built on Nov. 14, 2021, 9:07 a.m.