Thirteen DID estimators using simulated data
The folder contains a Stata project that uses a simulated dataset and produces event studies plots using TWFE OLS and the recently developed estimators csdid
, did2s
, eventstudyinteract
, did_multiplegt
, did_imputation
, and stackedev
,drdid
, flexpaneldid
, xtevent
, eventdd
, staggered
, jwdid
, wooldid
,lpdid
, fect
, sdid
. For further details on these estimators and related packages see this page by Asjad Naqvi.
This code is a slightly modified version of a script originally written by Kirill Borusyak and later adapted by David Burgherr
and modified by Pietro Santoleri .
Download the entire zipped folder and open the Stata project staggered.stpr
. Two scripts will appear in the project manager:
-
scripts/0.run_file.do
: sets up the environment and callsscripts/1.staggered_did_analysis.do
to compute the estimates. There is no need to adjust paths, nor downloading the user-written packages as they are already contained instata_packages
. It suffices to runscripts/0.run_file.do
to obtain the estimates. -
scripts/1.staggered_did_analysis.do
: contains the DID estimations and produces two event-study plots for different time-horizons which will be saved in the folderoutput
.
As several of these user-written packages have been developed recently, it is worth checking for updates by changing global downloads 0
into global downloads 1
in scripts/0.run_file.do
. This will automatically update all packages.