Inverse-probability weighting (IPW) is the simplest of the single-robust causal estimators. This vignette shows the building blocks that MORIE exposes: the Horvitz–Thompson and the Hajek-stabilised IPW estimators, propensity-score modelling, and weight-trimming diagnostics.
The morie_estimate_ate() machinery fits a logistic
propensity model internally and returns the IPW estimate by default. To
inspect the propensities, set propensity_col after fitting
them:
morie_estimate_ate() defaults to the Hajek estimator,
which divides each weighted sum by the corresponding sum of weights.
This stabilises the estimator under finite samples even when the
propensity tails are heavy:
In practice, IPW is sensitive to extreme propensities. Two common diagnostics:
# Effective sample size after weighting
ess <- morie_effective_sample_size(1 / df$ps)
ess
#> [1] 458.4318
# Range of weights (extreme means trimming)
range(1 / df$ps)
#> [1] 1.347363 6.234294If the effective sample size collapses dramatically, the analysis should consider:
morie_estimate_aipw())aipw <- morie_estimate_aipw(df, treatment = "treat", outcome = "y", covariates = c("X1", "X2"))
aipw$estimate
#> NULLWhen propensities are well-behaved, IPW and AIPW should agree to within Monte Carlo noise. Disagreement is informative: it suggests either model misspecification or a fragile propensity model.
causal-inference vignette covers ATT / ATC / CATE /
GATE.survey-weighted vignette covers IPW under
complex-sample designs (when survey weights and propensities both
apply).