Skip to content

Commit 59bdc1b

Browse files
igerberclaude
andcommitted
Address PR #456 R5 review (1 P1 + 1 P2 + 1 P3)
P1: reject horizon_max=0 under event_study=True. The previous docs said H=0 was a "well-defined but semantically distinct" design, but every event_study=True + horizon_max=0 + anticipation=0 fit hit the ref_period guard at -1 and raised. Resolution: lock the contract by rejecting H=0 explicitly with a remediation message ("use event_study=False for the aggregate Wave B spec; event-study mode requires horizon_max>=1 or horizon_max=None"). Updated REGISTRY + CHANGELOG to match. Added test_horizon_max_zero_with_event_study_raises regression. P2: plot_event_study now honors SpilloverDiDResults.reference_period. Wave C's rectangular event_study_effects emits multiple empty horizons (n_obs == 0 on dropped post-direct cells + the reference row); the legacy "first n_obs==0 row" reference detection could pick a non-reference empty horizon as the reference. Fix in _extract_plot_data: prefer results.reference_period when present (truthy attribute), fall back to the legacy n_obs==0 heuristic otherwise. Backward-compatible for estimators without the attribute (CallawaySantAnna, SunAbraham, etc.). Regression test on a Wave C fit with horizon_max=4 (oversized → multiple empty horizons) asserts the inferred reference is -1 not the first empty horizon. P3: soften "Wave B bit-identical" claim. CHANGELOG previously said "reproduces Wave B SEs bit-identically (verified by ...)" implying a pre-Wave-C checkout artifact; the goldens were actually captured on the current (Wave C) event_study=False path. Updated to: "the aggregate stage-2 design construction, fit, and extraction logic on this path are byte-identical to Wave B; the test pins goldens captured on the unchanged aggregate path so any future drift fails the regression." Same softening in the test class docstring. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 977e7c9 commit 59bdc1b

5 files changed

Lines changed: 119 additions & 23 deletions

File tree

0 commit comments

Comments
 (0)