Difference-in-differences (DID) is a method of estimating the causal effects of a treatment or intervention by comparing the changes in the outcome of a group of individuals who have been exposed to the treatment with the changes in the outcome of a group of individuals who have not been exposed to the treatment.