did-analysis
Installation
SKILL.md
Difference-in-Differences (DID) Skill
This skill guides complete DID analysis: from assumption validation and model specification to staggered treatment designs and event study regressions. Designed for policy evaluation and natural experiment settings.
Core DID Logic
DID compares the change in outcomes for a treatment group before and after treatment to the change for a control group over the same period.
DID Estimator = (Ȳ_treat,post − Ȳ_treat,pre) − (Ȳ_ctrl,post − Ȳ_ctrl,pre)
Key Assumption (Parallel Trends): In the absence of treatment, the treatment group's outcome would have evolved in parallel with the control group.
DID Workflow
- Design check: Confirm treatment/control assignment and timing
- Parallel trends: Test with pre-treatment event study regression
- Baseline regression: 2×2 DID or TWFE regression
- Staggered design check: If adoption dates vary, use robust estimators
- Robustness: Placebo treatment, alternative control groups, callaway-santanna