Conversation
Create docs/methodology/survey-theory.md — a formal justification for why design-based variance estimation (TSL, replicate weights) is valid when combined with modern heterogeneity-robust DiD influence functions. The document bridges two literatures that have developed in parallel: survey statistics (Binder 1983, Rao & Wu 1988) and modern DiD (Callaway & Sant'Anna 2021, Sant'Anna & Zhao 2020). The core argument is that modern DiD estimators are smooth functionals whose IFs are properties of the functional, not the sampling design, so Binder's theorem applies. Includes a lit review showing that all foundational DiD papers assume iid sampling, existing software (R did, Stata csdid) ignores survey design for variance, and no prior work formally derives this combination. Also updates doc-deps.yaml and marks Phase 10a complete in survey-roadmap. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Overall Assessment This is a docs-only PR, but the new theory document is itself the deliverable here. I found two P1 methodology inaccuracies in the variance discussion, plus one P2 support-matrix mismatch. Executive Summary
Methodology
Code Quality
Performance
Maintainability
Tech Debt
Security
Documentation/Tests
Path to Approval
|
- P1: Correct scalar TSL/IF equivalence paragraph to distinguish residual-scale EIF (compute_survey_vcov input) from score-scale psi (compute_survey_if_variance input), matching EfficientDiD's actual usage - P1: Rewrite replicate-weight section to document both combined_weights modes, carve out ImputationDiD/TwoStageDiD refit path, and drop incorrect "Rao-Wu reweighting" label - P2: Remove TripleDifference from PSU multiplier bootstrap list to match choosing_estimator.rst compatibility matrix - P3: Fix TROP description to note precomputed tau optimization per REGISTRY.md - P3: Replace all hard-coded survey.py line numbers with function names Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
/ai-review |
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall Assessment ✅ Looks good Executive Summary
Methodology
Code Quality
Performance
Maintainability
Tech Debt
Security
Documentation/Tests
|
Summary
docs/methodology/survey-theory.md— formal justification for design-based variance estimation (TSL, replicate weights) with modern heterogeneity-robust DiD influence functionsdocs/doc-deps.yamlto track the new methodology file underdiff_diff/survey.pydocs/survey-roadmap.mdMethodology references (required if estimator / math changes)
Validation
Security / privacy
Generated with Claude Code