Tutorials › Generalized Linear Mixed Models (GLMM) › Inverse Links and Valid Response-Scale Predictions

From GLM to GLMM · Tutorial 14 of 698

Inverse Links and Valid Response-Scale Predictions

Translate linear predictors back to response-scale means and verify that the resulting predictions respect the response family’s allowable range.

Beginner 9 min read

What You'll Learn

  • Apply the inverse link to obtain a response-scale conditional mean.
  • Identify the valid mean range for Gaussian, binary, and count responses.
  • Check numerical predictions after applying identity, logit, and log inverse links.
  • Distinguish a predicted mean from a possible individual response.
  • Recognize when an inverse link or scientific context signals a range problem.
  • Compare range-preserving links with identity-link predictions for constrained responses.

From a Linear Predictor to a Mean

A model’s linear predictor is not usually expressed in the units of the response. To make a prediction that can be interpreted in those units, apply the inverse link. This step is also a basic validity check: the predicted conditional mean should belong to a range allowed by the response distribution and, where relevant, by the scientific meaning of the measurement.

Let \(Y\) denote a response, let \(\mu=E(Y\mid\text{model predictors})\) denote its conditional mean, and let \(\eta\) denote the linear predictor. If the link function \(g\) relates the mean to the predictor by \(g(\mu)=\eta\), then the response-scale prediction is \(\mu=g^{-1}(\eta)\). The calculation changes the scale of the prediction; it does not turn a predicted mean into a predicted individual outcome.

Definition: The inverse link \(g^{-1}\) maps a linear predictor \(\eta\) to a response-scale conditional mean, \(\mu=g^{-1}(\eta)\). The inverse link should map allowable predictor values to allowable mean values for the response model. A prediction is range-valid for the model if the resulting \(\mu\) lies in the mean space allowed by that model.

The inverse function reverses the link relationship: if \(\eta=g(\mu)\), then \(\mu=g^{-1}(\eta)\). For a link that maps the full allowable mean space onto the real line, every finite real-valued linear predictor produces a mean within that space. This is why inverse links matter for responses whose means are restricted. By contrast, a response with an unrestricted real-valued mean can use an identity link without imposing a finite range.

Mean Ranges Depend on the Response

The relevant range is the range of the mean, not necessarily the support of individual outcomes. A Gaussian response can take any real value, so its mean can be any real number. For a Bernoulli response, the mean is a success probability and must be between 0 and 1. For a count response, the mean cannot be negative. These differences determine what a range check should look for.

Response typeMeaning of \(\mu\)Allowable mean rangeIllustrative inverse link
GaussianConditional mean in the response’s unitsAll real numbersIdentity: \(g^{-1}(\eta)=\eta\)
BinaryConditional success probability\(0<\mu<1\) for finite predictors under a logit linkLogit inverse: \(g^{-1}(\eta)=1/(1+\exp(-\eta))\)
CountConditional expected countNonnegative; strictly positive for finite predictors under a log linkLog inverse: \(g^{-1}(\eta)=\exp(\eta)\)

The Gaussian model allows negative means mathematically. That does not guarantee that a Gaussian model is scientifically sensible for every real-valued measurement: if a measurement must be nonnegative, a negative prediction may reveal a poor fit to the measurement’s constraints even though it is within the Gaussian mean space. A count outcome and its mean also have different ranges. Individual counts are nonnegative integers, while their expected value can be a positive non-integer such as 2.4.

Worked Example: Gaussian Mean on the Response Scale

Suppose a Gaussian model predicts a person’s daily temperature in degrees Celsius with linear predictor \(\eta=18.5-0.40x\), where \(x\) is the number of hours after midnight. Under the identity link, \(g^{-1}(\eta)=\eta\). At \(x=6\), the predicted conditional mean is

$$ \eta=18.5-0.40(6)=18.5-2.4=16.1, \qquad \hat{\mu}=g^{-1}(16.1)=16.1\text{ degrees Celsius}. $$

