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 .