estimate_ipw_effects
cross_sectional.estimate_ipw_effects(
ds: pl.DataFrame,
outcome: ColumnName,
treatment: ColumnName,
qs: ArrayLike = MEDIAN,
*,
propensity_score_formula: FormulaRhs,
target: CausalTarget = CausalTarget.QTE,
weights: ColumnName | None = None,
bootstrap_config: BootstrapConfig | int = 100,
)Estimate a quantile treatment effect by inverse probability weighting.
Reweights the outcome distribution with inverse propensity scores 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 |
| 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_outcome_regression_effects, estimate_aipw_effects