← Back to all sparks
F

fastglm

ANALYTICS
Velocity0.0

R package fastglm by jaredhuling — release notes from GitHub.

A fast GLM solver stops being one function and becomes a count-model family

statistical-computinggeneralized-linear-modelscppr-packagecount-models
Current state
fastglm ran C++ IRLS for standard generalized linear models for six years with almost no releases. In May 2026 it added three top-level model types — negative binomial with jointly estimated dispersion, hurdle, and zero-inflated — each with the entire fitting driver in C++ rather than an R loop around a C++ kernel. The following release generalised Firth bias reduction to every standard family across dense, sparse and streaming backends.
Where it's heading
The package changed what it is. Through 0.0.3 it was a drop-in replacement for glm() competing on speed; from 0.1.0 it targets the models people leave base R for — MASS::glm.nb, pscl::hurdle, pscl::zeroinfl — and reimplements their full estimation loops natively. The 0.1.1 follow-up is consolidation on that new surface: Firth generalised past binomial logit, SQUAREM acceleration on the zero-inflation EM driver, and a run of clamping guards and initialization fixes on the families most prone to overflow.
Prediction
The numerical-stability work in 0.1.1 clusters on Tweedie and the inverse and sqrt link families, which suggests those paths are the newest and least exercised — expect further correctness fixes there before new model types.

Recent moves

  1. 2mo ago

    Firth generalised to all families, plus SQUAREM and stability fixes

    Firth bias-reduced fitting extends from binomial logit on dense designs only to every standard family across dense, sparse and streaming backends. SQUAREM acceleration turns the zero-inflation EM driver's linear convergence near-quadratic, and a run of clamping guards, a moment-based negative-binomial seed, and a raised iteration ceiling address overflow and convergence failures on the newest code paths.

    View source ↗
  2. 3mo ago

    CRAN release 0.1.0

    ⚡ SPARK

    Three new top-level model types arrive — fastglm_nb() with theta estimated jointly, fastglm_hurdle() for two-part count models, and fastglm_zi() for zero-inflated Poisson and negative binomial — each with the entire driver in C++, including the Brent root-finds, the EM posterior responsibilities and the analytical observed-information vcov. Firth bias reduction also arrives.

    View source ↗
  3. 4y ago

    C++ headers exposed for linking

    Moves C++ headers to inst/include so the compiled code can be linked from other packages. Build plumbing with no user-visible change.

    View source ↗
  4. 7y ago

    First CRAN release of the C++ IRLS solver

    The first CRAN release, establishing the C++ IRLS core for standard generalized linear models.

    View source ↗