An order-one exponential dispersion family has a scalar natural parameter and canonical sufficient statistic ; its density or mass function has the displayed form on parameter-independent support. Differentiating its normalization gives and . Known observation weights replace by . Its variance function is , and its canonical link function is .
For a Gamma distribution with fixed shape , choose dispersion , canonical parameter , and cumulant . The canonical link function is the displayed negative reciprocal; reversing its sign is an equivalent regression convention. For independent observations, the score function is and the Fisher information matrix is . The deviance is , with twice the log-likelihood ratio equal to this divided by . The fitted mean is the inverse link applied to , not itself.
Identity link Created 2026-10-14 Updated 2026-10-20
The identity link function equates the response mean with the linear predictor. In a generalized linear model it gives . It is the canonical link function for the normal distribution. For response families whose means must remain positive or between zero and one, using the identity link requires corresponding restrictions on the linear predictor.
In a generalized linear model, the linear predictor is , a linear combination of the covariates with unknown coefficients. The link function relates this predictor to the mean: . The canonical link function chooses the natural parameter of the exponential family, namely . Differentiating the normalization of the density shows that , so the canonical link function is on the admissible parameter interval.
For a Bernoulli distribution, the probability mass function can be written as
Thus and . The canonical link is the logit:
For an exponential dispersion family, differentiating the normalization integral with respect to gives an expected score of zero. The score is , hence . Differentiating again, the expected squared score is ; it is also . Thus
The canonical link function sets the linear predictor equal to the natural parameter: . The variance function is , so ; the dispersion parameter is separated from the mean-dependent factor.
The saturated statistical model has a separate mean for each response and fits , with boundary parameters interpreted by limits. At the same fixed dispersion, its log likelihood and the fitted model's log-likelihood define the scaled deviance
The unscaled deviance is
Keeping dispersion fixed in this definition is essential; it is not a comparison with a separately estimated zero variance in a Gaussian saturated fit.
For the normal distribution, expanding its density exponent gives
Consequently
Here and the canonical link is the identity, so . The saturated natural parameter is . Substitution into the deviance formula yields
For the cholesterol fits, all formulae include an intercept. Model 1 has age and BMI with three coefficients; models 2 and 3 have one of these covariates with two coefficients; model 4 has only the intercept. Their residual statistical degrees of freedom are respectively . Their reported deviances are residual sums of squares, because these are Gaussian linear models.
The relevant hypothesis is in the full model, against , with age already present. Thus compare model 2 with model 1 using the partial F-test. Its extra sum of squares is , and the common variance is estimated from model 1 by . Therefore
Since , reject at ; the two-sided coefficient-test equivalent has . BMI is associated with cholesterol after adjustment for age, under the linear Gaussian model. The RSS values alone do not identify the sign of its coefficient or the size of the association.
For comparison, the marginal BMI test would compare model 4 with model 3, giving on statistical degrees of freedom, with . This does not answer the adjusted question and makes the BMI evidence appear stronger than the conditional test. Age also contributes after BMI: comparing model 3 with model 1 gives on statistical degrees of freedom, with . Thus retaining both predictors is supported at the stated level.
A raw deviance difference must not simply be compared with the supplied cutoff: Gaussian dispersion is unknown and the differences here are unscaled. If were known, the scaled difference would have a law. Estimating it from the full fit gives the exact finite-sample comparison above, with the appropriate denominator statistical degrees of freedom.
Use the exponential dispersion family convention . For the Gamma distribution, take
Substitution reproduces the gamma density exactly. Differentiating its normalization with respect to yields and : the first identity follows from zero mean score, and differentiation again gives the variance. Therefore
The canonical link function is . Some conventions reverse the sign and call the reciprocal link; this only reverses the regression coefficients. We retain the genuine natural parameter .
In the Gamma regression with canonical link, and . Differentiating the independent-observation log-likelihood gives
Here , so the negative Hessian equals this information matrix. Fisher scoring or Newton iteration is
with the means and information recalculated at each iteration; damping can preserve and increase the likelihood. Full column rank makes the information positive definite for positive means.
The saturated model has mean . Subtracting fitted from saturated log-likelihood yields the unscaled deviance
Twice the actual log-likelihood ratio is . In particular, the printed parenthetical is incorrect for this nonidentity link: estimates , and .
A Poisson distribution has probability mass , where . It is an exponential family with , mean and variance . The responses are independent, their linear predictors are , and the log link relates these predictors to their means. These are precisely the components of a generalized linear model; the log link is its canonical link function and the dispersion is one.
The log-likelihood and score function are
Thus a finite maximum-likelihood estimator satisfies
The Hessian is ; with a full-rank design matrix it is negative definite at finite parameter values, so a finite solution is the unique maximum. A finite maximum need not exist for every possible response/design combination; the displayed equations describe it when it does exist. If the first component of every is one, the first score equation gives .
The saturated model fits each mean as , with the limiting mean zero allowed for a zero count. Subtracting the fitted log-likelihood from the saturated log-likelihood gives the Poisson deviance
where . With an intercept, the sum of the second terms is zero, but retaining them is necessary without that score equation.
Take low pH as a reference level. For group , the model with interaction has
where is biomass. The additive model sets every to zero. The interaction model estimates six parameters and the additive model four. In the additive model the log-mean curves are parallel straight lines, while the mean curves are positive exponentials with fixed ratios . In the interaction model the log-mean slopes differ, and the mean ratio is . The following sketches illustrate common versus factor-specific slopes in Poisson regression; their coefficients are illustrative, not estimates from the data.
Figure 1.
Illustrative Poisson mean curves with common and pH-specific biomass slopes
. Details.
The additive model is nested in the interaction model with two restrictions. The likelihood-ratio test therefore uses
whose p-value is . There is strong evidence that the biomass slope on the log-mean scale depends on pH. The interaction-model residual deviance is close to its residual degrees of freedom, giving no obvious indication of overdispersion from this comparison alone. The supplied deviances contain no slope estimates: they do not establish which pH group has more species, whether each slope is positive or negative, or whether any actual curves cross. Those conclusions require the fitted coefficients and their uncertainty.
An exponential dispersion family of order one has density or mass function, relative to a fixed dominating measure, of the form
where is a scalar natural parameter, is the dispersion parameter, and the support does not depend on . For regular families, is twice differentiable on an open natural-parameter domain and . Known observation weights replace by . “Order one” refers to the scalar canonical statistic , rather than an arbitrary vector of canonical statistics.
Differentiate the normalization , or its discrete counterpart, assuming differentiation under the integral is valid. The first derivative gives . The second derivative gives
Consequently,
The variance function expresses the second derivative in terms of the mean:
A generalized linear model specifies independent responses from an exponential dispersion family, a linear predictor , and a differentiable monotone link function relating it to the response mean by . The family, variance function, covariate design, link function and dispersion specification together define the model. The canonical link function identifies the linear predictor with the natural parameter:
One advantage is that the likelihood equations become particularly simple. With known weights and common dispersion , the score function and negative Hessian matrix for are
The latter does not explicitly depend on the responses, so it equals the expected Fisher information matrix at the same parameter. With full-rank design and positive variances the likelihood is strictly concave in , simplifying optimization. These statements concern the coefficient block at a fixed dispersion value.
Three explicit examples, taking unit weights, are as follows.
For a normal distribution with mean and variance ,
Thus , , , and . Its canonical link function is , the identity link.
For a Poisson distribution with mean and support ,
Here , , , and . Therefore , , and the Poisson canonical link is .
For a Bernoulli distribution with success probability ,
Taking , , , and gives the required form. Its mean and variance function are and . Its canonical link function is , the logit link. The fixed dispersion values in the Poisson and Bernoulli cases are part of those models; an arbitrary continuous dispersion is not being asserted for them.
To test , first fit the unrestricted model and then the restricted model with that component fixed at zero, estimating all nuisance parameters, including dispersion when applicable, in each fit. If and denote their full fitted parameter vectors, the likelihood-ratio test uses
For identifiable regular models, an interior null parameter and a fixed-dimensional full-rank design with increasing information, the Wilks theorem gives under . A level- test rejects for greater than the -quantile of the chi-squared distribution with one degree of freedom.
Alternatively the Wald test uses , with the variance obtained from the appropriate inverse full Fisher information matrix; it has the same limiting null law. The score test fits only the restricted model. If collects its nuisance parameters, its efficient information is , and the statistic is , again asymptotically . Accounting for the nuisance block is necessary rather than using the unadjusted diagonal information.
Write and . Differentiating gives , so
In the independent exponential dispersion family, only depends on . Its derivative therefore gives the score function
The residuals are independent, have mean zero and variance . Consequently their score covariance is the Fisher information matrix:
This also equals minus the expected likelihood Hessian under the usual regularity conditions.
For the canonical link function, and , so
To obtain the maximum-likelihood estimate, solve , for example with Fisher scoring iterations . Equivalently use iteratively reweighted least squares, with weights and working response . Since , the common dispersion scale cancels from this update for . A nonsingular information matrix and a finite interior likelihood maximum are needed; iteration does not assert those for every possible dataset.
An exponential dispersion family has density or mass function
with support independent of the natural parameter . Usually for a known weight . For the Poisson distribution, identify
The dispersion is fixed at one. Differentiating the normalizing identity gives ; differentiating again gives . Here both derivatives equal , so
The variance function expresses in terms of the mean . The canonical link function maps the mean to the natural parameter, so the Poisson canonical link is .
A generalized linear model has independent responses whose distributions belong to an exponential family:
Here the expected value and variance are and . A specified one-to-one link function connects the mean to the linear predictor: . The canonical link function is .
In binomial regression, independently, with known trial counts and probabilities related to the predictor. The logistic regression and probit regression specifications are respectively
Here is the standard normal distribution function. The binomial log-density contains , so its natural parameter is the log-odds: the logistic link is canonical. If the response mean is written as , the canonical link is .
For and , the Poisson distribution has mass
Match this to the exponential dispersion family with
Then and . The canonical link function expresses the natural parameter in terms of the mean, so the Poisson canonical link is . Its conditional variance equals its conditional mean.
Write and . With , the Gamma exponential dispersion family representation is
where
Substitution gives the original gamma density, so both unknown parameters are included. The exponential-family derivative identities yield and . Therefore
The exact natural-parameter canonical link function is . The usual inverse-link convention is , as used by the printed R fits; multiplying the link and coefficients by gives the natural-parameter convention. The sign convention changes neither the fitted means nor the weight matrix below.
A generalized linear model specifies independent responses in an exponential dispersion family, their means , and a link function connecting those means to a linear predictor. In the common notation,
where are known positive weights, is the common dispersion parameter, and is the variance function. The systematic part is
Here is a row of the known design matrix and contains the unknown regression coefficients. The link function is invertible on the permitted mean domain; the canonical link function takes the mean to the natural parameter. This separates distributional, predictor, and link assumptions: it does not require the response itself to be normally distributed or the mean itself to be linear in the covariates.
Use negative binomial regression with a logarithmic mean link, for example
library(MASS)
species_nb <- glm.nb(nspecies ~ altitude, link = log)
In the mean-size parametrization,
The extra parameter allows overdispersion that grows quadratically with the mean, unlike the proportional variance of Quasi-Poisson regression.
The printed assertion needs qualification: a negative-binomial model with fixed size is a generalized linear model. For known , its probability mass function is
With natural parameter , it has exponential family form
with dispersion one. A logarithmic link is permitted even though it is not the canonical link function. This is the fixed-size negative binomial generalized linear model.
What prevents a single ordinary fixed-family GLM fit in glm.nb is joint estimation of the unknown size : it changes the cumulant, carrier, and variance function, rather than merely multiplying a fixed variance function by a scalar dispersion. The routine alternates a GLM fit at fixed with size-parameter likelihood updates. Thus the intended distinction is between that enlarged fitting problem and a single fixed-family GLM, not a claim that negative-binomial regression can never be a GLM. The package documentation explicitly supports both conventions: stat.ethz.ch/R-manual/R-patched/library/MASS/html/glm.nb.html and stat.ethz.ch/R-manual/R-patched/library/MASS/html/negative.binomial.html.
Write for the log-likelihood and for the score function. Newton method uses the observed Fisher information ; Fisher scoring uses the Fisher information .
For independent responses in an exponential family, with fixed dispersion parameter and fixed weights , a canonical link function gives and
The last matrix depends on but not on the responses, so taking its expectation leaves it unchanged. Hence the two updates are identical, wherever this Fisher information matrix is invertible. Equivalently both solve the same iteratively reweighted least squares problem. This statement concerns the regression coefficients at a fixed dispersion parameter; a joint update of an unknown dispersion parameter need not have identical observed and expected full Fisher information matrices.
For the canonical link function, . Differentiating the log-likelihood gives the score function
Since
where is the variance function, a second differentiation gives
This Hessian does not depend on the observed , so taking its negative expectation changes nothing. Hence
A generalized linear model assumes that the independent responses have distributions in an exponential family, with means , and that
The invertible function is the link function; it connects the mean to the linear predictor.
For binomial regression, write independently, so . The logistic regression link is
while probit regression uses
where is the standard-normal distribution function. The logit is the canonical link function for the binomial family.
Expanding the exponent of the Inverse Gaussian distribution gives
Thus the exponential dispersion family representation
has
and
The standard cumulant identities yield
Hence the variance function is , and the canonical link function is .