VerifiedEvidence: highv1.0.0

Difference-in-Differences

A quasi-experimental technique estimating a policy's causal effect by comparing the change in outcomes over time between an exposed and a comparable unexposed group.

Last reviewedDarrin Baines IP Ltd

Concept Architecture

Concept


Theoretically, Difference-in-Differences (DiD) is a quasi-experimental causal inference method used to estimate the effect of an intervention or policy by comparing changes in outcomes over time between an exposed group and an unexposed comparison group. It is founded on the counterfactual framework and assumes that, in the absence of the intervention, both groups would have followed parallel outcome trends. In health economics, Difference-in-Differences is widely used to evaluate healthcare policies, reimbursement reforms, public health interventions and changes in healthcare delivery when randomised experiments are not feasible.

Mathematically, Difference-in-Differences estimates the treatment effect as the difference between the pre-post change observed in the intervention group and the corresponding pre-post change observed in the control group. The method is commonly implemented using linear regression models containing treatment, time and treatment-by-time interaction terms, with the interaction coefficient representing the estimated causal effect.

In practice, Difference-in-Differences is applied to longitudinal observational data, administrative healthcare databases and routinely collected health records. Analysts assess the validity of the parallel trends assumption before estimating treatment effects, which are subsequently incorporated into health economic evaluations, budget impact analyses and health technology assessments.


Purpose

Used to estimate the causal effect of healthcare interventions or policies from observational longitudinal data by comparing changes over time between intervention and comparison groups.


Mathematical Formulae

Primary Formula

DiD = (Y?,Post ? Y?,Pre) ? (Y?,Post ? Y?,Pre)

where:

  • Y? = intervention group outcome
  • Y? = control group outcome
  • Pre = before intervention
  • Post = after intervention

Supporting Formulae

Y = ?? + ??Treatment + ??Post + ??(Treatment ? Post) + �

DiD = ??

Related Mathematical Methods

  • Quasi-experimental design
  • Causal inference
  • Linear regression
  • Fixed effects models
  • Panel data analysis
  • Event study analysis

Example

A new hospital payment policy is introduced in one region but not another. Hospital admissions per 1,000 population are measured before and after implementation.

  • Intervention region: 120 before, 95 after
  • Control region: 118 before, 108 after

DiD = (95 ? 120) ? (108 ? 118)

DiD = (?25) ? (?10)

DiD = ?15 admissions per 1,000 population

The policy is therefore associated with an estimated reduction of 15 admissions per 1,000 population beyond the change observed in the comparison region.


Excel Implementation

FunctionExample FormulaHealth Economics Application
AVERAGEIFS=AVERAGEIFS(Outcome,Treatment,1,Period,"Post")Calculates post-intervention mean for the intervention group
AVERAGEIFS=AVERAGEIFS(Outcome,Treatment,1,Period,"Pre")Calculates pre-intervention mean for the intervention group
AVERAGEIFS=AVERAGEIFS(Outcome,Treatment,0,Period,"Post")Calculates post-intervention mean for the control group
Formula=(PostTreat-PreTreat)-(PostControl-PreControl)Calculates the Difference-in-Differences estimate
LINEST=LINEST(Y2:Y501,X2:Z501,TRUE,TRUE)Estimates the regression-based Difference-in-Differences model

VBA (Optional)

VBA can automate Difference-in-Differences estimation across multiple outcomes, intervention periods and subgroup analyses while producing standardised summary tables.


Sources

  • Card D, Krueger AB. Minimum Wages and Employment: A Case Study of the Fast Food Industry in New Jersey and Pennsylvania. American Economic Review.
  • Angrist JD, Pischke JS. Mostly Harmless Econometrics: An Empiricist's Companion.
  • Wooldridge JM. Econometric Analysis of Cross Section and Panel Data.
  • Hern�n MA, Robins JM. Causal Inference: What If.
  • Drummond MF, Sculpher MJ, Claxton K, Stoddart GL, Torrance GW. Methods for the Economic Evaluation of Health Care Programmes.

