Why Compare Links?
In an inverse-Gaussian generalized linear model, the mean response \(\mu\) must be positive. A link function transforms that mean into a linear predictor, while the inverse link transforms a predictor value back into a fitted mean. Different links therefore give different fitted means from the same numerical predictor, and they do not all accept the same predictor values.
This tutorial compares four choices: the canonical link, the identity link, the log link, and the reciprocal link. The canonical link is a negative reciprocal square, not the reciprocal link. Keeping their formulas, ranges, and inverse functions distinct is essential when calculating predictions or checking whether a model's linear predictors are admissible.
For an observation with covariate vector \(x_i\), the predictor is commonly written \(\eta_i=x_i^\mathsf{T}\beta\). The link specifies how \(\eta_i\) determines the fitted mean \(\mu_i\); the fitted mean must remain in the positive support of the inverse-Gaussian distribution.
The Four Link Functions and Their Inverses
The inverse-Gaussian variance function is proportional to \(\mu^3\). In its exponential-dispersion representation, the natural parameter is \(-1/(2\mu^2)\), which gives the canonical link below. The other three links are common alternatives.
| Link | Link formula \(g(\mu)\) | Range for \(\mu>0\) | Inverse link and predictor domain |
|---|---|---|---|
| Canonical | \(-1/(2\mu^2)\) | \((-\infty,0)\) | \(\sqrt{-1/(2\eta)}\), for \(\eta<0\) |
| Identity | \(\mu\) | \((0,\infty)\) | \(\eta\), for \(\eta>0\) |
| Log | \(\log(\mu)\) | \(\mathbb{R}\) | \(\exp(\eta)\), for all real \(\eta\) |
| Reciprocal | \(1/\mu\) | \((0,\infty)\) | \(1/\eta\), for \(\eta>0\) |
To verify the inverse formulas, solve each link equation for \(\mu\). For the canonical link, \(\eta=-1/(2\mu^2)\) implies \(\mu^2=-1/(2\eta)\). Since \(\mu>0\), the solution is the positive square root, which exists only if \(\eta<0\). For the identity link, \(\eta=\mu\), so \(\mu=\eta\), and positivity requires \(\eta>0\). For the log link, \(\eta=\log(\mu)\) gives \(\mu=\exp(\eta)>0\) for every real \(\eta\). For the reciprocal link, \(\eta=1/\mu\) gives \(\mu=1/\eta\), which is positive precisely when \(\eta>0\).
The range statements follow directly from the formulas. For \(\mu>0\), \(-1/(2\mu^2)\) is always negative and can approach zero from below as \(\mu\) grows, or decrease without bound as \(\mu\) approaches zero. Both \(1/\mu\) and \(\mu\) are positive. The logarithm of a positive number can be any real number.
Worked Calculations
Worked Example: Evaluating All Four Links at One Mean
Suppose the mean is \(\mu=2\). Calculate the predictor value under each link.
Canonical: \(g(2)=-1/(2\cdot 2^2)=-1/8=-0.125\).
Identity: \(g(2)=2\).
Log: \(g(2)=\log(2)\approx0.6931\).
Reciprocal: \(g(2)=1/2=0.5\).
The same positive mean therefore corresponds to four different predictor values. Notice also that the canonical value is negative, whereas the reciprocal value is positive: these two links have ranges on opposite sides of zero.
Worked Example: Same Predictor Values, Different Fitted Means
Use the same numerical predictor values, \(-2,-0.5,0.5,2\), for each link. Apply the inverse formula where it is defined and gives a positive mean; mark the other cases as inadmissible.
| \(\eta\) | Canonical \(\sqrt{-1/(2\eta)}\) | Identity \(\eta\) | Log \(\exp(\eta)\) | Reciprocal \(1/\eta\) |
|---|---|---|---|---|
| \(-2\) | \(\sqrt{1/4}=0.5\) | Inadmissible | \(\exp(-2)\approx0.1353\) | Inadmissible |
| \(-0.5\) | \(\sqrt{1}=1\) | Inadmissible | \(\exp(-0.5)\approx0.6065\) | Inadmissible |
| \(0.5\) | Inadmissible | \(0.5\) | \(\exp(0.5)\approx1.6487\) | \(1/0.5=2\) |
| \(2\) | Inadmissible | \(2\) | \(\exp(2)\approx7.3891\) | \(1/2=0.5\) |
For example, at \(\eta=-2\), the canonical inverse gives \(\sqrt{-1/(2(-2))}=\sqrt{1/4}=0.5\), while the reciprocal inverse gives \(-0.5\), which is not a valid mean. At \(\eta=0.5\), the canonical expression has a negative quantity under the square root, while the reciprocal, identity, and log inverses return positive means.
No numerical predictor value is admissible for all four links: the canonical range is negative, and the identity and reciprocal ranges are positive. The table compares them at the same set of values, but correctly distinguishes a calculable fitted mean from an inadmissible one.
Worked Example: Checking Predictors Across Covariate Values
Consider a canonical-link model with \(\eta_i=-1.5+0.2x_i\), evaluated at \(x=0,2,5\). Calculate each predictor and fitted mean, then check the canonical-link constraint.
At \(x=0\), \(\eta=-1.5+0.2(0)=-1.5\). This is negative, so \(\mu=\sqrt{-1/(2(-1.5))}=\sqrt{1/3}\approx0.5774\).
At \(x=2\), \(\eta=-1.5+0.2(2)=-1.1\). This is negative, so \(\mu=\sqrt{-1/(2(-1.1))}=\sqrt{1/2.2}\approx0.6742\).
At \(x=5\), \(\eta=-1.5+0.2(5)=-0.5\). This is negative, so \(\mu=\sqrt{-1/(2(-0.5))}=\sqrt{1}=1\).
All three fitted means are defined and positive because every evaluated predictor is negative. For comparison, a reciprocal-link model must produce positive predictors at the covariate values where fitted means are required. For instance, \(\eta=0.4+0.1x\) gives predictors \(0.4,0.6,0.9\) at the same covariate values, and means \(1/0.4=2.5\), \(1/0.6\approx1.6667\), and \(1/0.9\approx1.1111\), respectively. Each predictor satisfies the reciprocal link's positive-domain condition.
Domain Constraints and a Common Mistake
The preceding calculations establish an important constraint: if a model uses the canonical link, each predictor at which a fitted mean is required must satisfy \(\eta_i<0\). With the identity or reciprocal link it must satisfy \(\eta_i>0\). The log link imposes no sign constraint on \(\eta_i\), because its inverse is positive for every real input.
This condition is about the predictor values, not about the covariates being positive or negative individually. A predictor is a combined value, such as \(x_i^\mathsf{T}\beta\). Its sign must be checked at the covariate values where the model is being used.
A second frequent error is to assume that an inverse formula returning a real number automatically gives an admissible fitted mean. For the identity link, \(\eta\) itself is real even when negative, but a negative result is not a positive inverse-Gaussian mean. Thus, the relevant condition is not merely that the inverse expression can be evaluated; its output must also belong to the model's positive-mean domain.
Why the Distinctions Matter
Link choice determines the scale on which the linear predictor acts and which predictor values are permissible. This comparison is useful before fitting or evaluating a model: a linear predictor can be perfectly well-defined algebraically yet fall outside the range required by its link. The log link avoids sign restrictions on the predictor, whereas the canonical, identity, and reciprocal links each have a restricted range.
The canonical and reciprocal links are especially easy to conflate because both involve reciprocals of the mean. Their formulas differ: the canonical link is \(-1/(2\mu^2)\), and its inverse involves a square root; the reciprocal link is \(1/\mu\), and its inverse is \(1/\eta\). Their admissible predictor signs are also opposite. These formula, inverse, and domain checks provide a compact way to compare links without confusing the transformations.
Check Your Understanding
For each question, state the relevant link and check its domain before calculating a fitted mean.
- For \(\mu=4\), calculate the canonical and reciprocal link values. Explain why they have different signs.
- Which of the four links can produce a positive fitted mean when \(\eta=-0.25\)? Calculate each admissible fitted mean.
- A reciprocal-link model gives \(\eta_i=0\) for one observation. Why is its fitted mean not defined?
- For a log-link model with \(\eta=-1\), calculate the fitted mean and verify that it is positive.
- Explain why the phrase “inverse link” does not identify the reciprocal link.