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

  1. Design check: Confirm treatment/control assignment and timing
  2. Parallel trends: Test with pre-treatment event study regression
  3. Baseline regression: 2×2 DID or TWFE regression
  4. Staggered design check: If adoption dates vary, use robust estimators
  5. Robustness: Placebo treatment, alternative control groups, callaway-santanna
Installs
1
GitHub Stars
3.4K
First Seen
Jun 21, 2026
did-analysis — brycewang-stanford/auto-empirical-research-skills