Staggered DiD and the Negative-Weights Problem
In Lesson 3 the world was tidy: one policy, one date, two groups. New Jersey raised its wage in April 1992, Pennsylvania did not, and one line of lm(y ~ treat*post) recovered the effect. Real policies are almost never that clean. States legalise something in different years, a company rolls a feature out region by region, a hospital chain adopts a protocol ward by ward. Treatment arrives in waves.
For twenty years the standard response was to throw all the waves into one regression with unit and time fixed effects and read off a single coefficient. Around 2018 the field discovered that this move can quietly break, so badly that it can report a negative effect when every unit was helped. This lesson shows you exactly how, on a rollout you can run yourself, and what to do instead.
By the end you will be able to:
- Set up a staggered-adoption panel and see why one
treat*postno longer fits - Fit two-way fixed effects (TWFE) and catch it understating an effect you planted yourself
- Explain the forbidden comparison: already-treated units used as controls, and why a growing effect turns it negative
- Build a clean group-time estimate with a never-treated control, and read the event study it gives you
Prerequisites: Lesson 3 (the 2x2 DiD, lm(y ~ treat*post), and parallel trends). You can fit lm, read its coefficients, and subset a data frame in base R.
When treatment comes in waves
Here is our running example for the whole lesson. Northwind, a grocery chain, launches a customer loyalty program, but not everywhere at once. It pilots in one set of regions first, expands to a second set two years later, and holds a third set back as a comparison. Call them the early cohort (60 regions, program on in year 3), the late cohort (60 regions, year 5), and the never cohort (60 regions, no program in our window). The outcome is average weekly revenue per store.
We build the panel here so the numbers are ours to check. Each region gets its own baseline revenue level, revenue drifts up 1 unit a year for everyone, and the loyalty program adds a lift that grows the longer it has been running: +2 in its launch year, +4 the next year, +6 the year after. That growth is the detail that will matter most.
Plotting each cohort's average revenue over time makes the staggered shape obvious. Watch where each line bends upward.
The early line (dashed marker at year 3) breaks upward first and keeps accelerating as its lift compounds. The late line lifts off at year 5. The never line just drifts along the shared trend. Three groups, two switch-on dates: that is staggered adoption, and a single before/after split cannot describe it.