Commit 2e2bb7d
HAD Phase 3 follow-up: joint Stute pretest + event-study workflow dispatch
Adds `stute_joint_pretest` (residuals-in core) plus `joint_pretrends_test`
and `joint_homogeneity_test` data-in wrappers for the paper's step-2
(mean-independence pre-trends) and step-3 (linearity joint extension)
nulls. Extends `did_had_pretest_workflow` with `aggregate="event_study"`
multi-period dispatch that closes the "paper step 2 deferred" gap
previously flagged on two-period reports.
Implementation highlights:
- Sum-of-CvMs aggregation (Delgado 1993; Escanciano 2006) with shared
Mammen wild bootstrap multiplier across horizons per unit to preserve
vector-valued empirical-process unit-level dependence (Delgado-Manteiga
2001; Hlavka-Huskova 2020).
- Per-horizon scale- and translation-invariant exact-linear short-circuit
(a single degenerate horizon does not collapse the joint test).
- Reciprocal front-door guards on both wrappers: non-empty horizon list,
base_period ordering, D=0 invariant (pre-trends) and D>0 existence
(post-homogeneity).
- Backward-compatible HADPretestReport extension: new fields
pretrends_joint, homogeneity_joint, aggregate with defaults; stute
and yatchew become Optional. summary, to_dict, to_dataframe, and
__repr__ branch on aggregate and preserve Phase 3 schemas bit-exactly
on the aggregate="overall" path.
- Eq (18) linear-trend detrending (paper Section 5.2 Pierce-Schott
p=0.51) deferred to Phase 4 replication harness where the published
value serves as parity anchor; TODO row migrated accordingly.
46 new tests (115 total in tests/test_had_pretests.py) covering:
K=1 parity with stute_test, shared-eta white-box, per-horizon short-
circuit independence, full reciprocal-validator matrix, event-study
verdict priority, serialization round-trip across aggregates. Includes
regression tests asserting the "paper step 2 deferred" string is absent
from any event-study verdict.
Closes TODO.md Phase 3 rows for joint Eq 18 and multi-period workflow
dispatch. See REGISTRY.md HeterogeneousAdoptionDiD "Joint Stute tests"
for algorithm, invariants, and the no-joint-Yatchew acknowledgment
(the paper does not derive one; multi-period Yatchew remains available
per-horizon via yatchew_hr_test).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 172d1d8 commit 2e2bb7d
7 files changed
Lines changed: 2542 additions & 145 deletions
File tree
- diff_diff
- docs/methodology
- papers
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| 23 | + | |
21 | 24 | | |
22 | 25 | | |
23 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
103 | 102 | | |
104 | 103 | | |
105 | 104 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| 70 | + | |
| 71 | + | |
69 | 72 | | |
| 73 | + | |
70 | 74 | | |
71 | 75 | | |
72 | 76 | | |
| |||
461 | 465 | | |
462 | 466 | | |
463 | 467 | | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
464 | 474 | | |
465 | 475 | | |
466 | 476 | | |
| |||
0 commit comments