Repository navigation
v0.3.7.2: New computation engine, modular models, and modernized dependencies
researchpy v0.3.7.2
This release introduces a new three-layer computation engine and a modular model architecture, modernizes the dependency baseline, ships a comprehensive golden-value test suite validated against Stata/R/SciPy, and fixes a legacy ANOVA Type I bug surfaced by NumPy 2.x.
Highlights
New computation engine
- A universal three-layer pipeline now underpins the package:
FormulaSpec(input parsing) →MatrixEngine(design-matrix construction viaformulaic) →TableEngine(result-table assembly). - Supports six calling conventions and marginal / cell / pivot layouts.
- See
docs/Engine Architecture.md.
Modular model layer
BaseModelfoundation shared by all regression models.- Linear:
Regress(aliasesLM,LinearRegression),Anova/ANOVA. - Generalized:
GeneralizedLinearModel(aliasGLM),LogisticRegression(aliasLogistic) — MLE via IRLS, with post-estimation (predict, likelihood-ratio, separation diagnostics). - Supporting subpackages:
core/,containers/,optimize/,statistics/,datasets/(Statawebuseloaders).
⚠️ GLMis advanced/experimental. It is intentionally not exported at the top level. Import it fromresearchpy.models.generalizedif you want to use it.
Currently validated for the Gaussian/identity case and the logit case (viaLogistic); other families/links (e.g., Poisson) are not yet vetted but functionality should exist.
Comprehensive golden-value test suite
Outputs are validated against trusted references (Stata/R/SciPy) across ANOVA, OLS, GLM/logistic, crosstab, correlation, difference tests, sign-rank, summaries, and utilities; plus a reusable test template and shared fixtures.
358 passed, 2 skipped, 0 failures.
Bug fixes
- ANOVA Type I (legacy
anova): fixed a raggedfactor_effectsresult (duplicatedSourcerows) triggered under NumPy 2.x. Replaced a fragiletry/exceptfloat()conversion with unconditionalnumpy.asarray(...).item()and corrected the sequential residual update.
Dependencies & requirements
- Python ≥ 3.12
- pandas ≥ 3.0.1 · numpy ≥ 2.5.0 · scipy ≥ 1.17.1 · statsmodels ≥ 0.14.0 · patsy ≥ 1.0.2 · formulaic ≥ 1.2.2 · requests ≥ 2.34.2
Deprecations
The legacy functional API, anova, ols, and model, remains available but now emits deprecation warnings pointing to the new researchpy.models replacements (Anova/ANOVA, Regress/LM). Planned for removal in v0.4.0.
Citation
Bryant, C. (2018–2026). researchpy (Version 0.3.7.2) [Python package]. https://github.com/Corey-Bryant/researchpy
Installation
pip install --upgrade researchpy