Commit 07d4741
Port R
Port ~21 tests from R's `did` package (bcallaway11/did) to validate
CallawaySantAnna estimator. Tests organized as Tier 1 (Python DGP, loose
tolerance, always-run) and Tier 2 (R golden values, strict tolerance).
Found and fixed two bugs via the ported tests:
- not_yet_treated control group now works without never-treated units
(requires ≥2 treatment cohorts)
- not_yet_treated control mask now uses max(t, base_period) to prevent
contamination when base_period="universal" exceeds evaluation period
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>did package tests and fix not_yet_treated control group bugs1 parent d7b394c commit 07d4741
8 files changed
Lines changed: 2399 additions & 17 deletions
File tree
- benchmarks
- R
- data
- diff_diff
- docs/methodology
- tests
- helpers
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
157 | 169 | | |
158 | 170 | | |
159 | 171 | | |
| |||
0 commit comments