Skip to main content

statcheck

PyPI version

Credits

This is a python implementation of the R package statcheck (ver. 1.4.0-beta.4) published by Michèle B. Nuijten [MicheleNuijten]. The original package can by found at her Github page. The code relies heavily on Nuijten's work and is currently only a python implementation of the original package, with the goal of making it more accessible to the python community. Both packages are published under the GNU General Public License v3.0. To ensure usability, all the original tests were recoded to the python version.

What is statcheck?

statcheck is a free, open source Python package that can be used to automatically extract statistical null-hypothesis significant testing (NHST) results from articles and recompute the p-values based on the reported test statistic and degrees of freedom to detect possible inconsistencies.

statcheck is mainly useful for:

  1. Self-checks: you can use statcheck to make sure your manuscript doesn’t contain copy-paste errors or other inconsistencies before you submit it to a journal.
  2. Peer review: editors and reviewers can use statcheck to check submitted manuscripts for statistical inconsistencies. They can ask authors for a correction or clarification before publishing a manuscript.
  3. Research: statcheck can be used to automatically extract statistical test results from articles that can then be analyzed. You can for instance investigate whether you can predict statistical inconsistencies (see e.g., Nuijten et al., 2017), or use it to analyze p-value distributions (see e.g., Hartgerink et al., 2016).

How does statcheck work?

The algorithm behind statcheck consists of four basic steps:

  1. Convert pdf and html articles to plain text files.
  2. Search the text for instances of NHST results. Specifically, statcheck can recognize t-tests, F-tests, correlations, z-tests, \chi^2 -tests, and Q-tests (from meta-analyses) if they are reported completely (test statistic, degrees of freedom, and p-value) and in APA style.
  3. Recompute the p-value using the reported test statistic and degrees of freedom.
  4. Compare the reported and recomputed p-value. If the reported p-value does not match the computed one, the result is marked as an inconsistency (Error in the output). If the reported p-value is significant and the computed is not, or vice versa, the result is marked as a gross inconsistency (DecisionError in the output).

statcheck takes into account correct rounding of the test statistic, and has the option to take into account one-tailed testing. See the manual for details.

Installation and use

For detailed information about installing and using statcheck, see the Documentation file in the github repository, or refer to the R documentation.

Installation

pip install statcheck

Example Usage

from statcheck.checkdir import checkPDFdir
dir = 'path/to/pdf/directory'
Res, pRes = checkPDFdir(dir, subdir = False)

# Res is a pandas dataframe with the analysis of statistical results
Res
# pRes is a pandas dataframe with extracted p-values
pRes

Running tests

pip install pytest
pytest tests/

statcheck.io is a web-based interface for statcheck.

Author of the Python implementation

** Hubert Plisiecki **

Citation

---
@misc{MicheleNuijten,  
  author = {Michèle B. Nuijten},  
  title = {statcheck},  
  year = {2021},  
  url = {{https://github.com/MicheleNuijten/statcheck}}  
}
---

Metadata

Release files for statcheck 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for statcheck 0.0.7
File Size Uploaded Provenance
statcheck-0.0.7.tar.gz 64.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for statcheck 0.0.7
File Interpreter ABI Platform
statcheck-0.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 112.0 kB

Release files / statcheck-0.0.7.tar.gz

Download URL statcheck-0.0.7.tar.gz
Size 64.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c0c83c85cfaeac34365efa688ceac17f668500a342de1637fe4c58f517f4e0ff
BLAKE2b-256 checksum
How to use checksums
f6b5917fd3c654ec26e80b96ba197afdc87d1a516943f687a199df9992aa73b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.11

Release files / statcheck-0.0.7-py3-none-any.whl

Download URL statcheck-0.0.7-py3-none-any.whl
Size 47.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
010197e02e80d88597d4f290fbc2290414867ea39d991571fa8d2ee6231fe3da
BLAKE2b-256 checksum
How to use checksums
399657fea7f0a3df5ae5f829e6e77fca5baf4558e8c78cc126765d7fba7bd5ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.11

Security for statcheck 0.0.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page