Commit 7ceff73
Phase 4.5 C0: QUG-under-survey decision gate
Add survey=/weights= kwargs to qug_test and did_had_pretest_workflow
as keyword-only with default None. Both raise NotImplementedError when
either kwarg is non-None, with an educational message naming the
methodology rationale and pointing users to joint Stute (Phase 4.5 C,
planned) as the survey-compatible alternative. Mutex guard on
survey=+weights= mirrors HeterogeneousAdoptionDiD.fit() at had.py:2890.
QUG-under-survey is permanently deferred. The test statistic uses
extreme order statistics (D_(1), D_(2)) which are not smooth functionals
of the empirical CDF -- standard survey machinery (Binder TSL, Rao-Wu
rescaled bootstrap, Krieger-Pfeffermann (1997) EDF tests) does not
yield a calibrated test; under cluster sampling the Exp(1)/Exp(1) limit
law's independence assumption breaks; and the EVT-under-unequal-
probability-sampling literature (Quintos et al. 2001, Beirlant et al.)
addresses tail-index estimation, not boundary tests.
The workflow's gate is temporary -- Phase 4.5 C will close it for the
linearity-family pretests (stute_test, yatchew_hr_test, joint variants)
via Rao-Wu rescaled bootstrap. Sister pretests keep their closed
signatures in this release; Phase 4.5 C will add kwargs and
implementation together to avoid API churn.
- 11 new tests: 5 on TestQUGTest covering rejection / mutex / message-
text checks / unweighted regression; 6 on new
TestHADPretestWorkflowSurveyGuards covering both kwarg paths, mutex,
methodology pointer, both aggregate paths, and unweighted regression.
- docs/methodology/REGISTRY.md: Note (Phase 4.5 C0) under QUG section
with three-reason rationale plus a research-direction sketch (the
theoretical bridge would combine Hall 1982 / Aarssen-de Haan 1994 /
Hall-Wang 1999 endpoint EVT, Boistard-Lopuhaa-Ruiz-Gazen 2017 /
Bertail-Chautru-Clemencon 2017 survey-aware functional CLT, and
Drees 2003 tail-empirical-process theory -- publishable methodology
research, not engineering work).
- CHANGELOG.md: Phase 4.5 C0 entry under [Unreleased].
- TODO.md: replaces decision-gate row with carry-forward research row.
Unweighted qug_test(d) and did_had_pretest_workflow(...) calls are
bit-exact pre-PR (kwargs are keyword-only after *; positional path
unchanged). 138 pretest tests pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent b4d4628 commit 7ceff73
5 files changed
Lines changed: 335 additions & 5 deletions
File tree
- diff_diff
- docs/methodology
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| |||
0 commit comments