Generalized linear model
In statistics, a generalized linear model (GLM) is a flexible generalization of ordinary linear regression.[src] The GLM generalizes linear regression by allowing the linear model to be related to the response variable via a link function and by allowing the magnitude of the variance of each measurement to be a function of its predicted value.[src] Generalized linear models were formulated by John Nelder and Robert Wedderburn as a way of unifying various other statistical models, including linear regression, logistic regression and Poisson regression.[src] They proposed an iteratively reweighted least squares method for maximum likelihood estimation (MLE) of the model parameters.[src] MLE remains popular and is the default method on many statistical computing packages.[src] Other approaches, including Bayesian regression and least squares fitting to variance stabilized responses, have been developed.[src]
In statistics, a generalized linear model (GLM) is a flexible generalization of ordinary linear regression.[src] The GLM generalizes linear regression by allowing the linear model to be related to the response variable via a link function and by allowing the magnitude of the variance of each measurement to be a function of its predicted value.[src] Generalized linear models were formulated by John Nelder and Robert Wedderburn as a way of unifying various other statistical models, including linear regression, logistic regression and Poisson regression.[src] They proposed an iteratively reweighted least squares method for maximum likelihood estimation (MLE) of the model parameters.[src] MLE remains popular and is the default method on many statistical computing packages.[src] Other approaches, including Bayesian regression and least squares fitting to variance stabilized responses, have been developed.[src] ==Intuition== Ordinary linear regression predicts the expected value of a given unknown quantity (the response variable, a random variable) as a linear combination of a set of observed values (predictors).[src] This implies that a constant change in a predictor leads to a constant change in the response variable (i.e.[src] a linear-response model).[src] This is appropriate when the response variable can vary, to a good approximation, indefinitely in either direction, or more generally for any quantity that only varies by a relatively small amount compared to the variation in the predictive variables, e.g.[src] human heights.[src] However, these assumptions are inappropriate for some types of response variables.[src] For example, in cases where the response variable is expected to be always positive and varying over a wide range, constant input changes lead to geometrically (i.e.[src] exponentially) varying, rather than constantly varying, output changes.[src] As an example, suppose a linear prediction model learns from some data (perhaps primarily drawn from large beaches) that a 10 degree temperature decrease would lead to 1,000 fewer people visiting the beach.[src] This model is unlikely to generalize well over differently-sized beaches.[src] More specifically, the problem is that if the model is used to predict the new attendance with a temperature drop of 10 for a beach that regularly receives 50 beachgoers, it would predict an impossible attendance value of −950.[src] Logically, a more realistic model would instead predict a constant rate of increased beach attendance (e.g.[src] an increase of 10 degrees leads to a doubling in beach attendance, and a drop of 10 degrees leads to a halving in attendance).[src] Such a model is termed an exponential-response model (or log-linear model, since the logarithm of the response is predicted to vary linearly).[src] Similarly, a model that predicts a probability of making a yes/no choice (a Bernoulli variable) is even less suitable as a linear-response model, since probabilities are bounded on both ends (they must be between 0 and 1).[src] Imagine, for example, a model that predicts the likelihood of a given person going to the beach as a function of temperature.[src] A reasonable model might predict, for example, that a change in 10 degrees makes a person two times more or less likely to go to the beach.[src] But what does "twice as likely" mean in terms of a probability?[src] It cannot literally mean to double the probability value (e.g.[src] 50% becomes 100%, 75% becomes 150%, etc.).[src] Rather, it is the odds that are doubling: from 2:1 odds, to 4:1 odds, to 8:1 odds, etc.[src] Such a model is a log-odds or logistic model.[src] Generalized linear models cover all these situations by allowing for response variables that have arbitrary distributions (rather than simply normal distributions) , and for an arbitrary function of the response variable (the link function) to vary linearly with the predictors (rather than assuming that the response itself must vary linearly).[src] For example, the case above of predicted number of beach attendees would typically be modeled with a Poisson distribution and a log link, while the case of predicted probability of beach attendance would typically be modelled with a Bernoulli distribution (or binomial distribution, depending on exactly how the problem is phrased) and a log-odds (or logit) link function.[src] ==Overview== In a generalized linear model (GLM), each outcome Y of the dependent variables is assumed to be generated from a particular distribution in an exponential family, a large class of probability distributions that includes the normal, binomial, Poisson and gamma distributions, among others.[src] The conditional mean μ of the distribution depends on the independent variables X through: \operatorname{E}(\mathbf{Y}\mid\mathbf{X}) = \boldsymbol{\mu} = g^{-1}(\mathbf{X}\boldsymbol{\beta}), where E(Y | X) is the expected value of Y conditional on X; Xβ is the linear predictor, a linear combination of unknown parameters β; g is the link function.[src] In this framework, the variance is typically a function, V, of the mean: \operatorname{Var}(\mathbf{Y}\mid\mathbf{X}) = \operatorname{V}(g^{-1}(\mathbf{X}\boldsymbol{\beta})).[src] It is convenient if V follows from an exponential family of distributions, but it may simply be that the variance is a function of the predicted value.[src] The unknown parameters, β, are typically estimated with maximum likelihood, maximum quasi-likelihood, or Bayesian techniques.[src] 2.[src] A linear predictor \eta = X \beta , and 3.[src] A link function g such that \operatorname{E}(Y \mid X) = \mu = g^{-1}(\eta) .[src] f_Y(\mathbf{y} \mid \boldsymbol\theta, \tau) = h(\mathbf{y},\tau) \exp \left(\frac{\mathbf{b}(\boldsymbol\theta)^{\rm T}\mathbf{T}(\mathbf{y}) - A(\boldsymbol\theta)} {d(\tau)} \right).[src] \,\![src] The dispersion parameter, \tau , typically is known and is usually related to the variance of the distribution.[src] The functions h(\mathbf{y},\tau) , \mathbf{b}(\boldsymbol\theta) , \mathbf{T}(\mathbf{y}) , A(\boldsymbol\theta) , and d(\tau) are known.[src] Many common distributions are in this family, including the normal, exponential, gamma, Poisson, Bernoulli, and (for fixed number of trials) binomial, multinomial, and negative binomial.[src] For scalar \mathbf{y} and \boldsymbol\theta (denoted y and \theta in this case), this reduces to f_Y(y \mid \theta, \tau) = h(y,\tau) \exp \left(\frac{b(\theta)T(y) - A(\theta)}{d(\tau)} \right).[src] \,\![src] \boldsymbol\theta is related to the mean of the distribution.[src] Original formulation by John Nelder and Robert Wedderburn sets T(y)=y , which is a key requirement for having unbiased estimating equations for \theta that yields many attractive properties, including consistency of maximum likelihood estimate under distributional misspecification .[src] If \mathbf{b}(\boldsymbol\theta) is the identity function, then the distribution is said to be in canonical form (or natural form).[src] Note that any distribution can be converted to canonical form by rewriting \boldsymbol\theta as \boldsymbol\theta' and then applying the transformation \boldsymbol\theta = \mathbf{b}(\boldsymbol\theta') .[src] It is always possible to convert A(\boldsymbol\theta) in terms of the new parametrization, even if \mathbf{b}(\boldsymbol\theta') is not a one-to-one function; see comments in the page on exponential families.[src] If, in addition, \mathbf{T}(\mathbf{y}) and \mathbf{b}(\boldsymbol\theta) are the identity, then \boldsymbol\theta is called the canonical parameter (or natural parameter) and is related to the mean through \boldsymbol\mu = \operatorname{E}(\mathbf{y}) = \nabla_{\boldsymbol{\theta}} A(\boldsymbol\theta).[src] \,\![src] For scalar \mathbf{y} and \boldsymbol\theta , this reduces to \mu = \operatorname{E}(y) = A'(\theta).[src] Under this scenario, the variance of the distribution can be shown to be \operatorname{Var}(\mathbf{y}) = \nabla^2_{\boldsymbol{\theta}} A(\boldsymbol\theta)d(\tau).[src] \,\![src] For scalar \mathbf{y} and \boldsymbol\theta , this reduces to \operatorname{Var}(y) = A(\theta) d(\tau).[src] \,\![src] \eta = \mathbf{X}\boldsymbol{\beta}.\, When using a distribution function with a canonical parameter \theta, the canonical link function is the function that expresses \theta in terms of \mu, i.e.[src] \theta = g(\mu).[src] For the most common distributions, the mean \mu is one of the parameters in the standard form of the distribution's density function, and then g(\mu) is the function as defined above that maps the density function into its canonical form.[src] When using the canonical link function, g(\mu) = \theta = \mathbf{X}\boldsymbol{\beta}, which allows \mathbf{X}^{\rm T} \mathbf{Y} to be a sufficient statistic for \boldsymbol{\beta} .[src] Following is a table of several exponential-family distributions in common use and the data they are typically used for, along with the canonical link functions and their inverses (sometimes referred to as the mean function, as done here).[src] In the cases of the exponential and gamma distributions, the domain of the canonical link function is not the same as the permitted range of the mean.[src] In particular, the linear predictor may be positive, which would give an impossible negative mean.[src] When maximizing the likelihood, precautions must be taken to avoid this.[src] An alternative is to use a noncanonical link function.[src] In the case of the Bernoulli, binomial, categorical and multinomial distributions, the support of the distributions is not the same type of data as the parameter being predicted.[src] In all of these cases, the predicted parameter is one or more probabilities, i.e.[src] real numbers in the range [0,1] .[src] The resulting model is known as logistic regression (or multinomial logistic regression in the case that K-way rather than binary values are being predicted).[src] For the Bernoulli and binomial distributions, the parameter is a single probability, indicating the likelihood of occurrence of a single event.[src] The Bernoulli still satisfies the basic condition of the generalized linear model in that, even though a single outcome will always be either 0 or 1, the expected value will nonetheless be a real-valued probability, i.e.[src] the probability of occurrence of a "yes" (or 1) outcome.[src] Similarly, in a binomial distribution, the expected value is Np, i.e.[src] the expected proportion of "yes" outcomes will be the probability to be predicted.[src] For categorical and multinomial distributions, the parameter to be predicted is a K-vector of probabilities, with the further restriction that all probabilities must add up to 1.[src] Each probability indicates the likelihood of occurrence of one of the K possible values.[src] For the multinomial distribution, and for the vector form of the categorical distribution, the expected values of the elements of the vector can be related to the predicted probabilities similarly to the binomial and Bernoulli distributions.[src] \boldsymbol\beta^{(t+1)} = \boldsymbol\beta^{(t)} + \mathcal{J}^{-1}(\boldsymbol\beta^{(t)}) u(\boldsymbol\beta^{(t)}), where \mathcal{J}(\boldsymbol\beta^{(t)}) is the observed information matrix (the negative of the Hessian matrix) and u(\boldsymbol\beta^{(t)}) is the score function; or a Fisher's scoring method: \boldsymbol\beta^{(t+1)} = \boldsymbol\beta^{(t)} + \mathcal{I}^{-1}(\boldsymbol\beta^{(t)}) u(\boldsymbol\beta^{(t)}), where \mathcal{I}(\boldsymbol\beta^{(t)}) is the Fisher information matrix.[src] Note that if the canonical link function is used, then they are the same.[src] g(p) = \operatorname{logit} p = \ln \left( { p \over 1-p } \right).[src] GLMs with this setup are logistic regression models (or logit models).[src] g(p) = \Phi^{-1}(p).\,\![src] The reason for the use of the probit model is that a constant scaling of the input variable to a normal CDF (which can be absorbed through equivalent scaling of all of the parameters) yields a function that is practically identical to the logit function, but probit models are more tractable in some situations than logit models.[src] (In a Bayesian setting in which normally distributed prior distributions are placed on the parameters, the relationship between the normal priors and the normal CDF link function means that a probit model can be computed using Gibbs sampling, while a logit model generally cannot.) g(p) = \log(-\log(1-p)).[src] This link function is asymmetric and will often produce different results from the logit and probit link functions.[src] The cloglog model corresponds to applications where we observe either zero events (e.g., defects) or one or more, where the number of events is assumed to follow the Poisson distribution.[src] The Poisson assumption means that \Pr(0) = \exp(-\mu), where μ is a positive number denoting the expected number of events.[src] If p represents the proportion of observations with at least one event, its complement 1-p = \Pr(0) = \exp(-\mu), and then -\log(1-p) = \mu.[src] A linear model requires the response variable to take values over the entire real line.[src] Since μ must be positive, we can enforce that by taking the logarithm, and letting log(μ) be a linear model.[src] This produces the "cloglog" transformation \log(-\log(1-p)) = \log(\mu).[src] The identity link g(p) = p is also sometimes used for binomial data to yield a linear probability model.[src] However, the identity link can predict nonsense "probabilities" less than zero or greater than one.[src] This can be avoided by using a transformation like cloglog, probit or logit (or any inverse cumulative distribution function).[src] A primary merit of the identity link is that it can be estimated using linear math—and other standard link functions are approximately linear matching the identity link near p = 0.5.[src] \operatorname{Var}(Y_i)= \tau\mu_i (1-\mu_i)\,\![src] where the dispersion parameter τ is exactly 1 for the binomial distribution.[src] Indeed, the standard binomial likelihood omits τ.[src] When it is present, the model is called "quasibinomial", and the modified likelihood is called a quasi-likelihood, since it is not generally the likelihood corresponding to any real family of probability distributions.[src] If τ exceeds 1, the model is said to exhibit overdispersion.[src] ===Multinomial regression=== The binomial case may be easily extended to allow for a multinomial distribution as the response (also, a Generalized Linear Model for counts, with a constrained total).[src] There are two ways in which this is usually done: ====Ordered response==== If the response variable is ordinal, then one may fit a model function of the form: g(\mu_m) = \eta_m = \beta_0 + X_1 \beta_1 + \cdots + X_p \beta_p + \gamma_2 + \cdots + \gamma_m = \eta_1 + \gamma_2 + \cdots + \gamma_m \text{ where } \mu_m = \operatorname{P}(Y \leq m).[src] \, for m > 2.[src] Different links g lead to ordinal regression models like proportional odds models or ordered probit models.[src] ====Unordered response==== If the response variable is a nominal measurement, or the data do not satisfy the assumptions of an ordered model, one may fit a model of the following form: g(\mu_m) = \eta_m = \beta_{m,0} + X_1 \beta_{m,1} + \cdots + X_p \beta_{m,p} \text{ where } \mu_m = \mathrm{P}(Y = m \mid Y \in \{1,m\} ).[src] \, for m > 2.[src] Different links g lead to multinomial logit or multinomial probit models.[src] These are more general than the ordered response models, and more parameters are estimated.[src] ===Count data=== Another example of generalized linear models includes Poisson regression which models count data using the Poisson distribution.[src] The link is typically the logarithm, the canonical link.[src] The variance function is proportional to the mean \operatorname{var}(Y_i) = \tau\mu_i,\, where the dispersion parameter τ is typically fixed at exactly one.[src] When it is not, the resulting quasi-likelihood model is often described as Poisson with overdispersion or quasi-Poisson.[src] ===Continuous proportional data=== When a response Y is double-bounded continuous random variable, after standardizing it into the unit interval [0,1], an example of generalized linear model is continuous binomial (cobin) regression based on continuous binomial distribution, a two-parameter generalization of continuous Bernoulli distribution.[src] An additional parameter \lambda is inversely proportional to variance, \operatorname{var}(Y_i) = \lambda^{-1} A(A^{-1}(\mu_i)),\, where A(\theta) = \log\{(e^\theta-1)/\theta\} .[src] It is related to fractional regression models based on quasi-maximum likelihood if the variance function is chosen differently.[src] \eta = \beta_0 + f_1(x_1) + f_2(x_2) + \cdots \,\![src] The smoothing functions f i are estimated from the data.[src] In general this requires a large number of data points and is computationally intensive.[src] ==See also== (VGLM) Generalized estimating equation ==Further reading== ==External links==[src]
126 sentences · 126 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"Generalized linear model." encyclopegia.org, 2026, https://encyclopegia.org/wiki/generalized-linear-model. Accessed 27 November 2026.
Chicago
"Generalized linear model." encyclopegia.org. Accessed November 27, 2026. https://encyclopegia.org/wiki/generalized-linear-model.
APA
encyclopegia.org. (2026). Generalized linear model. Retrieved November 27, 2026, from https://encyclopegia.org/wiki/generalized-linear-model
Accessed November 27, 2026 · CC BY-SA 4.0 · citation page · JSON