Skip to content

Releases

EDI (Experimental Design and Inference) R package v1.0.2

Choose a tag to compare

@kapelner kapelner released this 07 Oct 09:53

First version accepted on CRAN. Install with install.packages("EDI"). Full details in NEWS.md.

The attached EDI_1.0.2.tar.gz is the source tarball as submitted to CRAN on 2026-09-27 (built 2026-09-25 from commit 903ced0). CRAN rebuilds the package after acceptance, so the copy it serves is a different file with the same source.

Breaking change

  • toggle_asserts(), set_num_cores() and set_package_threads() no longer set global options() as a side effect (CRAN policy). toggle_asserts() keeps its flag in package-internal state, and set_num_cores() no longer sets options(mc.cores = ...) or calls fixest::setFixest_nthreads(). A user's own options(edi.run_asserts = ...) is still honored.

New features

  • InferenceCountQuasiPoisson now composes the marginal-estimand component, so marginal (standardized) effect estimands are available for it as well.

Notable bug fixes

  • Reused-worker resampling reused a stale cached fit across draws for classes with a custom cache guard key, collapsing the resampling distribution to a point mass. The worker loaders now reset cached fit state between draws, with a structural regression test covering every class that has a reusable-worker method.
  • InferencePropGCompMeanDiff and InferenceSurvivalGLMMWeibullFrailtyLoggammaIVWC returned NA or a stale value in randomization inference. Both are fixed.
  • Three KK survival compound classes fed NAs into the fitter for every censored subject during randomization inference, so the p-value depended strongly on the censoring rate. Fixed.

See NEWS.md for the complete list, including kernel, standard-error and confidence-interval fixes.

EDI (Experimental Design and Inference) R package v1.0.1

Choose a tag to compare

@kapelner kapelner released this 15 Sep 06:31

Bug-fix and stabilization release. Full details in NEWS.md.

Breaking change

  • set_custom_randomization_statistic_function() / set_custom_randomization_statistic_cpp() are removed from every concrete estimator class. Use the new InferenceRandCustom class instead: InferenceRandCustom$new(des_obj, custom_randomization_statistic_function = function(y, w, dead) ...), then compute_rand_two_sided_pval() / compute_rand_confidence_interval().

New features

  • InferenceIncidGCompRiskRatio / InferenceIncidKKGCompRiskRatio gain subsampling and m-out-of-n bootstrap CIs and p-values.
  • get_local_EDI_optimization()'s hardware fingerprint now detects CPU/RAM on Windows and macOS, not just Linux.

Notable bug fixes

Twenty-plus fixes to inference classes across continuous, incidence, count, proportion, survival, and ordinal response types — most correcting genuine mis-calibration (wrong Type-I error / coverage), not just crashes. Highlights:

  • Randomization CI's bisection search used the wrong "conservative" fallback endpoint for an upper bound, silently collapsing several classes' upper bounds to the point estimate (confirmed 51-61% empirical coverage instead of nominal 95%).
  • InferenceSurvivalStratCoxPHRegr's and the KK-GLMM classes' score-test information matrices were fed unnegated/double-negated Hessians, making compute_score_two_sided_pval()/compute_score_confidence_interval() return NA on essentially every call.
  • Six ordinal-response classes extracted the last covariate's slope as the treatment coefficient instead of the first (treatment) column — silently testing the wrong covariate whenever other covariates were present.
  • The zero-inflated negative binomial kernel (fast_zinb.cpp) had a fixed-parameter off-by-one and an unpadded ZIP-limit score vector.
  • Five classes' Bayesian-bootstrap machinery discarded an already-computed per-replicate SE, always reporting NA and starving their studentized/BCa variants.
  • Bootstrap-family methods now refuse with an explicit error for DesignSeqOneByOne and its subclasses (except DesignSeqOneByOneBernoulli, where row resampling is actually valid) — the prior "merely conservative" documentation for sequential designs did not hold.
  • An OpenMP worker thread calling into R's interrupt/time-budget checks could crash the whole process (SIGABRT) instead of interrupting cleanly, under num_cores > 1. Both checks now no-op off the master thread.
  • SimulationFramework's mirai-based parallelization could hang indefinitely if a daemon died before connecting; daemon launch and collection are now deadline-bounded with a clear error instead of an unbounded wait.
  • Randomization CIs are no longer offered for the six Cox-family (log-hazard-ratio) survival classes — the generic randomization CI's delta axis is a log time ratio, incompatible with a log hazard ratio estimand, and was silently returning bounds that were not a valid CI for anything.

See NEWS.md for the complete list, including documentation updates.

edi_kernels 1.0.1 — ZINB boundary-collapse fix, fixed_idx off-by-one

Choose a tag to compare

@kapelner kapelner released this 14 Sep 18:38

