StatForge
Automated Bayesian-frequentist statistics and publication-ready reports.
StatForge is an open-source Python library and command-line interface designed to automate statistical analysis and generate publication-ready reports. Built for academic researchers, biostatisticians, and data scientists, StatForge streamlines the process from raw data ingestion to formatted output (PDF, DOCX, HTML).
Overview
StatForge implements a robust six-stage execution pipeline:
- DataLoader: Ingests data from CSV, Excel, SPSS (.sav), and Parquet formats.
- AssumptionChecker: Performs statistical assumption checks (e.g., normality, homoscedasticity) utilizing a SHA-256 keyed caching layer (
joblib.Memory) for optimized iterative checks. - MethodSelector: Automatically ranks and selects appropriate tests based on data characteristics and assumption results.
- ModelFitter: Dispatches analysis to a plugin registry supporting both frequentist methods (SciPy, statsmodels) and Bayesian inference (PyMC).
- ResultFormatter: Structures statistical output including effect sizes for standardized reporting.
- ReportBuilder: Orchestrates the final document utilizing Jinja2 templates, generating APA or Vancouver styled tables, automated methods summaries, and figure captions.
Installation
pip install statforge
Quick Start
1. Interactive CLI Wizard
The easiest way to begin an analysis is via the interactive wizard. Navigate to your dataset and execute:
statforge run dataset.csv
The wizard will prompt you to:
- Select the outcome variable.
- Select grouping or predictor variables.
- Choose a report style (e.g., APA7).
2. Validating Data Quality
Before running a full analysis, generate a data quality report to flag missing values, outliers, or type mismatches:
statforge validate dataset.csv
3. Generating a Configuration File
For reproducible analyses, generate a configuration scaffold:
statforge config
This creates a statforge_config.yaml file that you can customize and version control.
Bayesian Analysis & PriorAdvisor
StatForge lowers the barrier to Bayesian analysis through its PriorAdvisor module.
- Guided Priors:
PriorAdvisorsuggests data-driven, weakly informative priors (e.g., assigning a Normal distribution with $\mu$ equal to the observed mean and $\sigma$ equal to twice the observed standard deviation). - Transparency: The rationale for the selected priors is clearly documented and included in the generated report's methodology section.
- Sensitivity Analysis: The pipeline automatically evaluates posterior stability across weakly informative, uninformative, and highly informative prior variants to ensure robustness.
Model Plugin Registry
StatForge utilizes a @register decorator pattern, allowing seamless integration of custom analytical models. Users can drop custom .py model definitions directly into ~/.statforge/plugins/, and they will be dynamically loaded by the pipeline. See CONTRIBUTING.md for details on writing custom plugins.
Cite StatForge
If you use StatForge in your research, please cite our JOSS paper (DOI pending). See paper/paper.md and paper/paper.bib for citation details.
Made by Samvardhan Singh. Licensed under the Apache License 2.0.
Metadata
Release files for statforge 0.1.0
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 |
|---|---|---|---|---|
| statforge-0.1.0.tar.gz | 15.2 kB | With provenance | Details for statforge-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| statforge-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for statforge-0.1.0-py3-none-any.whl |
Total release size: 32.4 kB
Release files / statforge-0.1.0.tar.gz
| Download URL | statforge-0.1.0.tar.gz |
|---|---|
| Size | 15.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9940b2c422b453e66cfb55bd2855f66337526328ec024b2d20329291bb398716
|
|
BLAKE2b-256 checksum How to use checksums |
fa041b172829538931a8c7626adb5fad3b739615c185ce373899f4306c163f1b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.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.
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 Mar 18, 2026.
Transparency logRelease files / statforge-0.1.0-py3-none-any.whl
| Download URL | statforge-0.1.0-py3-none-any.whl |
|---|---|
| Size | 17.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5e61ade9dd80492307e5138491aca65147f1355eb6aaed31fde6ee48070510fb
|
|
BLAKE2b-256 checksum How to use checksums |
b9d9ef289e10f75e1b8f25cda6cc034904e6bbe517e70f2c4879a2505b83590a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.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.
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 Mar 18, 2026.
Transparency logSecurity for statforge 0.1.0
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
Both files in this release have been uploaded with provenance metadata.
Attestation for statforge-0.1.0.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 Mar 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.