Library

Publications

1
  • Journal article

    Good Practices for Real-World Data Studies of Treatment and/or Comparative Effectiveness: Recommendations from the Joint ISPOR-ISPE Special Task Force on Real-World Evidence in Health Care Decision Making — Berger, Sox, Willke, Brixner, Eichler, Goettsch, Madigan, Makady, Schneeweiss, Tarricone, Wang, Watkins & Mullins, Vol. 20, No. 8 ed., 2017 (Value in Health)

    The joint ISPOR-ISPE recommendations on good procedural practice for real-world data studies (observational studies and registries) used to inform healthcare decisions — study registration, replicability and stakeholder involvement — the reference for RWE credibility in HTA.

Frequently Asked Questions (6)

  • What is difference-in-differences?

    A quasi-experimental technique estimating a policy's causal effect by comparing the change in outcomes over time between an exposed and a comparable unexposed group.

    Source: Card & Krueger 1994

  • How does difference-in-differences isolate a policy's effect?

    Difference-in-differences estimates a policy's effect by comparing how outcomes changed over time in a group exposed to it against the change over the same period in a comparable group that was not. Subtracting the unexposed group's change from the exposed group's removes both fixed differences between the groups and any trend affecting them alike, leaving the change attributable to the policy. Its validity rests on the assumption that, absent the policy, both groups would have moved in parallel. It differences out shared trends. Dimick and Ryan (2014) describe this method.

    Source: Dimick & Ryan 2014

  • How does difference-in-differences work?

    Difference-in-differences works by measuring outcomes in an exposed and an unexposed group both before and after the intervention, computing the change over time in each group, and taking the difference between these changes. The unexposed group's change estimates what would have happened to the exposed group without the intervention, so subtracting it removes common time trends and any fixed differences between the groups, leaving the intervention's effect. This double differencing isolates the causal effect under the assumption that, absent the intervention, the two groups' outcomes would have followed parallel trends.

    Source: Angrist & Pischke 2009

  • What is the parallel trends assumption in difference-in-differences?

    The parallel trends assumption is the key condition underlying difference-in-differences: it holds that, in the absence of the intervention, the outcomes of the exposed and unexposed groups would have followed parallel paths over time, so the unexposed group's change validly represents what the exposed group's change would have been without the intervention. If this assumption holds, the difference-in-differences estimate captures the causal effect. If the groups' trends would have diverged anyway, the estimate is biased. Because parallel trends cannot be fully verified, its plausibility is assessed, often by examining pre-intervention trends.

    Source: Angrist & Pischke 2009

  • Why is difference-in-differences used?

    Difference-in-differences is used to estimate the causal effect of policies or interventions when randomisation is impossible but an intervention affects one group and not another, and before-and-after data are available for both. By controlling for fixed differences between groups and common time trends, it provides stronger causal inference than a simple before-and-after or between-group comparison. It is widely used in economics and policy evaluation, such as assessing the effects of a law or programme applied to some regions or groups. So difference-in-differences offers a practical quasi-experimental approach to evaluating real-world interventions.

    Source: Card & Krueger 1994

  • What are the limitations of difference-in-differences?

    The limitations of difference-in-differences centre on the parallel trends assumption, which cannot be fully verified and, if violated because the groups would have diverged anyway, biases the estimate; on the need for a suitable comparison group and before-and-after data; and on threats such as other events affecting one group differently at the same time, or changes in group composition. Its validity depends on these conditions holding. These limitations mean difference-in-differences estimates are interpreted with attention to the plausibility of parallel trends, often supported by examining pre-intervention trends and testing robustness, and held with appropriate caution.

    Source: Card & Krueger 1994

Trust Record

Verified by Dr Darrin Baines

British health economist

Professional identity: darrinbaines.org

Verification date: 20 Nov 2025

Content version: 1.0.0

Canonical Identity

Term code
HE-ES-CER-008

Stable URI · Machine-readable · Resolvable · CC BY 4.0