Commit 9d57e76
fix(staggered): report real treated/control counts on non-estimable cells (review #582 P2)
The per-cell helper sentinel returns (and the covariate-reg empty-control batch
site) hardcoded n_treated=n_control=0 for materialized NaN cells even after the
observation masks had been computed, so group_time_effects / to_dataframe could
show zero counts for a cell that actually had treated (or control) observations.
The zero-control / zero-weight exits in _compute_att_gt_fast and _compute_att_gt_rc,
and the covariate-reg empty-control batch site, now return the observed counts;
missing-period exits (masks not yet built) keep 0. Display-only metadata --
estimates, SEs, and aggregation are unchanged.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 4291a25 commit 9d57e76
2 files changed
Lines changed: 22 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
911 | 911 | | |
912 | 912 | | |
913 | 913 | | |
914 | | - | |
| 914 | + | |
915 | 915 | | |
916 | 916 | | |
917 | 917 | | |
| |||
924 | 924 | | |
925 | 925 | | |
926 | 926 | | |
927 | | - | |
| 927 | + | |
928 | 928 | | |
929 | | - | |
| 929 | + | |
930 | 930 | | |
931 | 931 | | |
932 | 932 | | |
| |||
1372 | 1372 | | |
1373 | 1373 | | |
1374 | 1374 | | |
1375 | | - | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
1376 | 1386 | | |
1377 | | - | |
| 1387 | + | |
1378 | 1388 | | |
1379 | 1389 | | |
1380 | 1390 | | |
| |||
3381 | 3391 | | |
3382 | 3392 | | |
3383 | 3393 | | |
3384 | | - | |
| 3394 | + | |
3385 | 3395 | | |
3386 | 3396 | | |
3387 | 3397 | | |
| |||
3399 | 3409 | | |
3400 | 3410 | | |
3401 | 3411 | | |
3402 | | - | |
| 3412 | + | |
3403 | 3413 | | |
3404 | | - | |
| 3414 | + | |
3405 | 3415 | | |
3406 | 3416 | | |
3407 | 3417 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1387 | 1387 | | |
1388 | 1388 | | |
1389 | 1389 | | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
1390 | 1394 | | |
1391 | 1395 | | |
1392 | 1396 | | |
| |||
0 commit comments