Causal Inference with Difference in Differences

You are reading version 1 of this direction, frozen 2026-10-04. The latest version is version 2.

Version 1 of 2147 papers148 conceptsfrozen 2026-10-04

In the social and medical sciences, we rarely have the luxury of a laboratory. We cannot easily run a randomized controlled trial to see how a new tax law affects a nation's innovation or how a global pandemic alters the way scientists collaborate. Instead, researchers rely on "natural experiments"—events where a policy, technology, or crisis creates a "treatment" group and a "control" group by happenstance.

The primary tool for navigating these natural experiments is Difference-in-Differences (DiD). Across dozens of fields, from urban planning to AI development, DiD allows researchers to move beyond simple correlation and isolate the causal impact of a specific intervention.

The Logic of Double Subtraction

The core challenge of observational data is the "counterfactual" problem: we don't know what would have happened to the treated group if the treatment had never occurred.

If we simply look at a group before and after an event, we might mistake a general trend (like a growing economy) for the effect of the event itself. If we simply compare two different groups at one point in time, we might mistake pre-existing differences for the effect of the event.

DiD solves this through a "double subtraction." As explained in THE LONDON CONGESTION CHARGE AND PROPERTY PRICES by Hui-Fai Shing, the method works by:

  1. Calculating the change over time in the treatment group (which includes the effect of the intervention plus the effect of time).
  2. Calculating the change over time in a control group (which includes only the effect of time).
  3. Subtracting the second from the first to isolate the "net" effect of the intervention.

The "magic" of DiD relies on a single, critical assumption: Parallel Trends. For the math to work, we must assume that in the absence of the intervention, the treatment and control groups would have followed the same trajectory over time.

When Donald Byard and Ying Li investigated whether Mandatory IFRS Adoption in the EU leveled the playing field for financial analysts, they used a change-regression framework to ensure that the shift they observed wasn't just a global trend in accounting, but a specific result of the regulatory change. By comparing EU firms to those in countries that didn't adopt the standards, they could filter out the "noise" of global market fluctuations.

Evaluating Policy and Regulation

DiD is the gold standard for evaluating whether government "sticks" and "carrots" actually work. In Environmental protection tax and green innovation of heavily polluting enterprises, Juqiu Deng and colleagues used a quasi-natural experiment to show that China’s 2018 tax law forced polluting firms to innovate. Because the tax only applied to certain industries, the researchers could use non-polluting firms as a control group to prove the tax was the specific driver of R&D spending.

Similarly, Meijuan Liu used DiD to study The effect of environmental regulations on innovation, finding that holding local officials accountable for natural resources only spurred corporate innovation when combined with government subsidies. The DiD framework allowed them to separate the "accountability" effect from general economic growth.

Measuring Technological and Social Shocks

When a new technology like ChatGPT is released, it affects everyone, but not equally. This creates a perfect opportunity for DiD. Shaojun Xu and Xiaohui Ye applied this to the writing style of physicists. By comparing the abstracts of non-native English speakers (the treatment group) to native speakers (the control group) before and after ChatGPT’s release, they isolated a significant boost in writing quality specifically for the non-native group.

The same logic applies to physical infrastructure. David R. Keith and Shenhao Wang used DiD to measure the Effects of electric vehicle charging stations on local businesses. By comparing businesses near new charging stations to those further away, they proved that the stations—not just a general increase in neighborhood popularity—caused a spike in foot traffic.

Uncovering Hidden Disparities

Perhaps the most vital use of DiD is in identifying how events affect different populations differently. In Racial/Ethnic Differences in Long-COVID-Associated Symptoms, Dazheng Zhang and Bingyu Zhang used the method to isolate the impact of a COVID-19 infection from pre-existing health disparities.

By comparing the change in health outcomes for infected children against a control group of uninfected children within the same racial groups, they could identify symptom clusters—like hair loss or cognitive changes—that were uniquely attributable to the virus rather than baseline environmental risks.

Why It Works

DiD works because it acknowledges that the world is messy and constantly changing. Instead of trying to find two identical groups, it finds two groups that are changing in the same way. By focusing on the deviation from the trend, researchers like Cheryl K. Zogg and David Metcalfe can prove that England’s Pay for performance and hip fracture outcomes actually saved lives, rather than just benefiting from a general improvement in medical technology that was happening everywhere.

Papers in this version

Showing 60 of 147 papers.

History & citationVersion 2 · 2026-10-04

Current · Permanent link

  1. Version 2 (latest) · 2026-10-04 · 252 papers
  2. Version 1 · 2026-10-04 · 147 papers
Cite this direction

Latest version (a living page):

@misc{lacuna_difference_in_differences_analysis_805d0c32,
  title = {difference-in-differences analysis},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/difference-in-differences-analysis/rdr_805d0c32fdbf4259a3c36cb8eeebab4b},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-20},
}

This exact version (version 1, frozen text):

@misc{lacuna_causal_inference_with_difference_in_diff_805d0c32_v1,
  title = {Causal Inference with Difference in Differences},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/causal-inference-with-difference-in-differences/rdr_805d0c32fdbf4259a3c36cb8eeebab4b/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-20},
}