Skip to content
Statistics

What is difference-in-differences?

A method that estimates a causal effect by comparing the change over time in a treated group with the change in an untreated group over the same period. Subtracting the control group's change removes trends that affect both groups, such as seasonality.

datasciencetrivia.com

Card 1 of 276. Answer: A method that estimates a causal effect by comparing the change over time in a treated group with the change in an untreated group over the same period. Subtracting the control group's change removes trends that affect both groups, such as seasonality.

Created by santiviquez

About · Quizzes · History of AI · To suggest new questions or report an error send me a dm.

The longer answer

It needs data from before and after the treatment for both groups, and one key assumption: parallel trends, meaning that without the treatment the treated group would have changed by the same amount as the control. In regression form, the effect is the coefficient on the interaction between a treated-group indicator and a post-period indicator.

Example: a feature launches in city A but not city B. Weekly orders in A go from 1,000 to 1,300, and in B from 800 to 960. Comparing A before and after credits the feature with 300 orders; subtracting B's change of 160 gives a difference-in-differences estimate of 140. If the trends are proportional rather than additive, compare logs instead: A grew 30% and B 20%, an effect of about 8%.

The classic study is Card and Krueger's 1994 comparison of fast-food employment in New Jersey, which raised its minimum wage, and neighboring Pennsylvania, which did not. Check parallel trends with several pre-periods, watch for anything else that changed in only one group at the same time, and consider synthetic control when no single group is a good comparison.

All questions