didunit: a unit-level multi-period differences-in-differences estimator in R
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.
Authors
- Ransi Clark (ORCID: https://orcid.org/0009-0003-5574-3450)
- Jonathan N. Katz (ORCID: https://orcid.org/0000-0002-5287-3503)
- R. Michael Alvarez (ORCID: https://orcid.org/0000-0002-8113-4451)
Institutions
- California Institute of Technology (US)
Publication Details
- Journal
- SoftwareX
- Published
- 2025-12-17
- DOI
- https://doi.org/10.1016/j.softx.2025.102467
- Citations
- 1
- Primary Topic
- Statistical Methods in Clinical Trials
- Type
- article
- Field-Weighted Citation Impact
- 2.63