The Gaussian mean range is all real numbers, so 16.1 is within the model’s allowable range. It is a predicted conditional mean, not a claim that every observed temperature at that predictor value will equal 16.1. The response distribution allows variation around the mean.

If a different predictor value gave \(\eta=-3.2\), the identity-link prediction would be \(-3.2\) degrees Celsius. That remains mathematically allowable for a Gaussian response. Whether it is scientifically plausible depends on the setting and observed data; range validity alone cannot establish that the model is adequate.

Range-Preserving Inverse Links

For a binary response, the conditional mean is the probability \(p\) of the outcome coded as success. One common link is the logit, whose inverse is \(p=1/(1+\exp(-\eta))\). For any finite real \(\eta\), the exponential term is positive, so the denominator is greater than 1 and the result is strictly between 0 and 1. Thus, finite predictors yield valid probabilities without needing to truncate them afterward.

For a count mean, the log-link inverse is \(\mu=\exp(\eta)\). The exponential is positive for every finite real predictor, so the prediction cannot be negative. It need not be an integer, because it is an expected count rather than a realized count. A zero mean is a boundary value of the nonnegative mean space, but a finite log-link predictor produces a strictly positive value; a mean of zero is approached only as \(\eta\) tends toward negative infinity.

Worked Example: Binary Probability From a Logit Predictor

Suppose a hypothetical binary-response model uses the logit inverse and gives a linear predictor \(\eta=-0.70\) for a specified set of predictors. The response is coded so that success is the event of interest. The predicted conditional success probability is

$$ \hat{p} =\frac{1}{1+\exp(-\eta)} =\frac{1}{1+\exp(-(-0.70))} =\frac{1}{1+\exp(0.70)} =\frac{1}{1+2.014} \approx 0.3318. $$

The prediction is approximately 0.332, or 33.2%. It lies between 0 and 1, as required for a probability. It describes the model’s conditional mean for the binary response at these predictor values; it is not the probability that the model itself is correct.

For comparison, an identity-link calculation at the same predictor value would return \(-0.70\), which cannot be a success probability. The issue is not the arithmetic: the identity inverse returns the predictor unchanged. The issue is that this result lies outside the binary mean range.

Worked Example: Expected Count From a Log Predictor

In a hypothetical count model, suppose the log-link linear predictor for a clinic-day with specified covariates is \(\eta=1.10\). Applying the inverse link gives

$$ \hat{\mu} =\exp(\eta) =\exp(1.10) \approx 3.004. $$

The predicted conditional mean is about 3.00 events per clinic-day. This is a valid positive expected count. A particular clinic-day’s observed count must be a nonnegative integer, but the model’s mean need not be an integer. If the predictor were \(-1.10\), then the predicted mean would be \(\exp(-1.10)\approx0.3329\) events per clinic-day, which is also valid: it represents a low expected count, not a fractional observed event.

A Short Justification for Range Checks

The basic logic of a range check follows from the model equation, rather than from a separate test. If the allowable mean space is \(\mathcal{M}\) and the link is one-to-one from \(\mathcal{M}\) onto the predictor space, its inverse maps each predictor in that space back into \(\mathcal{M}\). The two common constrained-response examples can be checked directly:

$$ \eta\in\mathbb{R} \quad\Longrightarrow\quad 0<\frac{1}{1+\exp(-\eta)}<1, \qquad \exp(\eta)>0. $$

The first inequality holds because \(\exp(-\eta)>0\), making the denominator greater than 1; the fraction is also positive. The second holds because an exponential is positive for every finite real input. These facts establish range validity for finite predictions under these inverse links. They do not establish that the link is substantively suitable, that the predictors are appropriate, or that the response distribution adequately describes the data.

How to Check a Prediction

