calculates closed form variance estimate for R; used in R function that corrects for measurement error
calculate.var.np(s1, s0, y1, y0, extrapolate = TRUE)
matrix needed for variance calculation
matrix needed for variance calculation
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.
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.
numeric vector; primary outcome for treated observations, assumed to be continuous.
numeric vector; primary outcome for control observations, assumed to be continuous.
TRUE or FALSE; indicates whether the user wants to use extrapolation.
Layla Parast
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, T. P., Prentice, R. L., & Carroll, R. J. (2022). Robust methods to correct for measurement error when evaluating a surrogate marker. Biometrics, 78(1), 9-23.