Sandwich variance estimator for the IPW estimator
var_beta_ipw.RdComputes a sandwich variance estimator for the IPW regression estimator,
allowing for a general outcome model y ~ AW + Z1 + ... + Zp and a
possibly different censoring model for C | (Y, Z, ...) specified by
model_weights. The censoring model is fit via a Weibull AFT model
using survreg, and the corresponding Gumbel parameterization for
log(W) is used to construct the weights \(\pi(Y, W, Z)\).
Arguments
- data_yXZ
A data frame containing at least the outcome
y, the covariates in the outcome modelmodel, the observed covariateW, the event indicatorD, and the covariates appearing in the censoring modelmodel_weights.- theta
Numeric vector of parameter estimates \((\beta, \psi)\) from the IPW estimator. The length of
thetamust be equal top_beta + 1, wherep_betais the number of regression coefficients inmodel.- model
A
formulaspecifying the outcome regression model, e.g.y ~ AW + Z1 + Z2.- model_weights
A
formulaspecifying the censoring model used to estimate the IPW weights. Typically of the form~ y + Z1 + Z2(right-hand-side only). Internally this is expanded toSurv(W, 1 - D) ~ y + Z1 + Z2. If a fullSurvformula is provided, only its right-hand side is used.
Value
A list with components
- beta_est
Estimated regression coefficients \(\beta\).
- psi_est
Estimated residual standard deviation \(\psi\).
- se_beta
Sandwich standard errors for \(\beta\).
- sandwich_var
Full sandwich variance matrix for the stacked nuisance parameter vector \(\xi = (\beta, \alpha)\), where \(\alpha\) are the parameters of the censoring model.