Regression Analysis and Generalized Linear Models
Regression analysis models the conditional distribution of a response variable given predictors; Generalized Linear Models (GLMs) extend ordinary linear regression to response distributions in the exponential family via a link function relating the mean to a linear predictor. Key result: maximum likelihood estimation in a GLM reduces to Iteratively Reweighted Least Squares (IRLS), which solves the score equations efficiently. Applies wherever responses are continuous, binary, count, or otherwise non-Gaussian. Foundational work by Nelder & Wedderburn (1972); roots in Legendre, Gauss, and Galton.Regression analysis is the study of how the conditional mean (and sometimes other features) of a response depends on covariates . The classical linear model assumes with homoscedastic Gaussian errors; the Generalized Linear Model relaxes both the distributional and the linearity-of-mean assumptions by positing that follows an exponential-family distribution and that a monotone link function satisfies . This single framework unifies linear regression, logistic regression, Poisson regression, gamma regression, and more under one estimation algorithm and one inferential theory. A surprising fact: although these models look very different (continuous vs. binary vs. count data), their maximum likelihood estimation is identical in form — a weighted least squares iteration — because the exponential family endows them with a common geometric structure. GLMs are the workhorse of applied statistics, biostatistics, econometrics, and modern machine learning's "linear-then-link" layer.
The Core Insight
Linear regression is "least squares applied to a Gaussian." Replace the Gaussian by any exponential-family distribution and connect its mean to a linear predictor through a smooth invertible link. The exponential family's algebra guarantees that (i) the mean and variance are determined by a single natural parameter, (ii) the log-likelihood is concave in the natural parameter, and (iii) maximum likelihood estimation becomes Newton/Fisher-scoring that is exactly weighted least squares. Thus heterogeneous data types are tamed by a single, elegant, convex machine.
Formal Statement
The Linear Model
Given observations with , the ordinary linear regression model is
equivalently in matrix form , where is the design matrix, the coefficient vector, the error variance, and .
The Exponential Family
A distribution belongs to the (one-parameter) exponential dispersion family if its density/mass can be written
where is the natural (canonical) parameter, the dispersion parameter, the cumulant function (a smooth convex function), typically for known prior weight , and a normalizing term independent of .
Mean and Variance from the Cumulant Function
For any member of the exponential dispersion family [2],
where is the variance function, expressing the variance as a function of the mean.
Generalized Linear Model
A GLM consists of three components:
- Random component: independent with density [2] and means .
- Systematic component: a linear predictor .
- Link function: a monotone, twice-differentiable with
The canonical link is , which makes directly. For Gaussian, (identity); for Bernoulli, (logit); for Poisson, .
Score Equations and Fisher Information
The log-likelihood of a GLM yields score (gradient) equations
and the expected (Fisher) information matrix is
Why It Holds / Derivation
Maximum Likelihood is Iteratively Reweighted Least Squares
We derive Fisher scoring for [5] and show it equals weighted least squares.
- Log-likelihood. From [2], the contribution of observation is
- Score per observation. Differentiating with the chain rule and using , ,
- Newton step with expected Hessian. Fisher scoring replaces the observed Hessian by . The update is
- Working response. Define the adjusted dependent variable
- IRLS form. Substituting [6] and [10] into [9] gives
John Nelder & Robert Wedderburn | 1924–2010 / 1947–1975
John Nelder, a British statistician at Rothamsted Experimental Station, and Robert Wedderburn, his young collaborator, published "Generalized Linear Models" in the Journal of the Royal Statistical Society in 1972. Their insight was to recognize that linear regression, logistic regression, log-linear models, and probit analysis — previously taught as separate techniques — were all instances of one unifying structure: an exponential-family response and a link function, fitted by a single algorithm. Wedderburn further introduced quasi-likelihood (1974), freeing estimation from full distributional assumptions by requiring only a mean–variance relationship. Tragically, Wedderburn died at age 28 from anaphylaxis; Nelder went on to develop the GLIM software that made GLMs computationally accessible and championed the framework for decades.
Building Intuition
Picture ordinary least squares as fitting a flat plane to a cloud of points, where every point pulls equally hard (constant variance). A GLM says: not all points should pull equally — points where the response is intrinsically more variable should pull less. The weights encode "how much to trust this observation," and they depend on the current fitted mean. The link function is a change of scale: for counts you fit on a log scale (so the prediction can never go negative); for probabilities you fit on a logit scale (so predictions stay in ). IRLS then alternates: "given current beliefs about the means, recompute trust weights and a linearized target; refit by weighted least squares; repeat." It is least squares wearing different costumes for different data types.
GLM structure: linear predictor, link, and exponential-family response
Worked Examples
Logistic Regression: Probability of Defect
Given. An engineer tests components at temperatures °C with binary outcomes "defect" . We fit , where . Variance function , canonical logit link, dispersion . Steps.- Initialize . Compute .
- Inverse link .
- Weights (since for canonical link , so ).
- Working response :
- Solve . By the data's symmetry the estimate centers at ; one iteration moves toward , , and IRLS converges within ~6 iterations.
Poisson Regression: Insurance Claim Counts
Given. Policyholders' claim counts with exposure (years) . Model where is a risk indicator and is an offset. Data: . Variance function , log link, . Steps.- Rate . Total exposure-by-group: low-risk , claims ; high-risk , claims .
- For Poisson with log link and a single binary covariate, the MLE matches observed rates: , .
- Recover coefficients: ; .
- Rate ratio : high-risk policyholders file claims at 4.2× the rate.
Common Misconceptions
Linearity is in the parameters, not the covariates
"Linear" in linear and generalized linear model refers to linearity in , not in . You may include , , splines, or interactions and remain within the (G)LM framework. Conversely, a model that is nonlinear in the parameters (e.g., ) is not a GLM even though it has an exponential shape — unless you can recast it through a valid link.
Do not confuse the link scale with the response scale
Coefficients are interpreted on the link scale. In Poisson log-link regression, is a log rate ratio; in logistic regression, is a log odds ratio — neither is a change in probability or in count. Predictions must be back-transformed via , and because is nonlinear, in general (Jensen's inequality).
Perfect separation breaks logistic MLE
If a covariate perfectly separates the two classes — every has and every has — the likelihood is monotone increasing as . The MLE does not exist (it diverges), even though IRLS appears to "converge" to huge coefficients with enormous standard errors. The fitted probabilities approach 0/1 and Wald inference becomes meaningless. Remedies: Firth's penalized likelihood, Bayesian priors, or exact logistic regression. This shows that the existence of a finite MLE is not guaranteed in GLMs, unlike in full-rank Gaussian OLS.
Connections
GLMs sit at a crossroads of statistics. They generalize the Ordinary Least Squares linear model and are themselves special cases of broader frameworks. The Exponential Family supplies their probabilistic backbone, and Maximum Likelihood Estimation supplies their inferential engine; the IRLS algorithm is just Newton–Raphson Method / Fisher scoring in disguise. When the dispersion or correlation structure is richer, GLMs extend to Generalized Estimating Equations (for correlated data) and Generalized Linear Mixed Models (with random effects). Wedderburn's Quasi-Likelihood drops the full distributional assumption, keeping only the mean–variance link. Regularized variants connect to Ridge Regression and Lasso Regression, and the logistic GLM is precisely the single-layer building block of Neural Networks. Inference relies on the Wald Test, Likelihood Ratio Test, and the Deviance goodness-of-fit measure.
Real-World Applications
- Epidemiology — logistic regression: modeling disease presence (case/control) against exposures; odds ratios from the Framingham Heart Study quantified cardiovascular risk factors.
- Actuarial science — Poisson and Gamma GLMs: insurance pricing decomposes premiums into claim frequency (Poisson/negative binomial) and claim severity (Gamma), as standardized in the Tweedie GLM used across the industry.
- Ecology — count models: species abundance vs. habitat covariates with Poisson/negative-binomial regression, central to species distribution modeling.
- Clinical trials — survival and binary endpoints: complementary log-log links connect GLMs to discrete-time hazard models; logistic GLMs analyze responder rates adjusting for covariates.
- Marketing & credit scoring — logistic GLMs: the FICO-style probability-of-default and churn/click-through models are logistic regressions with engineered features.
- Genomics — log-linear and negative binomial GLMs: RNA-seq differential expression (edgeR, DESeq2) fits per-gene negative-binomial GLMs to read counts.
- Econometrics — gravity models of trade: Poisson pseudo-maximum-likelihood (Santos Silva & Tenreyro, 2006) estimates international trade flows robustly under heteroscedasticity.
Historical Development
- 1805–1809 — Legendre publishes the method of least squares; Gauss claims earlier use and ties it to the normal error law, founding linear regression.
- 1821–1823 — Gauss states the Gauss–Markov optimality of least squares (BLUE under uncorrelated, equal-variance errors).
- 1886 — Francis Galton coins "regression toward mediocrity" studying heredity of stature, giving regression its name.
- 1922 — R. A. Fisher formalizes maximum likelihood and the concept of statistical information.
- 1934–1944 — Bliss develops probit analysis for bioassay; Berkson (1944) introduces the logit alternative.
- 1972 — Nelder & Wedderburn unify these strands in "Generalized Linear Models," defining the link/random/systematic triad and IRLS.
- 1974 — Wedderburn introduces quasi-likelihood, requiring only a mean–variance relationship.
- 1983/1989 — McCullagh & Nelder's monograph Generalized Linear Models becomes the definitive reference; GLIM software popularizes the methods.
- 1986 — Liang & Zeger introduce Generalized Estimating Equations, extending GLMs to longitudinal/correlated data.
Subtleties & Limits
Several issues remain active or delicate. Existence and uniqueness of the MLE can fail under separation or sparse data; penalized and Bayesian regularization are still being refined for high-dimensional GLMs (), where classical asymptotics break down and even the bias of the MLE behaves non-classically (Sur & Candès, 2019). Dispersion modeling — when itself depends on covariates — pushes beyond standard GLMs into double GLMs and distributional regression (GAMLSS). Misspecified mean–variance links undermine standard errors; sandwich/robust variance estimators help but lose efficiency. Causal interpretation of GLM coefficients requires assumptions (no confounding, correct functional form) far stronger than the model itself supplies, a recurring source of error in applied work. Finally, inference after model selection (choosing covariates then testing them) invalidates naive p-values; post-selection inference for GLMs is an ongoing research frontier.