Skip to content

did

Treatment Effects with Multiple Periods and Groups

v2.5.0 · Jun 13, 2026 · GPL-3

Description

The standard Difference-in-Differences (DID) setup involves two periods and two groups -- a treated group and untreated group. Many applications of DID methods involve more than two periods and have individuals that are treated at different points in time. This package contains tools for computing average treatment effect parameters in Difference in Differences setups with more than two periods and with variation in treatment timing using the methods developed in Callaway and Sant'Anna (2021) <doi:10.1016/j.jeconom.2020.12.001>. The main parameters are group-time average treatment effects which are the average treatment effect for a particular group at a particular time. These can be aggregated into a fewer number of treatment effect parameters, and the package deals with the cases where there is selective treatment timing, dynamic treatment effects, calendar time effects, or combinations of these. There are also functions for testing the Difference in Differences assumption, and plotting group-time average treatment effects.

Downloads

CRAN

12.3K

Last 30 days

1089th

37.2K

Last 90 days

147.8K

Last year

Trend: -10.1% (30d vs prior 30d)

r2u CRAN

39

Last 30 days

105

Last 90 days

1.9K

Last year

Trend: -15.2% (30d vs prior 30d)

autoCRAN

4

Last 7 days

18

Last 30 days

3

All-time

autoCRAN-only: this name is served only by autoCRAN, so the count is exact.

CRAN Check Status

13 OK
Show all 13 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK

Check History

OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Jun 9, 2026
ERROR 12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Jun 8, 2026
ERROR r-devel-linux-x86_64-debian-gcc

package dependencies

Packages required but not available: 'BMisc', 'DRDID'

See section ‘The DESCRIPTION file’ in the ‘Writing R Extensions’
manual.
OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE May 2, 2026
ERROR 11 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Apr 25, 2026
ERROR r-release-macos-x86_64

package dependencies

Packages required but not available: 'BMisc', 'DRDID'

See section ‘The DESCRIPTION file’ in the ‘Writing R Extensions’
manual.
OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026

Reverse Dependencies (12)

imports

Dependency Network

Dependencies Reverse dependencies BMisc Matrix pbapply ggplot2 DRDID generics tidyr fastglm data.table dreamerr cdid did2s optic NonlinearDiD etwfe fastdid fect fetwfe fixes modelsummary parameters ptetools did

Version History

14 tracked
updated 2.5.0 ← 2.3.0 diff Jun 13, 2026
new 2.3.0 Mar 10, 2026
updated 2.3.0 ← 2.1.2 diff Dec 12, 2025
updated 2.1.2 ← 2.1.1 diff Jul 19, 2022
updated 2.1.1 ← 2.1.0 diff Jan 26, 2022
updated 2.1.0 ← 2.0.0 diff Dec 9, 2021
updated 2.0.0 ← 1.2.3 diff Dec 10, 2020
updated 1.2.3 ← 1.2.2 diff Feb 17, 2020
updated 1.2.2 ← 1.2.1 diff Jun 20, 2019
updated 1.2.1 ← 1.2.0 diff Jun 13, 2019
updated 1.2.0 ← 1.1.2 diff Oct 16, 2018
updated 1.1.2 ← 1.1.0 diff Sep 10, 2018
updated 1.1.0 ← 1.0.0 diff Jul 10, 2018
new 1.0.0 Apr 2, 2018