R
- Open
DiD_JEL.Rprojin RStudio. - Run
scripts/R/00_master_did_jel.R. - Check the generated files in
figures/andtables/.
Replication Materials
Data and code for the JEL article.
Difference-in-differences (DiD) is arguably the most popular quasi-experimental research design. Its canonical form, with two groups and two periods, is well-understood. However, empirical practices can be ad hoc when researchers go beyond that simple case.
This replication package contains the data, R scripts, Stata do-files, generated figures, generated tables, and a self-contained interactive appendix for reproducing the empirical results in the article.
The main landing page is this URL: https://psantanna.com/JEL-DiD/. The interactive appendix remains available at markdown/R_Stata/Code_Appendix.html.
Users can reproduce the analysis in either R or Stata. Both workflows are organized around a master script that runs the complete analysis and writes outputs to the repository's figures/ and tables/ folders.
DiD_JEL.Rproj in RStudio.scripts/R/00_master_did_jel.R.figures/ and tables/.scripts/Stata/00_stata_master_did_jel.do.rootdir path to this replication folder.data/: public data sources and compiled analysis data.scripts/R/: R code for data construction, analysis, figures, and tables.scripts/Stata/: Stata do-files for the corresponding analysis workflow.figures/: generated figure files from the R and Stata workflows.tables/: generated table files from the R and Stata workflows.markdown/R_Stata/: Quarto source and HTML for the interactive code appendix.The analysis uses public data from the CDC, Bureau of Labor Statistics, Kaiser Family Foundation, and the U.S. Census Bureau. The compiled county-level analysis data are provided in CSV format, with the replication scripts documenting the construction and analysis steps.
The official AEA/openICPSR data archive is available at openICPSR project 239070.