You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
P3 mass-point + survey vcov requirement: per had.py:3495-3507 the
mass-point design rejects the default classical vcov family on the
survey_design= path with NotImplementedError (the survey path composes
Binder-TSL on the HC1-scale influence function, which targets V_HC1
rather than the classical sandwich). The Step-6 sup-t / cband snippet
in _handle_had_event_study and the HAD section in llms-full.txt
presented weighted event-study fits as a generic survey_design= path
without surfacing this constraint, so the example as written would
fail at fit time on a mass-point panel.
Both surfaces now make the requirement explicit:
- The Step-6 snippet uses HeterogeneousAdoptionDiD(vcov_type='hc1', ...)
with an inline comment explaining that hc1 is required on mass-point
+ survey and is a no-op on the continuous designs (which use the
CCT-2014 robust SE regardless), making it a safe default for the
survey-aware example.
- A new "Mass-point + survey constraint" paragraph in the HAD section
of llms-full.txt documents the same requirement and routing.
Tests added (2 new, 92 total):
- test_had_event_study_sup_t_snippet_uses_hc1_for_mass_point_survey_compatibility:
asserts the sup-t / cband snippet either uses vcov_type='hc1' /
robust=True or surfaces the mass-point + survey vcov requirement
inline so agents adapting the snippet on a mass-point panel know to
add it.
- test_llms_full_had_section_documents_mass_point_survey_vcov_requirement:
asserts the HAD section documents the mass-point + survey vcov
requirement (vcov_type mention paired with mass-point context).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: diff_diff/guides/llms-full.txt
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -657,6 +657,8 @@ es = est.fit(data, outcome_col='y', unit_col='unit',
657
657
658
658
**Staggered panels.** On multi-cohort panels with `aggregate="event_study"`, `fit()` auto-filters to the last treatment cohort plus never-treated units (paper Appendix B.2) and emits a `UserWarning` naming kept/dropped counts. The estimand is then a **last-cohort-only WAS**, not a multi-cohort average. For full multi-cohort staggered support, see `ChaisemartinDHaultfoeuille`.
659
659
660
+
**Mass-point + survey constraint.** When fitting `design="mass_point"` with `survey_design=` (or the deprecated `survey=` alias), `vcov_type="hc1"` (or `robust=True`) is required: the survey path composes the standard error via Binder-TSL on the HC1-scale influence function, so the default classical sandwich path raises `NotImplementedError`. Passing `vcov_type="hc1"` is a safe default on weighted survey examples since `vcov_type` is unused on the continuous designs (CCT-2014 robust SE is the only formula there).
661
+
660
662
### StackedDiD
661
663
662
664
Stacked DiD estimator (Wing, Freedman & Hollingsworth 2024). Addresses TWFE bias with corrective Q-weights.
0 commit comments