|
3 | 3 | > An 8-step workflow for rigorous Difference-in-Differences analysis, based on |
4 | 4 | > Baker et al. (2025) "Difference-in-Differences Designs: A Practitioner's |
5 | 5 | > Guide" and adapted for the diff-diff library. Some steps are reorganized or |
6 | | -> extended relative to the paper (see docs/methodology/REGISTRY.md for details). |
| 6 | +> extended relative to the paper: |
| 7 | +> |
| 8 | +> - **Numbering**: diff-diff uses 1-Define, 2-Assumptions, 3-Test PT, |
| 9 | +> 4-Choose estimator, 5-Estimate, 6-Sensitivity, 7-Heterogeneity, |
| 10 | +> 8-Robustness. The paper uses 1-Define, 2-Assumptions, 3-Estimation method, |
| 11 | +> 4-Uncertainty, 5-Estimate, 6-Sensitivity, 7-Heterogeneity, 8-Keep learning. |
| 12 | +> - **Parallel trends testing** is a separate Step 3 (the paper embeds it in |
| 13 | +> Step 2), to ensure AI agents execute it as a distinct action. |
| 14 | +> - **Sources of uncertainty** (paper's Step 4) are folded into Step 5 |
| 15 | +> (Estimate) with an explicit cluster-count check directive: >= 50 clusters |
| 16 | +> for asymptotic SEs, otherwise wild bootstrap. The 50-cluster threshold is |
| 17 | +> a diff-diff convention. |
| 18 | +> - **Step 8** is "Robustness & Reporting" (compare estimators, report with |
| 19 | +> and without covariates). The paper's Step 8 is "Keep learning." The |
| 20 | +> mandatory with/without covariate comparison is a diff-diff convention. |
7 | 21 |
|
8 | 22 | ## Instructions for AI Agents |
9 | 23 |
|
@@ -282,7 +296,8 @@ to your estimator's API. Examples: |
282 | 296 | - **StackedDiD**: vary `clean_control` definition |
283 | 297 | - **EfficientDiD**: compare `control_group='never_treated'` vs `'last_cohort'` |
284 | 298 | - **ImputationDiD/TwoStageDiD**: leave-one-cohort-out, cross-estimator comparison |
285 | | -- **SyntheticDiD/TROP**: in-time or in-space placebo (fake treatment date, leave-one-unit-out) |
| 299 | +- **SyntheticDiD**: built-in diagnostics on the results object - `results.in_time_placebo()`, `results.get_loo_effects_df()` (requires `variance_method="jackknife"` at fit time), `results.sensitivity_to_zeta_omega()`, and `results.get_weight_concentration()` |
| 300 | +- **TROP**: in-time or in-space placebo (fake treatment date, leave-one-unit-out) |
286 | 301 |
|
287 | 302 | ```python |
288 | 303 | from diff_diff import run_all_placebo_tests |
|
0 commit comments