grad-did
Installation
SKILL.md
雙重差分法 (Difference-in-Differences)
Overview
Difference-in-Differences (DID) estimates causal effects by comparing the change in outcomes over time between a treatment group (affected by an intervention) and a control group (unaffected). By differencing out both time-invariant group differences and common time trends, DID isolates the treatment effect under the parallel trends assumption.
When to Use
- Evaluating the impact of a policy, regulation, or intervention
- A natural experiment assigns treatment at a group level (state, industry, firm)
- Panel or repeated cross-section data with pre- and post-treatment periods
- Randomized experiment is infeasible but a plausible control group exists
When NOT to Use
- Parallel trends assumption is violated and cannot be remedied
- Treatment and control groups differ in ways that change over time
- Treatment is self-selected based on anticipated outcomes (anticipation effects)
- Only post-treatment data are available (no pre-treatment baseline)