Stata packages
(Last updated: August 2024)
Stata packages are listed in alphabetical order. A list of R packages is given here .
Name
Installation
Package by
Reference paper(s)
bacondecomp
ssc install bacondecomp, replace
Andrew Goodman-Bacon Thomas Goldring Austin Nichols
Goodman-Bacon (2021)
csdid
ssc install csdid, replace
Fernando Rios-Avila Pedro H.C. Sant’Anna Brantly Callaway
Callaway & Sant’Anna (2020)
csdid2
Instructions
Fernando Rios-Avila
Callaway & Sant’Anna (2020)
did2s
ssc install did2s, replace
Kyle Butts
Gardner (2022)
did_multiplegt
ssc install did_multiplegt, replace
Clément de Chaisemartin Xavier D’Haultfoeuille
de Chaisemartin & D’Haultfoeuille (2020) de Chaisemartin & D’Haultfoeuille (2021)
did_multiplegt_dyn
ssc install did_multiplegt_dyn, replace
Clément de Chaisemartin Diego Ciccia Xavier D’Haultfoeuille Felix Knau Mélitine Malézieux Doulo Sow
de Chaisemartin & D’Haultfoeuille (2024a) de Chaisemartin et al. (2024c)
did_imputation
ssc install did_imputation, replace
Kirill Borusyak Xavier Jaravel Jann Spiess
Borusyak, Jaravel, Spiess (2024)
drdid
ssc install drdid, replace
Fernando Rios-Avila Pedro H.C. Sant’Anna Asjad Naqvi
Sant’Anna & Zhao (2020)
eventdd
ssc install eventdd, replace
Damian Clarke Kathya Tapia-Schythe
Clarke & Tapia-Schythe (2022)
eventstudyinteract
ssc install eventstudyinteract, replace
Liyang Sun
Sun & Abraham (2021)
fdid
Instructions
Jared Greathouse
Li (2023)
fect
Instructions
Licheng Liu Ye Wang Yiqing Xu Ziyi Liu
Liu, Wang, Xu (2022)
flexpaneldid
ssc install flexpaneldid, replace
Eva Dettmann Alexander Giebler Antje Weyh
Dettmann, Giebler, Weyh (2020)
hdidregress
Stata 18
StataCorp
Callaway & Sant’Anna (2020)
honestdid
ssc install honestdid, replace
Mauricio Caceres Bravo Jonathan Roth
Rambachan & Roth (2023)
jwdid
ssc install jwdid, replace
Fernando Rios-Avila
Nagengast, Rios-Avila, Yotov (2024) , Wooldridge notes
lpdid
ssc install lpdid, replace
Alexander Busch Daniele Girardi
Dube, Girardi, Jordà, Taylor (2023)
multe
Instructions
Mauricio Caceres Bravo Paul Goldsmith-Pinkham
Goldsmith-Pinkham, Hull, Kolesár (2024)
pretrends
ssc install pretrends, replace
Mauricio Caceres Bravo Jonathan Roth
Roth (2022)
robustate
ssc intsall robustate, replace
Yuya Sasaki Takuya Ura
Sasaki & Ura (2021)
sdid
ssc install sdid, replace
Damian Clarke Daniel Pailañir
Arkhangelsky, Athey, Hirshberg, Imbens, Wager (2021)
sdid_event
Instructions
Diego Ciccia
Ciccia (2024)
stackedev
ssc install stackedev, replace
Joshua Bleiberg
Cengiz, Dube, Lindner, Zipperer (2019)
staggered_stata
Instructions
Jonathan Roth
Roth & Sant’Anna (2023)
twowayfeweights
ssc install twowayfeweights, replace
Clément de Chaisemartin Xavier D’Haultfoeuille Antoine Deeb
de Chaisemartin & D’Haultfoeuille (2020)
wooldid
ssc install wooldid, replace
Thomas Hegland
Wooldridge (2021)
xtevent
ssc install xtevent, replace
Simon Freyaldenhoven Christian Hansen Jorge Perez Perez Jesse M. Shapiro
Freyaldenhoven, Hansen, Shapiro (2019)
yatchew_test
ssc install yatchew_test, replace
Clément de Chaisemartin Diego Ciccia Xavier D’Haultfoeuille Felix Knau Doulo Sow
Yatchew (1997) de Chaisemartin and D’Haultfoeuille (2024b)
How to use Stata packages?
For individual packages, check their help files and websites linked about for documentation and examples. Some packages are also discussed in the Stata code section.
For using and plotting multiple DiD packages in Stata, the event_plot
command (ssc install event_plot, replace
) by Kirill Borusyak is highly recommended. It can combine results several estimators. See, for example this five different estimators figure where the code is given in the five_estimators_example.do dofile. More information can be found on on Kirill’s GitHub .
The event_plot
example has been extended twice:
Please note that different packages have different assumptions so use this carefully!