Tutorials › Generalized Linear Mixed Models (GLMM) › From Conditional Link Values to Response Values

Random Intercepts and Slopes · Tutorial 44 of 698

From Conditional Link Values to Response Values

Convert conditional link-scale predictions into response-scale means or probabilities, while keeping clear that the result is conditional on the specified random effect.

Intermediate 11 min read

What You'll Learn

  • Apply the inverse identity, log, and logit links to a specified conditional predictor.
  • Distinguish a conditional response mean from a realized outcome.
  • Calculate and interpret conditional means and probabilities with a random intercept.
  • Check whether a transformed prediction is valid for the response’s support.
  • Avoid confusing a conditional prediction with one averaged over random effects.

From a Conditional Predictor to a Response-Scale Quantity

A conditional linear predictor is expressed on the scale chosen by the model’s link function. It is not necessarily measured in the units of the response. To report an expected outcome in response units, or a probability for a binary outcome, transform the predictor using the inverse link. This tutorial focuses on that conversion for identity, log, and logit links, with the random effect held fixed at a specified value.

The conversion answers a conditional question: for a given covariate value and a given cluster effect, what is the modeled mean or probability? It does not average predictions over the distribution of random effects. That distinction matters because the value for a particular cluster and an average across clusters are different quantities.

Definition: Let \(Y_{ij}\) be the response for observation \(i\) in cluster \(j\), \(x_{ij}\) its covariate, and \(b_j\) a random intercept. The conditional linear predictor is \(\eta_{ij}=\beta_0+\beta_1x_{ij}+b_j\). If the conditional mean is \(\mu_{ij}=E(Y_{ij}\mid x_{ij},b_j)\), the link model is \(g(\mu_{ij})=\eta_{ij}\). Thus the conditional mean is \(\mu_{ij}=g^{-1}(\eta_{ij})\), where \(g^{-1}\) is the inverse link.

For a binary response, the conditional mean is also the conditional probability of a response of 1. For a count response, it is the conditional expected count. For a continuous response, it is the conditional expected response in the response’s units. In all cases, a mean is not a guarantee of the outcome that will be observed: individual outcomes vary around it according to the conditional response distribution.

The Three Inverse Links

The calculation begins with the complete conditional predictor, including the cluster’s random-intercept contribution. Once \(\eta_{ij}\) is known, apply the inverse link as shown below.

LinkConditional meanResponse-scale interpretation
Identity: \(g(\mu)=\mu\)\(\mu_{ij}=\eta_{ij}\)Mean in the response’s original units
Log: \(g(\mu)=\log(\mu)\)\(\mu_{ij}=\exp(\eta_{ij})\)Positive conditional mean, such as an expected count
Logit: \(g(p)=\log\{p/(1-p)\}\)\(p_{ij}=1/\{1+\exp(-\eta_{ij})\}\)Conditional probability, strictly between 0 and 1 for finite \(\eta_{ij}\)

The algebra for the log and logit links is direct. For a log link, \(\log(\mu_{ij})=\eta_{ij}\), so exponentiating both sides gives \(\mu_{ij}=\exp(\eta_{ij})\). For a logit link, start from \(\log\{p_{ij}/(1-p_{ij})\}=\eta_{ij}\). Exponentiating gives \(p_{ij}/(1-p_{ij})=\exp(\eta_{ij})\). Multiplying by \(1-p_{ij}\) and collecting terms gives \(p_{ij}=\exp(\eta_{ij})/\{1+\exp(\eta_{ij})\}=1/\{1+\exp(-\eta_{ij})\}\). These transformations recover the conditional response-scale quantity; they do not change what is being conditioned on.

Key result: For a specified \(x_{ij}\) and \(b_j\), first calculate \(\eta_{ij}=\beta_0+\beta_1x_{ij}+b_j\). Then use the inverse link matching the model. Do not omit \(b_j\), and do not average over random effects unless the target is explicitly a population-averaged prediction.

Worked Conversions

Each example below treats the listed coefficients and random-intercept value as specified. This keeps the arithmetic focused on converting a conditional predictor into its response-scale meaning.

Worked Example: Identity Link and a Continuous Mean

Suppose a hypothetical continuous response is measured in points and has an identity-link model with \(\beta_0=12\) points, \(\beta_1=0.8\) points per study hour, and a cluster random intercept \(b_j=-1.5\) points. For a person in cluster \(j\) who studied \(x_{ij}=3\) hours, calculate the conditional mean.

Check the model’s use. Assume the conditional response model permits a continuous mean and that the identity link is appropriate for this response. An identity link does not automatically keep predictions in a restricted range, so the resulting mean must be checked against any scientific or measurement constraints. The value here is positive and is plausible for a points-scale mean with no stated upper bound that it violates.

Calculate the predictor.

$$ \eta_{ij}=\beta_0+\beta_1x_{ij}+b_j =12+(0.8)(3)-1.5 =12+2.4-1.5 =12.9. $$

For the identity link, \(g^{-1}(\eta)=\eta\). Therefore \(\mu_{ij}=12.9\) points. This is the model’s expected response for the specified covariate value and cluster intercept; it is not a claim that the observed response must equal 12.9 points.

Worked Example: Log Link and an Expected Count

Consider a hypothetical Poisson random-intercept model for a count observed over a fixed one-hour period. Suppose \(\beta_0=0.2\), \(\beta_1=0.35\) per unit of a predictor, and \(b_j=-0.25\). For an observation with \(x_{ij}=2\), find the conditional expected count. Assume the Poisson model and log link are appropriate for the conditional count distribution, and that the one-hour exposure is the same for every observation.

