Commit 3de72d1
Add EfficientDiD estimator (Chen, Sant'Anna & Xie 2025, Phase 1)
Implement the semiparametrically efficient ATT estimator for DiD with
staggered treatment adoption (no-covariates path). The estimator achieves
the efficiency bound by optimally weighting across pre-treatment periods
and comparison groups via the inverse of the within-group covariance
matrix Omega*. Under PT-All the model is overidentified and EDiD exploits
this for tighter inference; under PT-Post it reduces to standard CS.
New files:
- efficient_did.py: main EfficientDiD class with sklearn-like API
- efficient_did_weights.py: Omega* matrix, efficient weights, EIF
- efficient_did_bootstrap.py: multiplier bootstrap mixin
- efficient_did_results.py: EfficientDiDResults dataclass
- tests/test_efficient_did.py: 42 tests across 4 tiers
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent bf4389a commit 3de72d1
7 files changed
Lines changed: 2738 additions & 0 deletions
File tree
- diff_diff
- docs/methodology
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
131 | 136 | | |
132 | 137 | | |
133 | 138 | | |
| |||
172 | 177 | | |
173 | 178 | | |
174 | 179 | | |
| 180 | + | |
175 | 181 | | |
176 | 182 | | |
177 | 183 | | |
| |||
231 | 237 | | |
232 | 238 | | |
233 | 239 | | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
234 | 245 | | |
235 | 246 | | |
236 | 247 | | |
| |||
0 commit comments