~/research/illustrative-diff-in-diff-employment-effects
Identifying Treatment Effects Under Selection
An interactive walkthrough of a full causal identification workflow — DAG, identification argument, difference-in-differences estimator, and robustness battery — built on clearly labeled synthetic data.
The Question
What is the effect of a minimum-wage increase on employment at low-wage-sector establishments in the treated counties, during the year surrounding the policy change?
The Theory
A minimum-wage increase raises the marginal cost of low-wage labor. Standard competitive labor-market models predict this should reduce employment as firms substitute away from labor. Search-and-matching or monopsony models predict a more ambiguous — even positive — effect, since firms with wage-setting power may have been paying below the competitive wage. Distinguishing between these mechanisms requires a credible empirical estimate, not just theory.
The Causal Graph
Click a confounder, mediator, collider, or selection node to add it to your adjustment set. Hover any node for its definition.
Node definition
Hover or focus a node to see its definition.
Adjustment set assessment
No controls selected yet. Click a confounder node to adjust for it.
Identification
Estimand
The average treatment effect of the minimum-wage increase on employment among low-wage-sector establishments in the treated counties, relative to the counterfactual in which the increase had not occurred.
Counterfactual
Employment in the treated counties had the minimum wage not increased, proxied by the observed trajectory of comparison counties that did not experience the policy change.
Why the comparison group is credible
Comparison counties are contiguous, economically linked labor markets that did not raise their minimum wage over the same period, chosen because they plausibly share pre-period employment trends with the treated counties.
Identifying assumptions
- Parallel trends: absent treatment, employment in treated and comparison counties would have evolved similarly.
- No anticipation: establishments did not adjust employment ahead of the announced increase.
- SUTVA: one county's treatment status does not affect another county's outcome (no cross-border spillovers).
- Comparison counties are themselves unaffected by the policy.
What would invalidate this
- A concurrent regional shock (e.g. a major employer closing) that hits treated counties differently than comparison counties.
- Divergent pre-trends between treated and comparison counties before the policy change.
- Substantial cross-border commuting or hiring that lets 'untreated' counties absorb part of the effect.
Method
Two-Way Fixed Effects Difference-in-Differences
Compares the change in employment before vs. after the policy in treated counties to the same before/after change in comparison counties, netting out any common time trend and any fixed differences between counties.
Y_{it} = \alpha_i + \lambda_t + \beta \,(\text{Treat}_i \times \text{Post}_t) + X_{it}'\gamma + \varepsilon_{it}Interactive Experiment
Change the specification below and watch the point estimate, event-study chart, and diagnostics update in real time — all computed client-side on synthetic data.
Specification
How strongly each county's underlying economic trend and industry mix drive both the timing of the policy and the employment outcome.
Which confounders the specification adjusts for.
Number of quarters before and after the policy change included in the sample.
Reseeds the synthetic panel while keeping the true effect fixed.
Two-way FE DiD · controls: regional-trend + industry · comparison: contiguous · window: ±4q
Estimate vs. true effect (known because data is synthetic)
True effect: -2.40 · thin vertical line marks it on the axis above.
Pre-trend slope
0.447
Near zero supports parallel trends; a large magnitude signals a violation.
Placebo estimate
— (off)
Computed on a fake treatment date inside the pre-period. Should be near zero if the design is credible.
Robustness
The event-study chart plots the treated/comparison gap for every pre-period quarter. A flat pre-period gap supports parallel trends; a sloped one (visible when confounding strength is high and 'Regional trend' is excluded from controls) signals a violation.