Calculate the predictor.

$$ \eta_{ij}=0.2+(0.35)(2)-0.25 =0.2+0.70-0.25 =0.65. $$

The log link requires exponentiation:

$$ \mu_{ij}=\exp(\eta_{ij})=\exp(0.65)\approx1.915. $$

The conditional expected count is about 1.915 events during the specified one-hour period for the stated covariate value and cluster intercept. A count actually observed must be a whole number; an expected count need not be. The positive value is consistent with the support of a Poisson mean.

Worked Example: Logit Link and a Conditional Probability

In a hypothetical binary-outcome model, suppose the conditional linear predictor is \(\eta_{ij}=-1.2+0.9x_{ij}+b_j\). For a person with \(x_{ij}=1\) in a cluster with \(b_j=0.4\), calculate the conditional probability of \(Y_{ij}=1\). Assume a Bernoulli response model with a logit link is appropriate for the binary outcome.

Calculate the predictor.

$$ \eta_{ij}=-1.2+(0.9)(1)+0.4 =-1.2+0.9+0.4 =0.1. $$

Apply the inverse logit:

$$ p_{ij}=\frac{1}{1+\exp(-0.1)} \approx\frac{1}{1+0.9048} \approx0.5250. $$

For these covariates and this cluster intercept, the modeled probability of \(Y_{ij}=1\) is approximately 0.525, or 52.50%. This probability is conditional on the specified cluster effect. The corresponding conditional odds are \(\exp(0.1)\approx1.105\), but the probability is obtained by the inverse-logit formula, not by interpreting 0.1 as a probability.

Assumptions, Checks, and Common Errors

The inverse-link arithmetic is exact once the conditional predictor and link are specified. The substantive validity of the resulting mean or probability still depends on the model. Before interpreting a conversion, check that the response distribution and link are suitable, the predictors and random-intercept value refer to the intended observation and cluster, and the predictor has been computed on the model’s stated scale. In a fitted model, also consider whether the model’s fit and assumptions are adequate; transforming a poor predictor does not repair a poor model.

Support checks are especially important for the identity link. If the response is binary and the identity-link prediction is outside \([0,1]\), it cannot be a valid probability. Even a value inside that range requires appropriate model assumptions. With the log link, a finite predictor maps to a positive mean, as required for positive-valued means such as Poisson means. With the logit link, a finite predictor maps to a probability strictly between 0 and 1. These ranges are consequences of the transformations, not evidence by themselves that a model fits well.

A common error is to report a logit-scale predictor directly as a probability. For example, \(\eta=0.1\) is not a 10% probability: it is a log-odds value. The correction is to apply the inverse logit, giving \(1/\{1+\exp(-0.1)\}\approx0.525\). Another error is to exponentiate a logit predictor. Exponentiation gives the odds, \(\exp(\eta)\), not the probability. To convert those odds \(o\) to a probability, use \(o/(1+o)\).

A different mistake is to drop the random intercept before transforming. In general, the conditional predictor includes \(b_j\), so omitting it changes the prediction for that cluster. Conversely, a conditional prediction should not be described as an average across clusters. Averaging over the random-effect distribution is a different target; the inverse-link conversion here is performed at a specified value of \(b_j\), without such averaging.

1
Assemble the conditional predictor.
Substitute the stated covariate values and the specified cluster intercept into the model’s linear predictor.
2
Apply the matching inverse link.
Leave an identity-link predictor unchanged, exponentiate a log-link predictor, or use the inverse-logit formula for a logit predictor.
3
Check and interpret the result.
Verify that the transformed value is compatible with the response’s support, then state the units or probability and the conditions on which it depends.

The main alternative to a conditional prediction is a population-averaged prediction that accounts for variation across the random-effect distribution. It answers a different question and generally cannot be obtained merely by transforming the predictor with \(b_j\) set to zero. This tutorial’s calculations are conditional: they take a specified cluster effect as given and transform that cluster-specific predictor. They are useful when the question concerns a particular cluster, but they do not summarize the average response over all clusters.

Key takeaway: A conditional predictor is converted to a conditional response mean or probability by applying the inverse link to the full predictor, including the specified random intercept. The scale, units, and conditioning must all be stated when reporting the result.

Check Your Understanding

For each item, calculate the requested response-scale quantity and interpret it in context.

  1. A continuous response uses an identity link. Its conditional predictor is \(\eta=7.4\) units. What is its conditional mean?
  2. A count response uses a log link and has conditional predictor \(\eta=-0.2\). Calculate its conditional mean to three significant figures.
  3. A binary response uses a logit link with \(\eta=-0.8\). Calculate the conditional probability of a response of 1 to three significant figures.
  4. For a binary response with an identity link, a fitted conditional predictor is 1.08. Is this a valid probability? Explain the relevant check.

Solutions. (1) The identity inverse link gives \(\mu=7.4\) units, the conditional expected response at the specified predictor value. (2) The log inverse link gives \(\mu=\exp(-0.2)\approx0.819\) expected counts, conditional on the specified predictors and random effect. (3) The inverse logit gives \(p=1/\{1+\exp(0.8)\}\approx1/(1+2.226)=0.310\), so the conditional probability is about 0.310. (4) No. A probability must lie in \([0,1]\), but 1.08 exceeds 1; the identity-link prediction is invalid as a probability, so it cannot be interpreted as one.

Clinical Biostats