PCD01: Introduction to Difference in Differences in Stata

Conference: Conference on Statistical Practice (CSP) 2024
02/29/2024: 2:00 PM - 4:00 PM CST
Special Event 
Room: Orleans 

Description

This talk will briefly introduce the concepts and jargon of difference-in-differences (DID) models and show how to fit the models using Stata's suite of DID commands. We will demonstrate how to fit models for repeated cross-sectional data using 'didregress' and for panel/longitudinal data using 'xtdidregress'. We will also fit heterogeneous DID models where the average treatment effect varies over time or cohort using 'hdidregress' and 'xthdidregress'. We will discuss the model assumptions and how to check these assumptions after fitting a model. We can check the parallel-trends assumption using 'estat trendplots' and 'estat ptrends' and we can check for anticipation of treatment using 'estat granger'. After fitting heterogeneous DID models, we will also demonstrate how to aggregate the average treatment effect among the treated (ATET) using 'estat aggregation' and how to visualize the trends in ATETs using 'estat atetplot'.
Outline and Objectives
----------------------
I. Introduction to the concept of difference in differences (DID)
II. Different Commands For Different Situations
a. Cross-sectional data and 'didregress'
b. Panel/Longitudinal data and 'xtdidregress'
c. Heterogeneous repeated cross-sectional data and 'hdidregress'
d. Heterogeneous panel/longitudinal data and 'xthdidregress'
III. Checking Model Assumptions and Visualization of Results
a. The parallel-trends assumption and 'estat trendplots' and 'estat ptrends'
b. Anticipation of treatment and 'estat granger'
c. Aggregation of average treatment effects using 'estat aggregation'
d. Visualize trends of average treatment effects using 'estat atetplot'

Speaker

Chuck Huber, StataCorp LLC