Commit d4b9091
Address PR #402 R4 review (1 P1, 1 P3)
P1 HAD Step-3 overstated pretest coverage on weighted/survey fits:
practitioner_next_steps() said did_had_pretest_workflow runs QUG on
both the overall and event-study paths without noting that the workflow
explicitly skips QUG whenever survey_design= / survey= / weights= is
supplied (Phase 4.5 C0 deferral, had_pretests.py:4488-4495 + REGISTRY
§ "QUG Null Test" Note (Phase 4.5 C0)). On weighted fits the workflow
emits a UserWarning and returns a linearity-conditional verdict only.
Both _handle_had and _handle_had_event_study Step-3 why-text + code
snippets now explicitly state that survey-weighted fits skip QUG and
yield a linearity-conditional verdict (the weighted verdict is
conditional on QUG holding by assumption). The event-study text also
notes that joint Stute pre-trends and joint homogeneity-linearity
themselves remain available under survey weighting via the PSU-level
Mammen multiplier bootstrap.
P3 REGISTRY § HeterogeneousAdoptionDiD requirements checklist was
stale: marked "Phase 5: practitioner_next_steps() integration" and
"Phase 5 (remaining): llms-full.txt section" as pending. Updated to
reflect this PR landing wave 1 of Phase 5; only T21 (HAD pretest
workflow tutorial) and T22 (weighted/survey HAD tutorial) remain
queued, both tracked in TODO.md.
Tests added (1 new, 89 total):
- test_had_step_3_flags_qug_under_survey_deferral: asserts both HAD
handler variants surface the QUG-under-survey skip and the
linearity-conditional-verdict caveat. Without this caveat agents may
assume step 1 / Design 1' vs Design 1 was checked on weighted fits
when the library deliberately does not check it there.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 00ed3ab commit d4b9091
3 files changed
Lines changed: 70 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
857 | 857 | | |
858 | 858 | | |
859 | 859 | | |
860 | | - | |
861 | | - | |
| 860 | + | |
| 861 | + | |
862 | 862 | | |
863 | 863 | | |
864 | 864 | | |
865 | 865 | | |
866 | 866 | | |
867 | 867 | | |
868 | | - | |
869 | | - | |
870 | | - | |
871 | | - | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
872 | 880 | | |
873 | 881 | | |
874 | 882 | | |
| |||
879 | 887 | | |
880 | 888 | | |
881 | 889 | | |
882 | | - | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
883 | 893 | | |
884 | 894 | | |
885 | 895 | | |
| |||
997 | 1007 | | |
998 | 1008 | | |
999 | 1009 | | |
1000 | | - | |
1001 | | - | |
| 1010 | + | |
| 1011 | + | |
1002 | 1012 | | |
1003 | 1013 | | |
1004 | | - | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
1005 | 1025 | | |
1006 | 1026 | | |
1007 | 1027 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2548 | 2548 | | |
2549 | 2549 | | |
2550 | 2550 | | |
2551 | | - | |
| 2551 | + | |
| 2552 | + | |
2552 | 2553 | | |
2553 | | - | |
| 2554 | + | |
2554 | 2555 | | |
2555 | 2556 | | |
2556 | 2557 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
690 | 690 | | |
691 | 691 | | |
692 | 692 | | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
693 | 730 | | |
694 | 731 | | |
695 | 732 | | |
| |||
0 commit comments