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

View source: R/Functions_Rsurrogate.R

calculate.var.npR Documentation

calculates closed form variance estimate for R

Description

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

Usage

calculate.var.np(s1, s0, y1, y0, extrapolate = TRUE)

Arguments

s1

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.

s0

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.

y1

numeric vector; primary outcome for treated observations, assumed to be continuous.

y0

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


Rsurrogate documentation built on May 29, 2024, 11 a.m.