didunit: a unit-level multi-period differences-in-differences estimator in R
Abstract
This R package estimates multi-period differences-in-differences at the level of the treated unit. This allows more flexible aggregation over estimators whose most granular differences-in-differences estimate is at the treated time and is useful in applications where there is considerable heterogeneity within the treated time group or when units treated at the same time receive somewhat different treatments. For example, when units are treated with different doses, they can be aggregated on the basis of dose to derive a dose-response function. Regional heterogeneity, as illustrated by a cross-country study on democratization, is another example. The software's calls have the same syntax as the did package and agree with those estimates when panels are balanced and covariates are not relevant.
Copyright and License
© 2025 The Authors. Published by Elsevier B.V. This is an open access article under the CC BY license (http://creativecommons.org/licenses/by/4.0/).
Acknowledgement
Contributions
Supplemental Material
Download: Download Acrobat PDF file (278KB)
Multimedia Component 1.
Multimedia Component 2.
Multimedia Component 3.
Download: Download file (788B)
Multimedia Component 4.
Multimedia Component 5.
Download: Download file (29KB)
Multimedia Component 6.
Download: Download file (16KB)
Multimedia Component 7.
Download: Download file (16KB)
Multimedia Component 8.
Multimedia Component 9.
Download: Download file (13KB)
Multimedia Component 10.
Multimedia Component 11.
Multimedia Component 12.
Multimedia Component 13.
Multimedia Component 14.
Multimedia Component 15.
Multimedia Component 16.
Multimedia Component 17.
Multimedia Component 18.
Files
1-s2.0-S2352711025004339-main.pdf
Additional details
Dates
- Submitted
-
2025-02-09
- Accepted
-
2025-11-27
- Available
-
2025-12-17Version of record
Caltech Custom Metadata
- Caltech groups
- Division of the Humanities and Social Sciences (HSS)
- Publication Status
- Published