Difference-in-Differences (DiD)

Difference-in-Differences with Geocoded Microdata: When Distance Defines Treatment

When the 'treatment' is a point in space, distance becomes the running variable. We walk through the parametric ring DiD and a data-driven nonparametric alternative, first on a simulated world with a known answer, then on Linden and Rockoff's home-prices study, and reconcile a parametric −5.78 % with a nonparametric −20.6 %.

Difference-in-Differences for Regional Data: Did Medicaid Expansion Reduce Mortality?

A case study on the Affordable Care Act's Medicaid expansion --- working through 2x2 cell-means, TWFE, covariate-adjusted DRDID, 2xT and Callaway-Sant'Anna staggered event studies, and HonestDiD sensitivity --- to show how population weighting changes the target parameter when the units are regions of very different sizes.

Introduction to Difference-in-Differences (DiD) in Python

Learn Difference-in-Differences (DiD) in Python using PyFixest and Great Tables. Covers the 2x2 design, TWFE regression, inference comparison, publication-quality tables, event studies, and parallel trends testing based on Corral and Yang (2024).

Introduction to Difference-in-Differences (DiD) in Stata

Learn Difference-in-Differences (DiD) in Stata using a case study of an after-school tutoring program. Covers the 2x2 design, TWFE regression, event studies, and parallel trends testing based on Corral and Yang (2024).

Difference-in-Differences for Policy Evaluation: A Tutorial using R

A guide to Difference-in-Differences with staggered treatment --- from TWFE pitfalls through Callaway-Sant'Anna group-time ATTs, doubly robust estimation, and HonestDiD sensitivity analysis --- applied to minimum wage effects on teen employment.

Sensitivity Analysis for Parallel Trends in Difference-in-Differences Using honestdid in Stata

Assess how robust difference-in-differences results are to violations of parallel trends using the honestdid package in Stata, progressing from a simple 2x2 DiD to multi-period event studies with relative magnitudes and smoothness restrictions

Introduction to Difference-in-Differences in Python

Estimating causal treatment effects using Difference-in-Differences with the diff-diff package, from the classic 2x2 design through staggered adoption with Callaway-Sant'Anna and HonestDiD sensitivity analysis

Heterogeneous treatment effects via two-stage DID

An introduction to heterogeneous treatment effects using the two-stage DID estimator of Gardner (2021)

Staggered DiD (Ex1)

An introduction to difference in differences with multiple time periods and staggered treatment adoption.

Staggered DiD

An introduction to difference in differences with multiple time periods and staggered treatment adoption.