From the course: The Modern Stata Playbook: Critical Enhancements You Need to Know
Unlock this course with a free trial
Join today to access over 25,100 courses taught by industry experts.
Difference-in-differences analysis - Stata Tutorial
From the course: The Modern Stata Playbook: Critical Enhancements You Need to Know
Difference-in-differences analysis
Difference-in-difference analysis is a core tool for estimating causal treatment effects. It's widely used for policy and program evaluation purposes. Traditionally, Stata users had to build DID designs manually via interacting regresses in their regression. That's fine for simple 2x2 designs, but more cumbersome for repeated cross-sectional designs. The new DID regress command now lets you specify complex repeated cross-sectional designs directly and consistently. A classic 2x2 DID analysis uses at its core only four data points. You have two groups that are treated and controlled across two time periods, the pre- and post-period. You difference over time within each group, and then difference those differences. However, modern DID analysis often uses more than two time periods. It uses repeated time periods, before and after treatment. With repeated cross-sections, this same logic applies, but averages are taken over all pre and all post periods. Numerical examples are shown here in…