Commit 95cd4f9
synthetic-control: address CI codex R2 — poor-fit warning fires on flat pre-path (P2)
The poor-fit warning was gated by `pre_sd > 0`, so a FLAT treated pre-period path
(SD == 0) with nonzero pre-RMSPE never warned even though the synthetic clearly fails
to reproduce a constant series. Change the gate to the literal REGISTRY contract
(warn when pre_rmspe > pre_sd), including the SD == 0 case, with a scale-aware absolute
floor (1e-8 * max(|Z1|, 1)) so a near-perfect flat fit (RMSPE ~ roundoff) does not
spuriously warn. REGISTRY poor-fit Note updated to document the flat-path behavior
(slightly broader than SyntheticDiD's SD>0-gated form). Regression:
test_poor_fit_warning_flat_treated_pre_path.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 536aeb5 commit 95cd4f9
3 files changed
Lines changed: 27 additions & 3 deletions
File tree
- diff_diff
- docs/methodology
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
424 | 424 | | |
425 | 425 | | |
426 | 426 | | |
427 | | - | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
428 | 432 | | |
429 | | - | |
| 433 | + | |
| 434 | + | |
430 | 435 | | |
431 | 436 | | |
432 | 437 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1979 | 1979 | | |
1980 | 1980 | | |
1981 | 1981 | | |
1982 | | - | |
| 1982 | + | |
1983 | 1983 | | |
1984 | 1984 | | |
1985 | 1985 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
416 | 416 | | |
417 | 417 | | |
418 | 418 | | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
419 | 438 | | |
420 | 439 | | |
421 | 440 | | |
| |||
0 commit comments