DiD Resources


I have collected links to several resources on this webpage to make Difference-in-Differences (DiD) materials even more accessible to the community.

I will update and add to these materials as time passes. So please keep an eye on this webpage!


Shorter DiD Overview Lectures


Modern Difference-in-Differences: Understanding some of the recent advances

I prepared this slide deck to present at NABE TEC 2024 in Seattle in October 2024. It introduces DiD to a broader audience and outlines the problems and solutions associated with staggered treatment adoption.

Difference-in-Differences: A brief guide to practice

This is the slide deck I have prepared to present at Instacart in September 2024. It overviews the basics of DiD, discusses a DML DiD implementation that leverages covariates, and then discusses staggered adoption.

Recent Advances in DiD Methods: A selective (and personal) perspective

I prepared this slide deck for a guest lecture at USP in Brazil in November 2022. It summarizes the "big course" into a two-hour lecture.


A Comprehensive Course on DiD


I have assembled these 14 slide decks to help more people start or deepen their journey through DiD methods. These slides are inspired by my 30-to-40 hours DiD course at Causal Solutions.

Lecture 1: Introduction

[Summary] [Slides]

Lecture 2: Classical 2x2 DiD Setup

[Summary] [Slides]

Lecture 3: Clustering Issues

[Summary] [Slides]

Lecture 4: Parallel Trends and Functional Form

[Summary] [Slides]

Lecture 5: How Covariates can make your DiD More Plausible

[Summary] [Slides]

Lecture 6: Leveraging Advances in Machine Learning

[Summary] [Slides]

Lecture 7: Leveraging Repeated Cross-Sectional Data

[Summary] [Slides]

Lecture 8: Learning about Treatment Effect Dynamics via Event Studies

[Summary] [Slides]

Lecture 9: TWFE with multiple periods

[Summary] [Slides]

Lecture 10: Pre-tests

[Summary] [Slides]

Lecture 11: The Problems of TWFE with Staggered Treatment Adoption

[Summary] [Slides]

Lecture 12: Reliable Estimators with Staggered Treatment Adoption

[Summary] [Slides]

Lecture 13: Challenges with Treatments Turning On-and-Off

[Summary] [Slides]

Lecture 14: Random Treatment Timing

[Summary] [Slides]

Other Topics To Be Covered

- Triple Differences
- DiD with Continuous Treatment
- Instrumented DiD
- Synthetic DiD and related extensions
- Heterogeneity analysis in DiD


DiD Checklist


Over the years, many people have asked me for advice on best practices for conducting their DiD analysis. I created the following checklist to provide a first-order approximation of these questions. Please do not take it literally. It is meant to be interpreted more as an informal guide than a protocol.


DiD Review Paper


If you are interested in a succinct overview of the (by then) recent DiD literature, see my Journal of Econometrics paper, “What’s trending in difference-in-differences? A synthesis of the recent econometrics literature”. Over there, we provided a checklist for practitioners that you may find helpful.


DiD Packages


I have co-created several DiD packages, as I describe below:

did / csdid

Implements a variety of DiD estimators in setups that potentially have multiple periods, staggered treatment adoption, and when parallel trends may only be plausible after conditioning on covariates. Based on Callaway and Sant'Anna (2021).
[R package] [Stata package] [Python package]

DRDID / drdid

Implements 2x2 DiD estimators in setups where the parallel trends assumption holds after conditioning on a vector of pre-treatment covariates. Based on Sant'Anna and Zhao (2020).
[R package] [Stata package] [Python package]

staggered

Implements the efficient estimator for settings with (quasi-)random treatment timing proposed in Roth and Sant'Anna (2023, JPE: Micro). It also implements the design-based versions of Callaway & Sant'Anna and Sun & Abraham estimators (without covariates).
[R package] [Stata package]

didFF

Implementes a test for whether parallel trends is insensitive to functional form by estimating the implied density of potential outcomes under the null and checking if it is significantly below zero at some point. Based on Roth and Sant'Anna (2023, ECMA).
[R package]


Other Teaching Materials


Here are some additional materials developed by some of my friends that cover topics that I have not covered in my lectures:

Brant Callaway's Frontier on DiD Mixtape Workshop

[Introduction] [Relaxing Parallel Trends] [More Complicated Treatment Regimes] [Alternative Identification Strategies]

Jon Roth's Advanced DiD Mixtape Workshop

[Introduction] [Staggered Treatment Timing] [Violations of Parallel Trends]