BESHstatNG v0.3.0 released — spotlight on GLM, NB2, and Zero-Inflated Poisson
The first official release of BESHstatNG (v0.3.0) is now available — an open-source Excel add-in (Excel-DNA + VB.NET, installed via MSI) that continues the original VBA-based BESHstat tradition with very similar coverage of statistical tests and methods, now on a modern and maintainable foundation.
Why GLM matters in everyday Excel analysis
Generalized Linear Models (GLMs) let you model outcomes that aren’t normally distributed, while keeping a familiar structure: a linear predictor, a link function, and a distribution family (e.g., Gaussian, Binomial, Poisson, Gamma, Negative Binomial). BESHstatNG’s GLM procedure supports multiple families and links, plus optional offsets and weights, making it useful for proportions/binary outcomes, rates with exposure, and count data.
Core model form
μ = g⁻¹(η)
BESHstatNG fits GLMs using IRLS (Fisher scoring), solving a weighted least squares problem each iteration, with safeguards such as step-halving when deviance increases or the fitted mean leaves the valid domain (especially important for Binomial/logit models). Convergence is assessed using the change in deviance.
GLM documentation:
https://www.beshstat.eu/beshstatng/help/latest/methods/generalized-linear-models-glm/
When Poisson isn’t enough: Negative Binomial regression (NB2)
Real count data often show overdispersion (variance larger than the mean). NB2 handles this by adding a dispersion term:
α = 1/θ (theta)
In BESHstatNG, GLM_NB (NB2 regression) alternates between (1) updating mean parameters via IRLS for a fixed dispersion, and (2) updating theta by likelihood-based optimization, similar in spirit to common statistical implementations. This makes NB2 a strong choice when Poisson residual variation is clearly too large.
NB2 documentation:
https://www.beshstat.eu/beshstatng/help/latest/methods/negative-binomial-regression-nb2/
Excess zeros: Zero-Inflated Poisson (ZIP) with EM + IRLS
Some datasets contain more zeros than a standard Poisson model can explain. Zero-Inflated Poisson models treat the data as a mixture of: (1) a Poisson count process and (2) a structural-zero process modeled with logistic regression.
π = logistic(zᵀγ)P(Y=0) = π + (1−π)·exp(−λ)
P(Y=y>0) = (1−π)·exp(−λ)·λ^y / y!
BESHstatNG fits ZIP using an EM-style procedure. In each iteration, it updates: a Poisson GLM for the count component and a logistic GLM for the inflation component. The output provides clear coefficient tables for both parts, where exponentiated coefficients can be interpreted as rate ratios (Poisson part) and odds ratios (logistic part).
ZIP documentation:
https://www.beshstat.eu/beshstatng/help/latest/methods/zero-inflated-poisson-regression/
Try it in Excel
After installing the MSI, open Excel and look for the BESHstatNG Ribbon tab. From there, you can run:
- Analyse → Regression → Generalized Linear Models (GLM)
- Analyse → Regression → Negative Binomial Regression (NB2 / GLM_NB)
- Analyse → Regression → Zero-Inflated Poisson Regression
Helpful links
- GLM help:
documentation page
- NB2 help:
documentation page
- ZIP help:
documentation page