Replication code

This is the R code behind Tomas Havranek’s comment, prepared for the Institute for Replication (I4R) Forensic AI Games, on Tsai, Cheng, Hung, and Lin (2026), “Comparing positive rates in traditional articles and registered reports within sport and exercise science: A stage 2 registered report”, Psychology of Sport & Exercise 86, 102995. The code rebuilds the article’s counts and tests from the authors’ coding workbooks and adds the checks in the comment: exact tests for the first-hypothesis comparison, tests that treat hypotheses as clustered within articles, three subsets of the registered reports, the intervals in the article’s Tables 2 to 4, and the Stage 1 sample-size calculation.

Run it

Install the packages once:

install.packages(c("readxl", "sandwich", "lmtest", "geepack", "digest", "clubSandwich", "Exact"))

Then run the script in the folder where you saved it:

Rscript replicate.R

On the first run the script downloads the authors’ two workbooks from their OSF project into a data/ folder and checks their SHA-256 hashes; the data are not copied here. A run takes about half a minute. It was tested with R 4.5.1 (readxl 1.4.5, sandwich 3.1.1, lmtest 0.9-40, geepack 1.3.13, digest 0.6.37, clubSandwich 0.6.1, Exact 3.3); clubSandwich and Exact are optional.

Files

The code is under the MIT licence. The data belong to the original authors.