Skip to content

Commit 0638426

Browse files
igerberclaude
andcommitted
Address PR #372 R12 review (1 P2): Survey Support section overstates uniform contract
P2 - README.md L131-137 advertised "all estimators accept survey_design" with "weight types pweight/fweight/aweight" as a uniform contract, but: - HeterogeneousAdoptionDiD.fit() uses survey= / weights= (not survey_design=) - HAD continuous path rejects non-pweight survey designs - CallawaySantAnna and StackedDiD are also pweight-only A reader could reasonably try `SurveyDesign(..., weight_type="aweight")` on any estimator and hit a NotImplementedError. Rewrite the Survey Support section to: - Say "Most" not "All" estimators accept survey_design, with explicit callout of HAD's distinct survey= / weights= API - Defer per-estimator weight-type support to the existing compatibility matrix on RTD instead of claiming uniform pweight/fweight/aweight - Note explicitly that some surfaces (CS, StackedDiD, HAD continuous) are pweight-only while others accept all three weight types - Cite Binder (1983) for TSL alongside the methods list Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 41107c8 commit 0638426

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,12 @@ Full guide: `diff_diff.get_llm_guide("practitioner")`.
128128

129129
## Survey Support
130130

131-
All estimators accept an optional `survey_design` parameter for design-based variance estimation:
131+
Most estimators accept an optional `survey_design` parameter (or `survey=` / `weights=` for `HeterogeneousAdoptionDiD`) for design-based variance estimation. Coverage and supported weight types vary by estimator - see the [Survey Design Support compatibility matrix](https://diff-diff.readthedocs.io/en/stable/choosing_estimator.html#survey-design-support) for the per-estimator support table.
132132

133-
- **Design elements**: strata, PSU, FPC, weight types (pweight/fweight/aweight), lonely PSU handling, nest
134-
- **Variance methods**: Taylor Series Linearization (TSL), replicate weights (BRR/Fay/JK1/JKn/SDR), survey-aware bootstrap
133+
- **Design elements available across the supported set**: strata, PSU, FPC, lonely PSU handling, nest. Weight types vary by estimator: some surfaces (e.g. CallawaySantAnna, StackedDiD, the HAD continuous path) accept `pweight` only; others accept `pweight` / `fweight` / `aweight`.
134+
- **Variance methods**: Taylor Series Linearization (TSL via Binder 1983), replicate weights (BRR / Fay / JK1 / JKn / SDR), survey-aware bootstrap
135135
- **Diagnostics**: DEFF per coefficient, effective n, subpopulation analysis, weight trimming, CV on estimates
136136
- **Repeated cross-sections**: `CallawaySantAnna(panel=False)` for BRFSS, ACS, CPS
137-
- **Compatibility matrix**: see [Survey Design Support](https://diff-diff.readthedocs.io/en/stable/choosing_estimator.html#survey-design-support)
138137

139138
No other Python or R DiD package offers design-based variance estimation for modern heterogeneity-robust estimators.
140139

0 commit comments

Comments
 (0)