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
fix(rd): 3 critical + 3 high-priority bugs from code review
Critical fixes:
- CER bandwidth formula in rdrobust.py: exponent was -1/((2p+3)(2p+4)),
corrected to -1/((2p+3)(2p+5)) matching CCF 2020 Theorem 1 and bandwidth.py
- locrand._polynomial_residuals: crash when p=0 with covariates due to
empty np.column_stack. Now handles p=0 gracefully.
- rd2d._signed_distance_to_vertical: sign was based on treatment status T
(wrong for fuzzy designs), now based on position X1 relative to cutoff
High-priority fixes:
- rdrobust weights parameter: was silently ignored, now raises
NotImplementedError with clear message
- extrapolate Wald heterogeneity test: was using arithmetic mean (biased
when SEs differ), now uses inverse-variance weighted mean (GLS-optimal)
79 RD tests pass.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0 commit comments