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 NaN t-statistics across 7 locations for consistent undefined inference
Replace `else 0.0` with `else np.nan` when SE is non-finite or zero in
t-stat calculations across sun_abraham.py, triple_diff.py, and
diagnostics.py. Add CI guards returning (NaN, NaN) for 4 downstream
confidence interval computations. Matches the CallawaySantAnna pattern
established in PR #97.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Propensity scores near 0/1: trimmed at `pscore_trim` (default 0.01)
430
436
- Empty cells: raises ValueError with diagnostic message
431
437
- Collinear covariates: automatic detection and warning
438
+
- NaN inference for undefined statistics:
439
+
- t_stat: Uses NaN (not 0.0) when SE is non-finite or zero
440
+
- p_value and CI: Also NaN when t_stat is NaN
441
+
-**Note**: Defensive enhancement; reference implementation behavior not yet documented
432
442
433
443
**Reference implementation(s):**
434
444
- Authors' replication code (forthcoming)
@@ -656,6 +666,18 @@ For joint method, LOOCV works as follows:
656
666
657
667
# Diagnostics & Sensitivity
658
668
669
+
## PlaceboTests
670
+
671
+
**Module:**`diff_diff/diagnostics.py`
672
+
673
+
*Edge cases:*
674
+
- NaN inference for undefined statistics:
675
+
-`permutation_test`: t_stat is NaN when permutation SE is zero (all permutations produce identical estimates)
676
+
-`leave_one_out_test`: t_stat, p_value, CI are NaN when LOO SE is zero (all LOO effects identical)
677
+
-**Note**: Defensive enhancement matching CallawaySantAnna NaN convention
678
+
679
+
---
680
+
659
681
## BaconDecomposition
660
682
661
683
**Primary source:**[Goodman-Bacon, A. (2021). Difference-in-differences with variation in treatment timing. *Journal of Econometrics*, 225(2), 254-277.](https://doi.org/10.1016/j.jeconom.2021.03.014)
0 commit comments