Difference-in-differences (DiD) estimates the effect of a time-related event by comparing the before–after change in a treated group with the corresponding change in an unaffected comparison group. This separates the event’s apparent effect from changes that affect both groups over time. section 11.4 section 11.8
Apply the method by following this structure:
- Measure the treated group’s change: outcome after treatment minus outcome before treatment. section 11.4.5
- Measure the comparison group’s change over the same periods. section 11.4.5
- Subtract the comparison-group change from the treated-group change. The result estimates the average treatment effect on the treated. section 11.4 section 11.4.5
- Treat the estimate as causal only when, without the event, both groups would have followed the same path of development. section 11.4
A movie-release comparison
Suppose a streaming service wants to know whether releasing Star Wars movie VII increased views of the previous six Star Wars films. Compare their before–after change with the change for three unaffected Lord of the Rings films. If Star Wars views rise by 300 relative to their earlier level while Lord of the Rings views rise by 100, DiD attributes the remaining 200 increase to the release, subject to the same-path assumption. section 11.4
Figure 11.18 Simulated panel data example. The group with D = 1 represents Star Wars movies, and the group with D = 0 represents LoTR movies. Lines help us to visualize the change of trend due to the release of the new movie.
Use the simulated panel-data figure to inspect the treated and control groups, their before–after trends, and the change attributed to the release. section 11.4
