Skip to content
/ p-hacking Public template

Code and data for the paper "Critical Values Robust to P-hacking"

License

Notifications You must be signed in to change notification settings

pmichaillat/p-hacking

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Critical Values Robust to P-hacking: Code and Data

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.

Paper webpage

The paper is available at https://pascalmichaillat.org/12/.

Code

The MATLAB code within the code folder generates the 9 figures presented in the paper.

Main script

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.

Production scripts

The main script produces the individual figures using the following scripts:

  • figure1A.m – Produce figure 1A
  • figure1B.m - Produce figure 1B
  • figure2A.m - Produce figure 2A
  • figure2B.m - Produce figure 2B
  • figure3A.m - Produce figure 3A
  • figure3B.m - Produce figure 3B
  • figure4.m - Produce figure 4A, figure 4B, and figure 4C

Display script

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.

Figures

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 1A
  • figure1B.pdf, figure1B.csv – Figure 1B
  • figure2A.pdf, figure2A.csv – Figure 2A
  • figure2B.pdf, figure2B.csv – Figure 2B
  • figure3A.pdf, figure3A.csv – Figure 3A
  • figure3B.pdf, figure3B.csv – Figure 3B
  • figure4A.pdf, figure4A.csv – Figure 4A
  • figure4B.pdf, figure4B.csv – Figure 4B
  • figure4C.pdf, figure4C.csv – Figure 4C

Software

The results were obtained using MATLAB R2023b on an Apple Silicon Mac running macOS Sonoma 14.3.1.

License

The content of this repository is licensed under the terms of the MIT License.