Skip to content

v0.3.7.2: New computation engine, modular models, and modernized dependencies

Choose a tag to compare

@Corey-Bryant Corey-Bryant released this 11 Sep 22:19
· 10 commits to main since this release
de5502b

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 via formulaic) → TableEngine (result-table assembly).
  • Supports six calling conventions and marginal / cell / pivot layouts.
  • See docs/Engine Architecture.md.

Modular model layer

  • BaseModel foundation shared by all regression models.
  • Linear: Regress (aliases LM, LinearRegression), Anova / ANOVA.
  • Generalized: GeneralizedLinearModel (alias GLM), LogisticRegression (alias Logistic) — MLE via IRLS, with post-estimation (predict, likelihood-ratio, separation diagnostics).
  • Supporting subpackages: core/, containers/, optimize/, statistics/, datasets/ (Stata webuse loaders).

⚠️ GLM is advanced/experimental. It is intentionally not exported at the top level. Import it from researchpy.models.generalized if you want to use it.
Currently validated for the Gaussian/identity case and the logit case (via Logistic); 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 ragged factor_effects result (duplicated Source rows) triggered under NumPy 2.x. Replaced a fragile try/except float() conversion with unconditional numpy.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