Course contentsShow
← Data Science
Lesson 1458 of 2,14536. Causal Inference BasicsFree lesson

Common DiD Pitfalls

Recognize violations like anticipation effects, spillovers, and compositional changes that threaten validity.

Common DiD Pitfalls

You'll learn: How to recognize violations that undermine the validity of your Difference-in-Differences analysis.

Even when your DiD setup looks promising and parallel trends seem satisfied, several pitfalls can invalidate your causal conclusions. Being aware of these common threats helps you design more robust analyses and interpret results cautiously.

Anticipation Effects

Anticipation occurs when units change behavior before treatment actually occurs. Imagine announcing a new tax policy six months before implementation—businesses might adjust hiring or investment immediately. Your "pre-treatment" data is contaminated, making the parallel trends assumption meaningless. The control group continues normally while the treatment group has already shifted, creating artificial differences.

Spillover Effects

Spillovers happen when the treatment affects the control group indirectly. If you're studying a minimum wage increase in one city (treatment) and comparing it to a neighboring city (control), workers or businesses might migrate between cities. The control group is no longer truly untreated, biasing your treatment effect estimate—usually downward, since the control group experiences partial treatment.

Compositional Changes

Compositional changes occur when the makeup of your treatment or control groups changes over time. Suppose you're studying firm performance after a regulation. If weaker firms exit the market post-treatment, your surviving treatment group looks artificially successful. You're not measuring the true treatment effect—you're measuring selection bias. Similarly, migration patterns or sample attrition can distort group composition.

Other Common Issues

Watch for policy confounds (other interventions happening simultaneously) and measurement changes (how outcomes are recorded shifts over time). Both can masquerade as treatment effects.

Key Takeaway: DiD validity requires more than parallel pre-trends—you must rule out anticipation effects, spillovers, compositional changes, and contemporaneous shocks that could generate spurious treatment effects.