psystats
Basic statistics and biostatistics for psychologists, with an R-like functional API. Part of the ANOVA Methods family (psystats, psymetrics, psyreport).
Free and open (MIT). Every function returns a result object that prints an
R-style summary and can be handed to psyreport.report() for APA-7 output.
Install
pip install psystats
What's inside
Descriptives and tables — describe, freq, corr_matrix (correlation matrix
with significance stars), and table1 (group comparison with automatic test
selection by variable type and distribution).
Inferential tests with effect sizes — ttest (Cohen's d), anova (η² and ω²),
chisq (Cramér's V).
Regression — linreg (OLS with standardized betas, R²/adjusted R², F test) and
logreg (odds ratios with confidence intervals, McFadden pseudo-R²).
Risk factors — riskratio, oddsratio, and attributable_risk (risk
difference with CI, attributable risk percent, population attributable risk and
PAR%, number needed to treat).
Example
The package ships a real teaching dataset — depression and anxiety symptoms in 1,957 undergraduate students from Spain, Portugal, and Brazil (Afonso Junior et al., 2020, https://doi.org/10.1590/0102.3772e36412) — so every example runs as-is:
from psystats import load_mapfre, table1, anova, corr_matrix, linreg
df = load_mapfre()
print(table1(df, group="country", # auto test per variable
columns=["age", "sex", "bdi_sum", "bai_sum"]))
print(anova(df, "bdi_sum", "country")) # depression across countries
print(corr_matrix(df, ["age", "bdi_sum", "bai_sum"]))
print(linreg(df, "bdi_sum", ["age", "bai_sum"])) # predict depression score
All estimates are validated in the test suite against scipy and statsmodels.
Metadata
Release files for psystats 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| psystats-0.1.1.tar.gz | 75.4 kB | With provenance | Details for psystats-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| psystats-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for psystats-0.1.1-py3-none-any.whl |
Total release size: 151.0 kB
Release files / psystats-0.1.1.tar.gz
| Download URL | psystats-0.1.1.tar.gz |
|---|---|
| Size | 75.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e24b327bda18f5d21181156e46e30ceabeb63f81c04b9828fffcfeaf465dff60
|
|
BLAKE2b-256 checksum How to use checksums |
a313f79cd0479f9d2bcbead64969c0f76b585879994dd3d974bb18e50c0f5b69
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 18, 2026.
Transparency logRelease files / psystats-0.1.1-py3-none-any.whl
| Download URL | psystats-0.1.1-py3-none-any.whl |
|---|---|
| Size | 75.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b8d4c1a63df59e2c0d0d9e3ebd0a966fca0ba06100b851d3611dcf3e3141de0f
|
|
BLAKE2b-256 checksum How to use checksums |
adf623043e4e6d352c97f61b031823231c33e65d527a6262852be93f645fd08b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 18, 2026.
Transparency logSecurity for psystats 0.1.1
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for psystats-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 18, 2026.
Transparency logA 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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.