This repositiory contains simulation code for the simulations related to pre-testing on slide 15 of my DiD slides here.
A version of these simulations was also contained in an older working paper version of my 2020 AER:Insights paper, ``Pre-test with Caution: Event-Study Estimates After Testing for Parallel Trends", but was not contained in the published version. See Figure 2 of the working paper.
The main file is IntuitionPlots.R. Install all packages listed at the beginning of the script, and the script should reproduce all of the figures in the Figures directory.