You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
4
4
# DiD literature
5
5
6
-
*Last updated: July 2026*
6
+
*Last checked: 08 Sep 2026*
7
7
8
8
## :dart: NOTE
9
9
@@ -14,7 +14,7 @@ The contents of this page are now on a dedicated website:
14
14
Please update your links and bookmarks accordingly. This README will just be used as a landing page for this GitHub repository.
15
15
16
16
## :bookmark_tabs: What's inside?
17
-
This repository tracks the recent developments in the Difference-in-Differences (DiD) literature. This page is updated every 3-4 months.
17
+
This repository tracks developments in the Difference-in-Differences (DiD) literature and software ecosystem. Package metadata is reviewed when registry or repository information changes; literature and implementation notes are reviewed at least twice a year.
18
18
19
19
If you want to report errors or contribute, Pull Request (PR), [open an issue](https://github.com/AsjadNaqvi/DiD/issues).
Copy file name to clipboardExpand all lines: docs/01_stata.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,9 +7,9 @@ nav_order: 2
7
7
8
8
# Stata packages
9
9
10
-
*(Last updated: July 2026)*
10
+
*(Last checked: 08 Sep 2026)*
11
11
12
-
Stata packages are listed in alphabetical order. A list of [R packages is given here](https://asjadnaqvi.github.io/DiD/docs/02_R/).
12
+
Stata packages are listed in alphabetical order. Versions and availability can change, so check the linked documentation before reproducing an analysis. A list of [R packages is given here](https://asjadnaqvi.github.io/DiD/docs/02_R/).
13
13
14
14
15
15
@@ -20,7 +20,7 @@ Stata packages are listed in alphabetical order. A list of [R packages is given
20
20
|[csdid2](https://github.com/friosavila/stpackages/tree/main/csdid2)|[Instructions](https://github.com/friosavila/stpackages/tree/main/csdid2)| Fernando Rios-Avila |[Callaway & Sant'Anna (2020)](https://www.sciencedirect.com/science/article/abs/pii/S0304407620303948)|
|[drdid](https://friosavila.github.io/playingwithstata/main_drdid.html)|`ssc install drdid, replace`| Fernando Rios-Avila; Pedro H.C. Sant'Anna; Asjad Naqvi |[Sant'Anna & Zhao (2020)](https://www.sciencedirect.com/science/article/abs/pii/S0304407620301901)|
@@ -30,8 +30,8 @@ Stata packages are listed in alphabetical order. A list of [R packages is given
30
30
|[fect](https://github.com/xuyiqing/fect_stata)|[Instructions](https://github.com/xuyiqing/fect_stata)| Licheng Liu; Ye Wang; Yiqing Xu; Ziyi Liu |[Liu, Wang, Xu (2022)](https://papers.ssrn.com/abstract=3555463)|
31
31
|[flexpaneldid](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3692458)|`ssc install flexpaneldid, replace`| Eva Dettmann; Alexander Giebler; Antje Weyh |[Dettmann, Giebler, Weyh (2020)](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3692458)|
32
32
| didregress | Stata 17+ | StataCorp | Canonical 2x2 and repeated cross-section DiD (official Stata implementation) |
Copy file name to clipboardExpand all lines: docs/02_R.md
+10-8Lines changed: 10 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,9 @@ nav_order: 3
7
7
8
8
# R packages
9
9
10
-
Packages are sorted in alphabetical order by name. If the installation says `remotes::install_github<name>`, then you first need to install the `remotes` package with `install.packages("remotes")`. Please note that some installation paths have been split across lines to preserve table formatting in Markdown. Make sure they are in the same line when you copy them across to your own R console, for example, `remotes::install_github("asheshrambachan/HonestDiD")`. Package documentation is identified in the Website column.
10
+
*(Last checked: 08 Sep 2026)*
11
+
12
+
Packages are sorted in alphabetical order by name. CRAN packages use the current CRAN release; GitHub packages are development or GitHub-only versions. Package documentation is identified in the Website column.
11
13
12
14
<style>
13
15
.main-contenttableth,
@@ -29,19 +31,19 @@ Packages are sorted in alphabetical order by name. If the installation says `rem
29
31
30
32
| Name | Installation | Website | Package by | Reference paper |
31
33
| --- | --- | --- | --- | --- |
32
-
|`bacondecomp`|`install.packages``("bacondecomp")`|[Link](https://github.com/evanjflack/bacondecomp)| Evan Flack; Ed Jee | Andrew Goodman-Bacon (2021). Difference-in-differences with variation in treatment timing. Journal of Econometrics. |
33
-
|`did`|`install.packages("did")`|[Link](https://bcallaway11.github.io/did/)| Pedro H.C. Sant'Anna; Brantly Callaway | Brantly Callaway, Pedro H.C. Sant'Anna (2020). Difference-in-Differences with multiple time periods, Journal of Econometrics. |
34
+
|`bacondecomp`|`install.packages("bacondecomp")`|[CRAN](https://cran.r-project.org/package=bacondecomp)| Evan Flack; Ed Jee | Andrew Goodman-Bacon (2021). Difference-in-differences with variation in treatment timing. Journal of Econometrics. |
35
+
|`did`(2.5.1) |`install.packages("did")`|[CRAN](https://cran.r-project.org/package=did)| Pedro H.C. Sant'Anna; Brantly Callaway | Brantly Callaway, Pedro H.C. Sant'Anna (2020). Difference-in-Differences with multiple time periods, Journal of Econometrics. |
34
36
|`did2s`|`install.packages("did2s")`|[Link](https://kylebutts.com/did2s/)| Kyle Butts | John Gardner (2021). Two-stage differences in differences; Kirill Borusyak, Xavier Jaravel, Jann Spiess (2021). Revisiting Event Study Designs: Robust and Efficient Estimation; Liyang Sun, Sarah Abraham (2020). [Estimating dynamic treatment effects in event studies with heterogeneous treatment effects](https://www.sciencedirect.com/science/article/abs/pii/S030440762030378X). Journal of Econometrics; Brantly Callaway, Pedro H.C. Sant'Anna (2020). Difference-in-Differences with multiple time periods, Journal of Econometrics; Jonathan Roth, Pedro H.C. Sant'Anna (2021). Efficient Estimation for Staggered Rollout Designs. |
35
37
|`didimputation`|`install.packages``("didimputation")`|[Link](https://github.com/kylebutts/didimputation)| Kyle Butts | Kirill Borusyak, Xavier Jaravel, Jann Spiess (2021). Revisiting Event Study Designs: Robust and Efficient Estimation. |
36
38
|`DIDmultiplegt`|`install.packages("DIDmultiplegt")`|[Link](https://github.com/chaisemartinPackages/did_multiplegt/tree/main)| Shuo Zhang | Clément de Chaisemartin, Xavier D'Haultfoeuille (2020). Two-Way Fixed Effects Estimators with Heterogeneous Treatment Effects. American Economic Review. |
37
-
|`DIDmultiplegtDYN`|`install.packages("DIDmultiplegtDYN")`|[Link](https://github.com/chaisemartinPackages/did_multiplegt_dyn/tree/main)| Clément de Chaisemartin; Diego Ciccia; Xavier D'Haultfoeuille; Felix Knau; Mélitine Malézieux; Doulo Sow | Clément de Chaisemartin, Xavier D'Haultfoeuille (2024a). Difference-in-Differences Estimators of Intertemporal Treatment Effects, Review of Economics and Statistics; Clément de Chaisemartin, Diego Ciccia, Xavier D'Haultfoeuille, Felix Knau, Mélitine Malézieux, Doulo Sow (2024c) [Event-Study Estimators and Variance Estimators Computed by the did_multiplegt_dyn Command](https://drive.google.com/file/d/1NGgScujLCCS4RrwdN-PC1SnVigfBa32h/view). |
38
-
|`DRDID`|`install.packages("DRDID")`|[Link](https://pedrohcgs.github.io/DRDID/)| Pedro H.C. Sant'Anna; Jun Zhao | Pedro H.C. Sant'Anna, Jun Zhao (2020). Doubly robust difference-in-differences estimators, Journal of Econometrics. |
39
+
|`DIDmultiplegtDYN`(2.4.0) |`install.packages("DIDmultiplegtDYN")`|[CRAN](https://cran.r-project.org/package=DIDmultiplegtDYN) and [GitHub](https://github.com/Credible-Answers/did_multiplegt_dyn)| Clément de Chaisemartin; Diego Ciccia; Xavier D'Haultfoeuille; Felix Knau; Mélitine Malézieux; Doulo Sow | Clément de Chaisemartin, Xavier D'Haultfoeuille (2026). Difference-in-Differences Estimators of Intertemporal Treatment Effects; de Chaisemartin et al. (2025) [complex-design examples](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=5337463). |
40
+
|`DRDID`(1.3.0) |`install.packages("DRDID")`|[CRAN](https://cran.r-project.org/package=DRDID)| Pedro H.C. Sant'Anna; Jun Zhao | Pedro H.C. Sant'Anna, Jun Zhao (2020). Doubly robust difference-in-differences estimators, Journal of Econometrics. |
39
41
|`etwfe`|`install.packages("etwfe")`|[Link](https://grantmcdermott.com/etwfe/)| Grant McDermott | Jeffrey Wooldridge (2021). [Two-Way Fixed Effects, the Two-Way Mundlak Regression, and Difference-in-Differences Estimators.](http://dx.doi.org/10.2139/ssrn.3906345). Working Paper. |
40
-
|`fixest` with `sunab()`function |`install.packages("fixest")`|[Link](https://lrberge.github.io/fixest/)| Laurent Bergé | Liyang Sun, Sarah Abraham (2020). [Estimating dynamic treatment effects in event studies with heterogeneous treatment effects](https://www.sciencedirect.com/science/article/abs/pii/S030440762030378X). Journal of Econometrics. |
42
+
|`fixest`(0.14.2) with `sunab()`|`install.packages("fixest")`|[CRAN](https://cran.r-project.org/package=fixest)| Laurent Bergé | Liyang Sun, Sarah Abraham (2020). [Estimating dynamic treatment effects in event studies with heterogeneous treatment effects](https://www.sciencedirect.com/science/article/abs/pii/S030440762030378X). Journal of Econometrics. |
41
43
|`gsynth`|`install.packages("gsynth")`|[Link](https://yiqingxu.org/packages/gsynth/index.html)| Yiqing Xu; Licheng Liu | Yiqing Xu (2017). [Generalized Synthetic Control Method: Causal Inference with Interactive Fixed Effects Models](https://dx.doi.org/10.1017/pan.2016.2). Political Analysis. |
42
-
|`HonestDiD`|`remotes::install_github``("asheshrambachan/HonestDiD")`|[Link](https://github.com/asheshrambachan/HonestDiD)| Ashesh Rambachan; Jonathan Roth | Ashesh Rambachan, Jonathan Roth (2021). An Honest Approach to Parallel Trends. |
44
+
|`HonestDiD`|`remotes::install_github("asheshrambachan/HonestDiD")`|[GitHub](https://github.com/asheshrambachan/HonestDiD)| Ashesh Rambachan; Jonathan Roth | Ashesh Rambachan, Jonathan Roth (2021). An Honest Approach to Parallel Trends. |
43
45
|`staggered`|`install.packages("staggered")`|[Link](https://github.com/jonathandroth/staggered)| Jonathan Roth; Pedro H.C. Sant'Anna | Jonathan Roth, Pedro H.C. Sant'Anna (2021). Efficient Estimation for Staggered Rollout Designs. |
44
-
|`synthdid`|`remotes::install_github``("synth-inference/synthdid")`|[Link](https://github.com/synth-inference/synthdid)| David Hirshberg; Stefan Wager; Dmitry Arkhangelsky; Susan Athey; Guido Imbens | Dmitry Arkhangelsky, Susan Athey, David Hirshberg, Guido Imbens, Stefan Wager (2021). Synthetic Difference-in-Differences. American Economic Review. |
46
+
|`synthdid`|`remotes::install_github("synth-inference/synthdid")`|[GitHub](https://github.com/synth-inference/synthdid)| David Hirshberg; Stefan Wager; Dmitry Arkhangelsky; Susan Athey; Guido Imbens | Dmitry Arkhangelsky, Susan Athey, David Hirshberg, Guido Imbens, Stefan Wager (2021). Synthetic Difference-in-Differences. American Economic Review. |
45
47
|`pretrends`|`remotes::install_github``("jonathandroth/pretrends")`|[Link](https://github.com/jonathandroth/pretrends)| Jonathan Roth | Jonathan Roth (2021). [Pre-test with Caution: Event-study Estimates After Testing for Parallel Trends](https://jonathandroth.github.io/assets/files/roth_pretrends_testing.pdf). |
46
48
|`TwoWayFEWeights`|`install.packages("TwoWayFEWeights")`|[Link](https://github.com/chaisemartinPackages/twowayfeweights)| Clément de Chaisemartin; Diego Ciccia; Xavier D'Haultfoeuille; Felix Knau; Doulo Sow; Shuo Zhang | Clément de Chaisemartin, Xavier D'Haultfoeuille (2020). Two-Way Fixed Effects Estimators with Heterogeneous Treatment Effects. American Economic Review; Clément de Chaisemartin, Xavier D'Haultfoeuille (2021). Two-way fixed effects regressions with several treatments. |
47
49
|`YatchewTest`|`install.packages("YatchewTest")`|[Link](https://github.com/chaisemartinPackages/yatchew_test)| Clément de Chaisemartin; Diego Ciccia; Xavier D'Haultfoeuille; Felix Knau; Doulo Sow |[Yatchew (1997)](https://www.sciencedirect.com/science/article/pii/S0165176597002188?via%3Dihub), [de Chaisemartin and D'Haultfoeuille (2024b)](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4284811)|
Copy file name to clipboardExpand all lines: docs/03_python.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,14 +7,16 @@ nav_order: 4
7
7
8
8
# Python packages
9
9
10
-
Only dedicated DiD packages are listed below.
10
+
*(Last checked: 08 Sep 2026)*
11
+
12
+
Only dedicated DiD packages are listed below. Add the package version and Python requirement to reproducible analyses; GitHub activity does not imply a stable release.
11
13
12
14
13
15
| Name | Installation | Package by | Reference paper |
14
16
| --- | --- | --- | --- |
15
17
| csdid |[GitHub](https://github.com/d2cml-ai/csdid)| Alexander Quispe; Alexander Fischer | Callaway and Sant'Anna (2021) |
16
18
| csa-py |[GitHub](https://github.com/jsr-p/csa-py)| Jonas Skjold Raaschou-Pedersen | Callaway and Sant'Anna (2021) |
17
-
| differences |[GitHub](https://github.com/bernardodionisi/differences)| Bernardo Dionisi and contributors | Callaway and Sant'Anna (2021); Rambachan and Roth (2023) |
19
+
| differences (0.3.0) |`pip install differences` (Python >= 3.10) |[PyPI](https://pypi.org/project/differences/) and [documentation](https://bernardodionisi.github.io/differences/latest/)| Bernardo Dionisi and contributors | Callaway and Sant'Anna (2021); Sant'Anna and Zhao (2020); Rambachan and Roth (2023) |
18
20
| diff-diff |[GitHub](https://github.com/igerber/diff-diff)| Isaac Gerber and contributors | Callaway and Sant'Anna (2021); Arkhangelsky et al. (2021) |
19
21
| did-imputation |[GitHub](https://github.com/jsr-p/did-imputation)| Jonas Skjold Raaschou-Pedersen |[Borusyak, Jaravel, Spiess (2024)](https://academic.oup.com/restud/advance-article/doi/10.1093/restud/rdae007/7601390)|
20
22
| did-stepwise |[GitHub](https://github.com/jsr-p/did-stepwise)| Jonas Skjold Raaschou-Pedersen |[Harmon (2024)](https://web.econ.ku.dk/nharmon/docs/harmon2022difference.pdf)|
Copy file name to clipboardExpand all lines: docs/code_r/07_did2s_r.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ theorem that should be familiar to many readers. In short, we can avoid the
33
33
pathologies of staggered DiD settings by running two regressions (hence the name):
34
34
35
35
1. Run a fixed-effects regression (including controls) on our outcome variable using only the untreated/not-yet-treated observations. Residualize the outcomes (i.e., subtract the predicted outcomes from the actual outcomes).
36
-
2. Regress the residualized outcomes on the treatment dummies (or, time-to-treament dummies for an event study) using all obsevations to get the unbiased treatment effects.
36
+
2. Regress the residualized outcomes on the treatment dummies (or time-to-treatment dummies for an event study) using all observations to estimate the treatment effects.
37
37
38
38
A virtue of this two-step procedure is that it is very quick to estimate.
-The *hdidregress* is a native Stata implementation of [Callaway and Sant'Anna 2021](https://www.sciencedirect.com/science/article/abs/pii/S0304407620303948).
23
+
-`hdidregress` is a native Stata implementation of [Callaway and Sant'Anna (2021)](https://www.sciencedirect.com/science/article/abs/pii/S0304407620303948).
24
24
25
25
26
26
## Installation
27
27
28
-
Requires Stata v17 or higher. Take a look at the help file:
28
+
Requires Stata 18 or higher. Take a look at the help file:
0 commit comments