Commit d1f2bb4
test(staggered): handle materialized NaN cells in ported CS tests
Three test_csdid_ported.py tests relied on non-estimable (g,t) cells being
OMITTED from group_time_effects; with the new NaN-cell materialization those
cells are present as NaN, so the tests' membership / golden-iteration guards no
longer skip them. Update them to preserve their intent on the FINITE cells:
- test_some_units_treated_first_period: a first-period cohort (no base period) is
now all-NaN (missing_period) rather than absent -> assert it is all-NaN.
- test_zero_pretreatment_outcomes: skip NaN pre-cells (the last cohort under
not_yet_treated has no controls); finite pre-cells are still ~0.
- test_golden_fewer_periods: skip NaN cells (gapped panel where base g-1 is
unobserved -> missing_period; R falls back to an available base) -> R-parity on
the finite cells.
No source change; the cells are correctly non-estimable, only now visible.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 9d57e76 commit d1f2bb4
1 file changed
Lines changed: 22 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
633 | 633 | | |
634 | 634 | | |
635 | 635 | | |
636 | | - | |
637 | | - | |
638 | | - | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
639 | 646 | | |
640 | 647 | | |
641 | 648 | | |
| |||
774 | 781 | | |
775 | 782 | | |
776 | 783 | | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
777 | 789 | | |
778 | 790 | | |
779 | 791 | | |
| |||
1199 | 1211 | | |
1200 | 1212 | | |
1201 | 1213 | | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
1202 | 1221 | | |
1203 | 1222 | | |
1204 | 1223 | | |
| |||
0 commit comments