Skip to content

did2s

Two-Stage Difference-in-Differences Following Gardner (2021)

v1.2.1 · Mar 4, 2026 · MIT + file LICENSE

Description

Estimates Two-way Fixed Effects difference-in-differences/event-study models using the approach proposed by Gardner (2021) <doi:10.48550/arXiv.2207.05943>. To avoid the problems caused by OLS estimation of the Two-way Fixed Effects model, this function first estimates the fixed effects and covariates using untreated observations and then in a second stage, estimates the treatment effects.

Downloads

1.6K

Last 30 days

3076th

3.5K

Last 90 days

13.8K

Last year

Trend: +52.3% (30d vs prior 30d)

CRAN Check Status

14 OK
Show all 14 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-macos-arm64 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 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026

Dependency Network

Dependencies Reverse dependencies fixest boot broom data.table did didimputation dreamerr ggplot2 HonestDiD Matrix rlang staggered did2s

Version History

new 1.2.1 Mar 10, 2026
updated 1.2.1 ← 1.2.0 diff Mar 4, 2026
updated 1.2.0 ← 1.0.2 diff Sep 18, 2025
updated 1.0.2 ← 1.0.1 diff Apr 6, 2023
updated 1.0.1 ← 1.0.0 diff Mar 27, 2023
updated 1.0.0 ← 0.7.0 diff Mar 10, 2023
updated 0.7.0 ← 0.6.0 diff Jul 20, 2022
updated 0.6.0 ← 0.4.0 diff Apr 6, 2022
new 0.4.0 Sep 26, 2021