This repository contains the code and data accompanying the paper "Critical Values Robust to P-hacking", written by Adam McCloskey and Pascal Michaillat, and published in the Review of Economics and Statistics in April 2024.
The paper is available at https://pascalmichaillat.org/12/.
The MATLAB code within the code
folder generates the 9 figures presented in the paper.
The main script, run.m
, orchestrates the production of the 9 figures. The script generates each figure in a MATLAB window and saves the figures as PDF files. Additionally, the data used to generate each figure are stored in CSV files.
The main script produces the individual figures using the following scripts:
figure1A.m
– Produce figure 1Afigure1B.m
- Produce figure 1Bfigure2A.m
- Produce figure 2Afigure2B.m
- Produce figure 2Bfigure3A.m
- Produce figure 3Afigure3B.m
- Produce figure 3Bfigure4.m
- Produce figure 4A, figure 4B, and figure 4C
The production scripts use the visualDisplay.m
script to format figures, axes, and plots. The formatting is designed to provide a clear visual display of the results.
The 9 figures generated by the code are saved as 9 PDF files, and the underlying data are saved as 9 CSV files. The files are stored in the figures
folder, each corresponding to a specific figure in the paper:
figure1A.pdf
,figure1A.csv
– Figure 1Afigure1B.pdf
,figure1B.csv
– Figure 1Bfigure2A.pdf
,figure2A.csv
– Figure 2Afigure2B.pdf
,figure2B.csv
– Figure 2Bfigure3A.pdf
,figure3A.csv
– Figure 3Afigure3B.pdf
,figure3B.csv
– Figure 3Bfigure4A.pdf
,figure4A.csv
– Figure 4Afigure4B.pdf
,figure4B.csv
– Figure 4Bfigure4C.pdf
,figure4C.csv
– Figure 4C
The results were obtained using MATLAB R2023b on an Apple Silicon Mac running macOS Sonoma 14.3.1.
The content of this repository is licensed under the terms of the MIT License.