You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
BUG: TreatmentEffect: inconsistent hidden propensity-score clipping: point estimates and GMM inference use different probabilities #10222
TreatmentEffect applies propensity-score clipping inconsistently across code paths (treatment/treatment_effects.py, current main):
Path
Clipping
Point estimates: ipw/aipw/aipw_wls/ipw_ra via self.prob_select
none
_IPWGMM.momcond, _AIPWGMM.momcond
np.clip(p, 0.01, 0.99)
_AIPWWLSGMM.momcond, _IPWRAGMM.momcond
np.clip(p, 0.001, 0.999)
Consequences:
(1) with return_results=True the GMM re-solves the moment conditions using clipped probabilities while the reported "start" estimate uses unclipped ones, so point estimate and inference can correspond to different propensity scores; (2) the clipping bounds differ across estimators for no documented reason; (3) none of this is documented or user-controllable.
Reproduction (0.14.6, numpy seed 0):
strong-overlap-violating DGP, true ATE = 1.0 — ipw(return_results=False) → −0.340; ipw(return_results=True) GMM ATE → 1.139. [full script attached]
Suggested fix:
clip once, consistently, at prob_select creation (or expose a ps_bounds/trim argument defaulting to the current GMM behavior), so estimates and SEs come from the same probabilities. Happy to submit a PR. Related follow-up I'd also like to contribute: overlap/balance diagnostics (teoverlap/tebalance analogues).
the two ATE lines should agree same estimator, same data, same call except return_results. They differ because return_results=False uses raw prob_select while _IPWGMM.momcond re-solves with np.clip(p, 0.01, 0.99).
Activity
kirilklein commentedon Sep 1, 2026
I can take it
bashtage commentedon Sep 1, 2026
Happy to recieve a PR.