MerQuR+Statistics Glossary

Statistics Glossary → Generalized linear model (GLM)

Generalized linear model (GLM)concept

A modelling framework that extends linear regression to non-normal outcomes (binary, counts, positive continuous) through a link function and a distribution family.

A GLM has three parts: (1) a distribution for the outcome from the exponential family (normal, binomial, Poisson, gamma, etc.), (2) a linear combination of the predictors η = b₀ + b₁x₁ + ..., and (3) a link function g(μ) = η that ties the expected value to this linear combination. Logistic regression is a GLM with a binomial distribution and logit link, Poisson regression one with a Poisson distribution and log link, and classical linear regression one with a normal distribution and identity link.

Parameters are estimated by maximum likelihood (usually via iteratively reweighted least squares), and fit is assessed with the deviance. Coefficients are interpreted on the link scale: with a log link exp(B) is a ratio (e.g. a rate ratio), with a logit link an odds ratio. A GLM assumes the variance depends on the mean in a given way (e.g. variance = mean for Poisson); if the data are more spread out than this (overdispersion), a scale correction or alternatives such as the negative binomial are needed. Adding random effects for clustered data gives a GLMM, and adding smooth functions gives a GAM.

An everyday example

A municipality models the yearly number of accidents at junctions as a function of traffic volume. Accident counts cannot be negative and are whole numbers, so normal linear regression is not suitable. A Poisson GLM with a log link is used, and each additional 1000 vehicles per day is found to multiply the accident rate by exp(0.08) ≈ 1.08, i.e. raise it by about 8%.

In MerQur

In the generalized additive model the 'Family' option (Gaussian, Binomial, Poisson, Gamma) sets the response distribution and the link. The log-linear model fits cell counts with a Poisson generalized linear model, and generalized linear mixed models handle binomial, Poisson and negative binomial responses; the binary and count targets of lasso regression and the 'Target distribution' of regularized regression fit a penalized-likelihood generalized linear model (binomial / Poisson family).

Analyses where this concept appears

Log-Linear ModelLasso RegressionGeneralized Linear Mixed Models (GLMM)Generalized Additive Model (GAM, Nonlinear Regression)Regularized Regression (LASSO / Ridge / ElasticNet)

Related concepts

Distribution family (GLM)Link functionOffset (exposure term)