A useful check keeps the response and mean distinct and follows the model’s stated link. For each prediction, identify what \(\mu\) represents, calculate \(\eta\) at the specified predictor values, apply the correct inverse link, and compare the result with the allowable mean range. In a generalized linear mixed model, make clear which predictor values are being used, including any specified random-effect value; the inverse-link calculation applies to that particular linear predictor.

1
Identify the mean.
State whether \(\mu\) is a real-valued measurement mean, a probability, or an expected count.
2
Calculate the predictor.
Substitute the covariate values, and any specified random-effect value, into the linear predictor to obtain \(\eta\).
3
Apply the matching inverse link.
Use \(\mu=g^{-1}(\eta)\), not the link function \(g\) itself.
4
Check and interpret.
Compare the result with the model’s mean range, then report it in response units or as a probability, as appropriate.

When predictions are computed for many predictor combinations, inspect the smallest and largest fitted means as well as representative values. Unexpected boundary-near predictions, large changes over small predictor changes, or invalid values under the chosen response family warrant checking the calculations and the model specification. A valid range is a necessary check, not a complete diagnostic: calibration, residual patterns, influential observations, and distributional fit require other tools.

Alternatives, Limitations, and Common Pitfalls

The identity link is simple: the response-scale mean equals the linear predictor. For an unrestricted Gaussian mean this can be appropriate and easy to interpret. For a binary probability, however, an identity-link prediction can fall below 0 or above 1. A range-preserving inverse link avoids those impossible predictions for finite linear predictors, but it does not guarantee that predictions will be accurate or that effects are easy to interpret on the response scale.

For count responses, a log inverse likewise rules out negative means, but it constrains finite-predictor means to be positive. It cannot produce an exact zero mean at finite \(\eta\). If zero outcomes are common, that fact alone does not prove the model is wrong—positive means allow zero observations—but it may be important to examine whether the chosen response distribution and model fit the observed pattern. The inverse link is not a substitute for checking the data and assumptions.

  • Wrong reasoning: “The linear predictor is the predicted probability or count, so I can report it directly.” Correction: The predictor is on the link scale. Apply \(g^{-1}\) before interpreting it as a conditional mean.
  • Wrong reasoning: “If an identity-link probability is negative, I will replace it with zero.” Correction: Truncating a fitted value changes the model’s predictions and is not the inverse-link calculation. Use a model and link suitable for the response, and assess its fit.
  • Wrong reasoning: “A predicted count mean of 2.4 is invalid because observed counts are integers.” Correction: Individual counts are integers; an expected count can be any nonnegative real number.
  • Wrong reasoning: “A prediction inside the valid range proves the model is appropriate.” Correction: Range validity is necessary for interpretation, but does not confirm distributional assumptions, fit, or scientific plausibility.
Key takeaway: Calculate the linear predictor on the link scale, apply its inverse to obtain the conditional mean, and then check that mean against the response model’s allowable range. The range check is necessary, but it is not a complete assessment of model adequacy.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions below.

  1. A Gaussian identity-link model gives \(\eta=-2.5\). Is this mean within the Gaussian model’s allowable range? What additional issue might matter if the response is a nonnegative measurement?
  2. A binary model has logit predictor \(\eta=0\). Calculate the predicted probability and check its range.
  3. A count model has log-link predictor \(\eta=0.5\). Calculate the expected count to three significant figures. Must an observed count equal that prediction?
  4. Why is replacing an identity-link prediction of \(-0.1\) with 0 not the same as applying an inverse link?

Solutions. (1) Yes. A Gaussian mean can be any real number, including \(-2.5\). If the measurement must be nonnegative, that prediction may nevertheless be scientifically implausible and signal a limitation of the model. (2) \(p=1/(1+\exp(0))=1/(1+1)=0.5\), a valid probability. (3) \(\mu=\exp(0.5)\approx1.65\) expected counts. An observed count is an integer and need not equal the conditional mean. (4) Truncation changes the prediction after fitting; it does not calculate \(g^{-1}(\eta)\) for the identity link. A suitable response model and link should be considered instead.

Clinical Biostats