Kernel-level bug fixes in R/EDI/src/*.cpp (commits 831be080, c289adfa, 5e8f4578, 2026-09-03 to 2026-09-07) that came out of the R package's comprehensive-suite testing rounds. The Python bindings compile the same sources, so they inherit these fixes verbatim — this release tracks R/EDI/DESCRIPTION's own 1.0.0 → 1.0.1 bump rather than a .postN packaging-only suffix.

Fixed

  • fast_zinb / fast_zinb_with_var: zero-inflated negative-binomial fits whose zero-inflation submodel has nothing to explain (no excess zeros in the data) no longer return an arbitrary large-magnitude zero-inflation intercept with a spurious converged=True. A new boundary fallback detects the collapse (every observation's zero-inflation linear predictor at or below -10) and refits the reduced plain negative-binomial likelihood with the zero-inflation part switched off. The returned params stay in the full ZINB layout, with the zero-inflation intercept anchored at -10.
  • fast_zinb_with_var results gain a zero_inflation_at_boundary bool (alongside the existing dispersion_at_poisson_boundary) and report reduced_model = "NegBinNoZI" when that fallback supplied the fit; vcov is computed conditional on the boundary, dropping the unidentified zero-inflation coefficient block before inversion.
  • fast_zinb / fast_zinb_with_var with fixed_idx/fixed_values: fixed an off-by-one where the caller's zero-based index was handed to a helper expecting one-based indices, which pinned the wrong parameter during the reduced ZIP refit under the dispersion-at-Poisson-boundary fallback.
  • LikelihoodFitResult gained the zero_inflation_at_boundary member, defaulting to false for every non-ZINB likelihood.

CI

  • Dropped the Bullseye/Python 3.9 ARMv7 sdist-parity job from build-wheels.yml (piwheels now runs only Bookworm/Trixie builders for this package, and Debian 11 left LTS on 2026-08-31). x86/macOS/Windows 3.9 wheels are still built by cibuildwheel.

Full details: CHANGELOG · PyPI

edi_kernels 1.0.0.post5 — PyPI discoverability metadata, piwheels remediation

Choose a tag to compare

@kapelner kapelner released this 31 Aug 17:07

Packaging-only release of edi_kernels (Python bindings for EDI — Experimental Design and Inference C++ kernels); no kernel sources touched. This is a registry-metadata/discoverability release: "EDI" alone is a hopeless search term (it overwhelmingly means Electronic Data Interchange), so the package metadata now spells out "Experimental Design and Inference" and the model families by name, so PyPI search by statistical task actually finds this package.

Packaging

  • Rewrote the PyPI one-line description to be task-oriented: "Fast C++ statistical model-fitting kernels (GLM, GLMM, survival, count, ordinal, proportion models) from the EDI Experimental Design and Inference project — pybind11 bindings, no R/Rcpp dependency".
  • Added the previously absent keywords (13, e.g. experimental-design, randomization-inference, clinical-trials, glmm, survival-analysis) and classifiers (14, incl. Intended Audience :: Science/Research and Scientific/Engineering :: Mathematics).
  • Continued piwheels (32-bit ARM) remediation: the ARMv7 sdist parity CI matrix now installs real native build dependencies and pulls binary NumPy from piwheels; CMake's Eigen/LBFGSpp fallbacks download pinned, SHA-256-verified release archives instead of requiring git.
  • Release gating consolidated: tests, coverage, wheels, sdist verification, and all three ARMv7 sdist builds must pass before the PyPI publish job can start, plus a final manual approval on the pypi environment.

Documentation

  • Removed the "(not yet on CRAN)" line from the PyPI README (it would freeze as stale misinformation once the imminent CRAN release lands).
  • READMEs and CITATION.cff now spell out "EDI (Experimental Design and Inference)" instead of the bare acronym.

Full details: CHANGELOG · PyPI

EDI (Experimental Design and Inference) R package v1.0.0

Choose a tag to compare

@kapelner kapelner released this 30 Aug 06:32

First stable release of the EDI (Experimental Design and Inference) R package.

EDI marries experimental designs — fixed (block, stratified, matched-pair, cluster, factorial, and MILP-based optimal designs) and sequential (matching-on-the-fly and covariate-adaptive designs: Atkinson, Efron, Pocock–Simon, urn) — with inference procedures (exact, asymptotic, distribution-free, and resampling-based) matched to each design and response type: continuous, incidence, count, proportion, survival with censoring, and ordinal. Core estimation kernels are written in C++ (Eigen + LBFGS++) for speed, and a built-in simulation framework supports power analysis and operating-characteristic studies.

edi_kernels 1.0.0.post4 — ordinal GLMM, NegBin boundary, and GEE kernel fixes

Choose a tag to compare

@kapelner kapelner released this 30 Aug 20:54

Release of edi_kernels (Python bindings for EDI — Experimental Design and Inference C++ kernels). Not packaging-only: it fixes correctness/memory-safety bugs in bound kernels.

Fixed

  • fast_ordinal_glmm: non-contiguous matched-pair group_ids were silently split into singleton groups; rows are now stable-sorted by group before random-effect integration, plus multi-start optimization, a projected-score convergence check, damped-Newton polish, and principled handling of the zero-variance boundary.
  • fast_adjacent_category_logit: probability/Hessian evaluation moved to a log-space recurrence with log-sum-exp normalization, eliminating overflow to Inf/NaN on ordinary data.
  • NegBin family (fast_neg_bin, fast_zinb, fast_hurdle_negbin, …): the Poisson limit (theta >= 1e4) is now recognized as a valid constrained solution with strict acceptance predicates and a guarded reduced-ZIP refit path, instead of failing because the dispersion score cannot vanish at finite theta.
  • gee_pairs_singletons: fixed a stack-buffer-overflow from a mismatched result-struct mirror in the bindings.

Changed (breaking)

  • Fit results return num_iter (was iterations) plus a new hit_iteration_cap boolean.
  • fast_continuation_ratio_regression now models continuing past category k (sign convention reversed to match the other ordinal models).

Packaging

  • Attempted piwheels (32-bit ARM Raspberry Pi) remediation: scipy-openblas32 requirements restricted to architectures it actually publishes for, plus an emulated linux/arm/v7 sdist CI lane.

Full details: CHANGELOG · PyPI

edi_kernels 1.0.0.post3 — interval-censored Weibull survival kernel

Choose a tag to compare

@kapelner kapelner released this 30 Aug 20:54

Release of edi_kernels (Python bindings for EDI — Experimental Design and Inference C++ kernels). Not packaging-only: it touches the Weibull survival kernel.

Changed (breaking)

  • fast_weibull_regression(X, y, dead, ...) is replaced by fast_weibull_regression_general(X, y, y_L, y_R, ...), one kernel fitting exact, left-, right-, and interval-censored survival responses. Right-censored output verified byte-identical to the old kernel before the switch; all 181 Python tests pass.

Documentation

  • Major expansion since 1.0.0 (+4,256 lines net across doc-bearing files): full NumPy-style docstrings in every bindings file, a regenerated 1,616-line type stub, and a 627-line README_PYPI.md with a benchmarked entry for all 63 public functions.

Internal

  • Unity-build collision audit of the 105-file C++ tree completed (no numerical or API changes); CI's cibuildwheel bumped to v4.2.0.

Full details: CHANGELOG · PyPI

edi_kernels 1.0.0.post2 — complete public API re-exports and examples

Choose a tag to compare

@kapelner kapelner released this 30 Aug 20:54

Packaging-only release of edi_kernels (Python bindings for EDI — Experimental Design and Inference C++ kernels); no kernel sources touched.

Fixed

  • 13 of the 14 fast_math utility scalar kernels (fast_digamma, fast_qnorm, fast_log1pexp, …) were compiled into _core but never re-exported at the public top-level namespace — from edi_kernels import ... now works for all of them.

Added

  • Runnable examples for every one of the 14 utility functions plus a dedicated utility speed-gains table in README_PYPI.md; two model-fitting kernels missing from the comparison tables were added.
  • All 63 public functions audited end-to-end: every one has a runnable Usage example, verified against the real installed package.

Full details: CHANGELOG · PyPI

edi_kernels 1.0.0.post1 — sdist buildability, BLAS fallback, full docstrings

Choose a tag to compare

@kapelner kapelner released this 30 Aug 20:54

Packaging-only release of edi_kernels (Python bindings for EDI — Experimental Design and Inference C++ kernels); no kernel sources touched.

Fixed

  • The published 1.0.0 sdist could not be built from source at all (kernel sources resolved outside the tarball). The sdist now vendors R/EDI/src, and CI actually extracts and installs the sdist it builds before upload.
  • The scipy-openblas32 BLAS fallback was Windows-only; it is now a general build dependency so from-source installs work on platforms with no system BLAS.

Added

  • Full NumPy-style docstrings for all 49 bound model-fitting functions — help(edi_kernels.<fn>) now works standalone.
  • _core.pyi type stub + py.typed marker (PEP 561), generated via pybind11-stubgen.
  • README_PYPI.md: PyPI-specific description with absolute links.

Full details: CHANGELOG · PyPI

edi_kernels 1.0.0 — Python bindings for EDI (Experimental Design and Inference)

Choose a tag to compare

@kapelner kapelner released this 30 Aug 20:54

Initial release of edi_kernels, the Python bindings for the C++ model-fitting kernels of EDI (Experimental Design and Inference) — the same solvers the EDI R package uses, called directly from Python with no R/Rcpp dependency, typically one to three orders of magnitude faster than pure-Python canonical fits.

  • pybind11 bindings for all 33 R/EDI/src model-fitting kernels (37 bound functions), covering continuous, binary, count, proportion, ordinal, incidence/GEE, survival, and GLMM/CLMM/LMM families.
  • EDI_CORE_ONLY build path: kernels compile directly from the R package's C++ sources against vanilla Eigen + LBFGSpp — no kernel logic duplicated.
  • Every optional argument exposed with working defaults; R-fixture parity tests (atol=rtol=1e-9) plus omitted-argument tests for every kernel (176 tests).
  • Canonical-baseline benchmark registry (statsmodels, lifelines, scikit-survival, …) and a generated benchmark report.
  • Portable wheels via cibuildwheel (manylinux_2_28, macOS x86_64+arm64, Windows) published to PyPI via Trusted Publishing.

Known issue (fixed in post1): the published sdist could not be built from source.

Full details: CHANGELOG · PyPI