Which Difference-in-Differences
Estimator Should I Use?
There is no universally best Difference-in-Differences estimator. The right estimator depends on the design of your study and the effect you want to estimate.
Is treatment binary or nonbinary? Absorbing, meaning that once treated one always remains treated, or reversible? Do treated groups adopt at different dates? Can treatment change more than once? Is it plausible that lagged treatments still affect the current outcome? Are there untreated or not-yet-treated groups, stayers, or quasi-untreated observations? This guide first helps you characterize your research design, and then explains which modern DiD estimators are compatible with it.
Stata users can also run whichDIDshouldIuse for an automatic characterization of their design — see below.
Further questions? Ask them to ChatDID.
Compare
Identify your design, then pick an estimator
The table below lists the designs reviewed in the textbook Causal Inference with Differences-in-Differences: Credible Answers to Hard Questions by de Chaisemartin and D'Haultfœuille. For each design, it lists possible estimators, restricting attention to heterogeneity-robust estimators that only rely on no-anticipation and parallel-trends assumptions. Most commands and packages listed below can be used to conduct pre-trend tests of those assumptions.
| Name | Definition & examples | Treatment pattern | Estimators | Commands & packages | Further reading |
|---|---|---|---|---|---|
| Canonical DID design |
Treatment is binary, absorbing, there are never-treated units, and there is no variation in treatment timing: all treated units start getting treated at the same date. Examples
Cholera is water borne. Some London neighborhoods change their water supply to less contaminated (upstream) water, other neighborhoods do not; cholera outbreaks decrease more in the first group. Snow (1856) |
Without control variables
|
Without controls
reg / xtreg / reghdfe
See below. |
Chapters 3 and 4 of the textbookBook & slides | |
| Staggered adoption design |
Treatment is binary, absorbing, and there is variation in treatment timing. Examples
Free trade agreements. Country pairs sign FTAs at different dates and never repeal them; FTAs raise bilateral trade. Baier & Bergstrand (2007) Unilateral divorce. Introduced at different dates across Western Europe, never repealed; it raises divorce rates. Kneip & Bauer (2009) |
|
Heterogeneity-robust DID estimators
eventstudyinteract (never- or last-treated)
csdid (never- or not-yet-treated)
did_multiplegt_dyn (never- or not-yet-treated)
did_imputation
did2s
fect
jwdid (etwfe in R)
|
Ch. 6 of the textbookde Chaisemartin & D'Haultfœuille (2020)de Chaisemartin & D'Haultfœuille (2026)Callaway & Sant'Anna (2021)Sun & Abraham (2021)Gardner (2021)Liu, Wang & Xu (2024)Borusyak, Jaravel & Spiess (2024)Wooldridge (2025) | |
| Heterogeneous adoption design |
All units are untreated at the start of the panel, all treated units become treated at the same date, and treated units receive heterogeneous treatment doses. Examples
Minimum wage. German districts more exposed to an increase of the national minimum wage saw larger wage gains and no employment losses. Dustmann et al. (2022) Cancer treatment. US cancer programs adopted a new chemotherapy at different rates; short-term mortality decreased more among high adopters. Melamed et al. (2021) |
Are there never-treated units?
|
Never-treated units: yes
ivregress 2sls Δy (d = 1(d>0))
did_had
|
Ch. 7 of the textbookde Chaisemartin et al. (2026) | |
| Staggered first switch design |
Designs where groups experience their first treatment change at different points in time. These designs nest staggered adoption designs. But staggered first switch designs also encompass more general designs, where the treatment may be nonbinary and/or non-absorbing. Examples
Democratic governors. US states move in and out of Democratic governorship (binary, non-absorbing); effect on policy liberalism. Caughey, Xu & Warshaw (2017) Business taxes. German municipalities start at different tax rates and change them repeatedly; effect on wages. Fuest, Peichl & Siegloch (2018) |
Estimators allowing for effects of lagged treatments
|
Estimators allowing for effects of lagged treatments
did_multiplegt_dyn
did_multiplegt_stat (DID estimator)
did_imputation
did2s
fect
|
Ch. 8 of the textbookde Chaisemartin & D'Haultfœuille (2020)de Chaisemartin & D'Haultfœuille (2026)de Chaisemartin et al. (2022)Gardner (2021)Liu, Wang & Xu (2024)Borusyak, Jaravel & Spiess (2024) | |
| Other designs |
Designs that do not fall into any of the designs above. For instance, the treatment of every unit could change between every pair of time periods. Example
Weather. Rainfall or temperature differs across locations and changes every year, e.g. to study agricultural yields. Deschênes & Greenstone (2007) |
No heterogeneity-robust estimator available for these designs. | NA | Section 8.5.2 of the textbookde Chaisemartin et al. (2024) |
Note: designs with several treatments
The table above only considers designs with a single treatment. Sometimes researchers want to estimate the effects of several treatments.
- Definition. Units may receive K ≥ 2 treatments, or a treatment with several categories. This framework also allows accounting for spillover effects, by treating exposure to other units' treatment as an additional treatment.
- Examples.
- Medical and recreational marijuana laws in the US, whose effects one may want to estimate separately. So far, states have always passed the former before the latter (see, e.g., Meinhofer, Witman, Hinde and Simon, 2021).
- Voter ID laws in the US, where less strict laws are typically passed before stricter ones (see Cantoni and Pons, 2021).
- Anti-deforestation policies in the Amazon rainforest, where plots of land are first put into a concession, and then some concessions get certified (see Rico-Straffon, Wang, Panlasigui, Loucks, Swenson and Pfaff, 2023).
- Estimation.
- TWFE regressions: the
twowayfeweightsStata and R commands compute the weights attached to TWFE regressions with several treatments, using theother_treatmentsoption. - If lagged effects can be ruled out: heterogeneity-robust estimators of the effect of each treatment can be computed with
did_multiplegt_stat. - Dynamic effects with sequential treatments: the additional effect of the second treatment can be estimated with
did_multiplegt_dyn, restricting the sample to the (g, t)s that have received the first treatment, and including the adoption date of the first treatment in thetrends_nonparamoption.
- TWFE regressions: the
See Section 8.3.5.4 of the textbook for more details.
Identify your design automatically in Stata
Run whichDIDshouldIuse on your data for an automatic characterization of your design and a menu of estimators you can use given your design.
This diagnostic helps classify your design; it is not a substitute for assessing the identifying assumptions underlying each estimator.
Requires distinct (SSC). Not yet on SSC for your version? Check the GitHub repository.
References
- Baier, S. L., & Bergstrand, J. H. (2007). "Do Free Trade Agreements Actually Increase Members' International Trade?" Journal of International Economics, 71(1), 72–95.
- Borusyak, K., Jaravel, X., & Spiess, J. (2024). "Revisiting Event Study Designs: Robust and Efficient Estimation." Review of Economic Studies, 91(6), 3253–3285. DOI
- Callaway, B., & Sant'Anna, P. H. C. (2021). "Difference-in-Differences with Multiple Time Periods." Journal of Econometrics, 225(2), 200–230. DOI
- Cantoni, E., & Pons, V. (2021). "Strict ID Laws Don't Stop Voters: Evidence from a U.S. Nationwide Panel, 2008–2018." Quarterly Journal of Economics, 136(4), 2615–2660.
- Caughey, D., Xu, Y., & Warshaw, C. (2017). "Incremental Democracy: The Policy Effects of Partisan Control of State Government." Journal of Politics, 79(4), 1342–1358.
- de Chaisemartin, C., & D'Haultfœuille, X. (2020). "Two-Way Fixed Effects Estimators with Heterogeneous Treatment Effects." American Economic Review, 110(9), 2964–2996. DOI
- de Chaisemartin, C., D'Haultfœuille, X., Pasquier, F., & Vazquez-Bare, G. (2022). "Difference-in-Differences for Continuous Treatments and Instruments with Stayers." Working paper, SSRN 4011782. SSRN
- de Chaisemartin, C., & D'Haultfœuille, X. (2023). "Two-Way Fixed Effects and Differences-in-Differences Estimators with Several Treatments." Journal of Econometrics, 236(2), 105480.
- de Chaisemartin, C., D'Haultfœuille, X., & Vazquez-Bare, G. (2024). "Difference-in-Difference Estimators with Continuous Treatments and No Stayers." AEA Papers and Proceedings, 114, 610–613.
- de Chaisemartin, C., Ciccia, D., D'Haultfœuille, X., & Knau, F. (2026). "Difference-in-Differences Estimators When No Unit Remains Untreated." Working paper, arXiv:2405.04465. arXiv
- de Chaisemartin, C., & D'Haultfœuille, X. (2026). "Difference-in-Differences Estimators of Intertemporal Treatment Effects." Review of Economics and Statistics, 108(4), 863–880. Journal page
- Deschênes, O., & Greenstone, M. (2007). "The Economic Impacts of Climate Change: Evidence from Agricultural Output and Random Fluctuations in Weather." American Economic Review, 97(1), 354–385.
- Dustmann, C., Lindner, A., Schönberg, U., Umkehrer, M., & vom Berge, P. (2022). "Reallocation Effects of the Minimum Wage." Quarterly Journal of Economics, 137(1), 267–328.
- Fuest, C., Peichl, A., & Siegloch, S. (2018). "Do Higher Corporate Taxes Reduce Wages? Micro Evidence from Germany." American Economic Review, 108(2), 393–418.
- Gardner, J. (2021). "Two-Stage Differences in Differences." Working paper. arXiv
- Goodman-Bacon, A. (2021). "Difference-in-Differences with Variation in Treatment Timing." Journal of Econometrics, 225(2), 254–277. DOI
- Kneip, T., & Bauer, G. (2009). "Did Unilateral Divorce Laws Raise Divorce Rates in Western Europe?" Journal of Marriage and Family, 71(3), 592–607.
- Liu, L., Wang, Y., & Xu, Y. (2024). "A Practical Guide to Counterfactual Estimators for Causal Inference with Time-Series Cross-Sectional Data." American Journal of Political Science, 68(1), 160–176. DOI
- Melamed, A., et al. (2021). JAMA Oncology. DOI
- Meinhofer, A., Witman, A. E., Hinde, J. M., & Simon, K. (2021). "Marijuana Liberalization Policies and Perinatal Health." Journal of Health Economics, 80, 102537.
- Rico-Straffon, J., Wang, Z., Panlasigui, S., Loucks, C. J., Swenson, J., & Pfaff, A. (2023). "Forest Concessions and Eco-Certifications in the Peruvian Amazon: Deforestation Impacts of Logging Rights and Logging Restrictions." Journal of Environmental Economics and Management, 118, 102780.
- Snow, J. (1856). "On the Mode of Communication of Cholera." Edinburgh Medical Journal, 1(7), 668–670.
- Sun, L., & Abraham, S. (2021). "Estimating Dynamic Treatment Effects in Event Studies with Heterogeneous Treatment Effects." Journal of Econometrics, 225(2), 175–199. DOI
- Wooldridge, J. M. (2025). "Two-Way Fixed Effects, the Two-Way Mundlak Regression, and Difference-in-Differences Estimators." Empirical Economics, 69(5), 2545–2587. DOI