Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pmichaillat/p-hacking
Code and data for the paper "Critical Values Robust to P-hacking"
https://github.com/pmichaillat/p-hacking
critical-values hypothesis-testing metascience p-hacking paper-with-code statistical-significance
Last synced: about 1 month ago
JSON representation
Code and data for the paper "Critical Values Robust to P-hacking"
- Host: GitHub
- URL: https://github.com/pmichaillat/p-hacking
- Owner: pmichaillat
- License: mit
- Created: 2023-04-05T23:45:58.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-08T16:03:14.000Z (8 months ago)
- Last Synced: 2024-05-09T17:10:01.311Z (8 months ago)
- Topics: critical-values, hypothesis-testing, metascience, p-hacking, paper-with-code, statistical-significance
- Language: MATLAB
- Homepage: https://pascalmichaillat.org/12/
- Size: 148 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# 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](https://adammccloskey.com) and [Pascal Michaillat](https://pascalmichaillat.org), and published in the [Review of Economics and Statistics](https://doi.org/10.1162/rest_a_01456) 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.