Skip to content

v0.1.6

Choose a tag to compare

@jturner-uofl jturner-uofl released this 27 May 11:00
· 37 commits to main since this release

What's fixed

Statistical correctness

  • pairs(apply_kenward_roger(em)) now matches apply_kenward_roger(pairs(em)) to floating-point precision. The 0.1.4 KR-idempotency guard was short-circuiting on freshly-built contrast results that inherit df_method="kenward_roger" from the source EMM but whose SE was still computed from the uncorrected V_beta — so the KR-corrected SE was never written. Same fix applied to Satterthwaite. Bug surfaced as ~1e-4 SE drift on pairs(em_kr) vs apply_kenward_roger(pairs(em)).
  • apply_satterthwaite / apply_kenward_roger now refuse cross-correction inputs. Previously apply_satterthwaite(apply_kenward_roger(em)) silently rebuilt SE from the uncorrected V_beta, discarding the KR step while keeping the Satt df. Both functions now raise ValueError with a steer-the-user message; same-method idempotency short-circuits are unchanged.
  • joint_tests refuses posterior-derived inputs. The 0.1.4 EMMResult dispatch path accepted any input that exposed model_info, including posterior EMMResults, and silently returned NaN.
  • Cox PH detection no longer false-positives on class-name collision. 0.1.5 matched on bare class names ({"PHReg", "PHRegResults", "PHRegResultsWrapper"}); the check is now a module-qualified isinstance against statsmodels.duration.hazard_regression.

Tooling

  • benchmarks/bench_performance.py now passes max_contrasts=None to pairs(emmeans(model, "group")) so pairwise_k20pairwise_k200 rows in docs/PERFORMANCE_REPORT.md are reachable; added a failure-collection gate so future regressions can't produce a partial report.
  • ruff check src tests clean.
  • Narrow filterwarnings regex on the pbmodcomp convergence test.

Documentation

  • README banner: v0.1.5v0.1.6; docs/index.md, docs/PERFORMANCE_REPORT.md, CITATION.cff synced.
  • Performance highlights: ~14×~11.5×, ~8×~7.7× so README matches docs/PERFORMANCE_REPORT.md exactly.
  • pytest --doctest-modules src/pymmeans is now clean (ml.py::from_predict example was crashing collection on an unindented function body; emmeans.py's doctest gained +NORMALIZE_WHITESPACE; cld.py seeded its RNG).
  • Empty-parenthetical scrub artifacts cleaned from ~40 docstrings/comments across 13 source files.

Install

pip install pymmeans[tutorial] now pulls linearmodels>=5.0, so the documented install reaches the full 313-test public surface without a separate install step.