AIPW for the mean (and linear projections of the EIF) with missing observations

aipw(response_model, propensity_model, formula = ~1, data, ...)

Arguments

response_model

Model for the response given covariates (ml_model or formula)

propensity_model

Optional missing data mechanism model (propensity model) (ml_model or formula)

formula

design specifying the OLS estimator with outcome given by the EIF

data

data.frame

...

additional arguments (see cate())

Examples

m <- lvm(y ~ x+z, r ~ x)
distribution(m,~ r) <- binomial.lvm()
transform(m, y0~r+y) <- function(x) { x[x[,1]==0,2] <- NA; x[,2] }
d <- sim(m,1e3,seed=1)

aipw(y0 ~ x, data=d)
#>             Estimate Std.Err    2.5%  97.5% P-value
#> E[y0(1)]     0.05148 0.08338 -0.1119 0.2149   0.537
#> ───────────                                        
#> (Intercept)  0.05148 0.08380 -0.1128 0.2157   0.539