estimate_aipw_effects

cross_sectional.estimate_aipw_effects(
    ds: pl.DataFrame,
    outcome: ColumnName,
    treatment: ColumnName,
    qs: ArrayLike = (0.5,),
    *,
    propensity_score_formula: FormulaRhs,
    outcome_regression_formula: FormulaRhs,
    target: CausalTarget = CausalTarget.QTE,
    weights: ColumnName | None = None,
    bootstrap_config: BootstrapConfig | int = 100,
)

Estimate a quantile treatment effect by augmented inverse probability weighting.

Combines the propensity score and outcome regression into a doubly robust estimator and attaches bootstrap standard errors.

Parameters

Name Type Description Default
ds polars.DataFrame Input data. required
outcome ColumnName Name of the outcome column. required
treatment ColumnName Name of the binary treatment column (1 treated, 0 control). required
qs array_like Quantiles in (0, 1) at which to estimate the effect. 0.5
propensity_score_formula FormulaRhs Right-hand side of the propensity score formula. required
outcome_regression_formula FormulaRhs Right-hand side of the outcome regression formula. required
target CausalTarget Estimand to target, QTE (population) or QTT (treated). CausalTarget.QTE
weights ColumnName Name of a column with sampling weights. None
bootstrap_config BootstrapConfig or int Bootstrap settings, or the number of replications. 100

Returns

Name Type Description
QteResult Estimated effects with bootstrap standard errors.

See Also

estimate_unadjusted_effects, estimate_ipw_effects, estimate_outcome_regression_effects