Combines IPW and outcome regression corrections. Consistent if either the propensity model or the outcome model is correctly specified.
Usage
morie_estimate_aipw(
data,
treatment,
outcome,
covariates,
propensity_col = NULL,
outcome_model = c("linear", "logistic")
)Details
The propensity step delegates to WeightIt when installed
(via morie_estimate_propensity_scores). The outcome
regression and the doubly-robust influence-function score are
evaluated inline to preserve the closed-form SE used downstream.
Where richer outputs are desired, AIPW::AIPW (with SuperLearner
nuisance learners) is the canonical CRAN counterpart.
Examples
set.seed(1)
df <- data.frame(t = rbinom(200, 1, 0.4), y = rnorm(200), x = rnorm(200))
morie_estimate_aipw(df, "t", "y", "x")
#> $ate
#> [1] -0.05433513
#>
#> $se
#> [1] 0.1415487
#>
#> $ci_lower
#> [1] -0.3317705
#>
#> $ci_upper
#> [1] 0.2231003
#>
#> $n
#> [1] 200
#>