Tutorials › Generalized Linear Mixed Models (GLMM) › Cluster-Specific Baselines on the Link Scale

Random Intercepts and Slopes · Tutorial 35 of 698

Cluster-Specific Baselines on the Link Scale

Learn to identify a cluster’s link-scale baseline and calculate its conditional response at a shared covariate profile.

Intermediate 10 min read

What You'll Learn

  • Define the cluster-specific baseline at a stated covariate reference profile.
  • Separate fixed contributions to the linear predictor from a cluster’s random-intercept deviation.
  • Calculate conditional responses for logistic, log, and identity links.
  • Explain why equal link-scale shifts need not create equal response-scale differences.
  • Recognize coding and modeling issues that can make a baseline difficult to interpret.
  • Distinguish a random-intercept model from pooled and fixed-cluster alternatives.

What a Cluster-Specific Baseline Describes

In a generalized linear mixed model, clusters may differ in their starting level even after their measured covariates are held fixed. For example, patients may be grouped by clinic, students by school, or repeated measurements by person. A random intercept represents this cluster-to-cluster variation as a shift in the linear predictor. The shift is defined on the link scale; its effect on the response scale depends on the chosen link.

The key phrase is “at a stated covariate profile.” An intercept is a baseline only relative to the values chosen as the reference for the covariates. If a continuous predictor is set to zero, the intercept refers to that value; if the predictor is centered, it refers to its centering value. For a categorical predictor, the reference category determines the baseline.

Definition: For cluster \(j\), let \(b_{0j}\) be its random intercept, \(\beta_0\) the fixed intercept, and \(\boldsymbol{x}_{ij}\) the covariate vector for observation \(i\). A random-intercept GLMM has conditional linear predictor $$ \eta_{ij}=\beta_0+\boldsymbol{x}_{ij}^{\mathsf T}\boldsymbol{\beta}+b_{0j}, $$ with conditional mean \(\mu_{ij}=E(Y_{ij}\mid \boldsymbol{x}_{ij},b_{0j})\) satisfying \(g(\mu_{ij})=\eta_{ij}\). At the reference profile \(\boldsymbol{x}=\boldsymbol{0}\), cluster \(j\)'s link-scale baseline is \(\beta_0+b_{0j}\), and its conditional response baseline is \(g^{-1}(\beta_0+b_{0j})\).

This tutorial uses \(j\) for a cluster and \(i\) for an observation within a cluster. The conditional mean is the mean for an observation in a specified cluster, given that cluster’s random effect and the covariates. It is not automatically the same as a mean averaged over the distribution of all clusters.

Assumptions and the Link-Scale Shift

The model statement comes with assumptions. Conditional on the covariates and random effects, the outcomes follow the specified response distribution and are independent across observations. The conditional mean is related to the linear predictor through the stated link. In a standard random-intercept model, the cluster effects are commonly modeled as independent draws from a mean-zero normal distribution, \(b_{0j}\sim N(0,\tau_{00})\), and are assumed independent of the covariates. The normal distribution is a model for variation across clusters; it does not assert that the response itself is normally distributed.

For a comparison between two clusters \(j\) and \(k\) at the same covariate profile \(\boldsymbol{x}\), the fixed terms are identical. Subtracting the two linear predictors therefore leaves only the difference between their random intercepts:

$$ \eta_j(\boldsymbol{x})-\eta_k(\boldsymbol{x}) = (\beta_0+\boldsymbol{x}^{\mathsf T}\boldsymbol{\beta}+b_{0j}) - (\beta_0+\boldsymbol{x}^{\mathsf T}\boldsymbol{\beta}+b_{0k}) = b_{0j}-b_{0k}. $$

Thus, a random intercept adds the same amount to a cluster’s linear predictor at every covariate profile. But the corresponding response-scale change is generally not a constant amount. It is \(g^{-1}(\beta_0+\boldsymbol{x}^{\mathsf T}\boldsymbol{\beta}+b_{0j})\), and the inverse link can transform equal link-scale shifts differently at different starting values.

Key distinction: The cluster-specific baseline is a value on the link scale, \(\beta_0+b_{0j}\), at the chosen reference profile. Its inverse-link transformation is a conditional response baseline. Neither should be interpreted without stating the covariate reference and the response scale.

Worked Examples Across Links

Worked Example: A Logistic Baseline at a Fixed Covariate Value

Suppose a hypothetical binary-outcome model uses the logit link and has fixed intercept \(\beta_0=-1.2\), fixed slope \(\beta_1=0.7\) for a predictor \(x\), and two illustrative cluster intercepts \(b_{01}=0.5\) and \(b_{02}=-0.4\). Calculate the two conditional probabilities when \(x=2\), and then find each cluster’s baseline probability at \(x=0\).

The model is \( \operatorname{logit}(\mu_{ij})=-1.2+0.7x+b_{0j}\), where \(\operatorname{logit}(\mu)=\log\{\mu/(1-\mu)\}\) and the inverse link is \(\operatorname{expit}(\eta)=1/(1+e^{-\eta})\). Assume the conditional response is Bernoulli, the link is correctly specified, and the listed cluster effects are the values to use for these calculations.

At the shared value \(x=2\), the fixed part is \(-1.2+0.7(2)=0.2\). For cluster 1, \(\eta_1=0.2+0.5=0.7\), so \(\mu_1=1/(1+e^{-0.7})=0.6682\). For cluster 2, \(\eta_2=0.2-0.4=-0.2\), so \(\mu_2=1/(1+e^{0.2})=0.4502\). At this covariate value, the model assigns conditional probabilities of about 0.668 and 0.450 to the outcome for clusters 1 and 2, respectively.

At the baseline profile \(x=0\), cluster 1 has \(\eta_{1,0}=-1.2+0.5=-0.7\), giving \(\mu_{1,0}=1/(1+e^{0.7})=0.3318\). Cluster 2 has \(\eta_{2,0}=-1.2-0.4=-1.6\), giving \(\mu_{2,0}=1/(1+e^{1.6})=0.1680\). These are the conditional baseline probabilities at \(x=0\), not probabilities averaged over clusters.

Worked Example: A Log-Link Baseline for a Positive Mean

Consider a hypothetical model for a positive conditional mean with log link. Let \(\beta_0=1.1\), let the slope for \(x\) be \(\beta_1=0.25\), and use two illustrative cluster intercepts, \(b_{01}=0.3\) and \(b_{02}=-0.2\). Find the conditional means at \(x=4\) and the baselines at \(x=0\).

The specified model is \(\log(\mu_{ij})=1.1+0.25x+b_{0j}\), so \(\mu_{ij}=\exp(1.1+0.25x+b_{0j})\). Assume the response distribution and log link are appropriate for the positive outcome, and that there is no additional offset in this illustration.

At \(x=4\), the fixed part is \(1.1+0.25(4)=2.1\). Cluster 1 has linear predictor \(2.1+0.3=2.4\), so its conditional mean is \(\exp(2.4)=11.02\). Cluster 2 has linear predictor \(2.1-0.2=1.9\), giving \(\exp(1.9)=6.686\). These values are expressed in the units of the modeled outcome.

At \(x=0\), the baselines are \(\exp(1.1+0.3)=\exp(1.4)=4.055\) for cluster 1 and \(\exp(1.1-0.2)=\exp(0.9)=2.460\) for cluster 2. The random intercepts shift the log means by their respective values; applying the inverse link converts those shifts to the response scale.

Worked Example: An Identity-Link Baseline in Outcome Units

Suppose a hypothetical continuous-outcome model uses the identity link, with \(\beta_0=50\), slope \(\beta_1=-2\) for a predictor \(x\), and cluster intercepts \(b_{01}=4\) and \(b_{02}=-3\). The response is measured in points. Calculate the conditional means at \(x=5\) and the reference baselines at \(x=0\).

The model is \(\mu_{ij}=50-2x+b_{0j}\). For this illustration, assume a Gaussian conditional response distribution with a constant conditional residual variance, an identity link, and the stated random-intercept values. The calculations concern the conditional means, not individual outcomes.

At \(x=5\), the fixed part is \(50-2(5)=40\). Cluster 1 has conditional mean \(40+4=44\) points, and cluster 2 has conditional mean \(40-3=37\) points. At \(x=0\), their baselines are \(50+4=54\) points and \(50-3=47\) points, respectively.

Here the identity link makes the distinction especially direct: a link-scale unit is a point on the response scale. The same numerical interpretation would not apply automatically with a nonlinear link.

Why the Inverse Link Matters

The preceding calculations illustrate a general result. At fixed covariates, increasing a cluster’s random intercept by \(\delta\) changes its linear predictor from \(\eta\) to \(\eta+\delta\). The change in conditional mean is $$ \Delta\mu=g^{-1}(\eta+\delta)-g^{-1}(\eta). $$ If \(g^{-1}\) is differentiable, a small shift has approximate response-scale effect \(\Delta\mu\approx \delta\,\frac{d}{d\eta}g^{-1}(\eta)\). The derivative depends on \(\eta\) for nonlinear inverse links, so the same shift need not produce the same response difference at different covariate profiles or in different clusters. For the identity link, \(g^{-1}(\eta)=\eta\), and the difference is exactly \(\delta\).

This also explains why “higher baseline” needs a scale attached to it. If the inverse link is increasing, a larger cluster intercept gives a larger conditional mean at the same covariates. The size of the response-scale gap, however, depends on where the two predictors fall on the inverse-link curve. A baseline is therefore a useful reference for describing a cluster, not a scale-free summary of its response.

Interpretation, Diagnostics, and Alternatives

A cluster-specific baseline is meaningful only if its reference profile is clear. With centered covariates, zero may represent an average or otherwise chosen value. With uncentered covariates, zero may be outside the observed range. In that case, the model can still define a baseline mathematically, but it may be a poor practical description of a typical observation. For categorical predictors, the baseline is tied to the chosen reference levels.

Useful checks focus on whether the specification supports the interpretation being made:

  • Verify the link, outcome distribution, coding, and units before calculating \(g^{-1}(\beta_0+b_{0j})\).
  • Check that the reference profile is meaningful and that the covariate values being compared are held fixed.
  • Look for convergence warnings or an estimated random-intercept variance at a boundary. These can indicate that the cluster variation is weakly identified or that the specified model is difficult to estimate.
  • Examine conditional residual patterns and cluster-level fit for systematic departures. A single random intercept may not capture differences in how clusters respond across covariate values.
  • Be cautious about extrapolating a baseline to covariate combinations with little or no data support.

The main alternatives answer different questions. A pooled GLM omits cluster-specific shifts and treats observations as not needing a cluster-level intercept. A model with fixed indicators for clusters estimates a separate fixed intercept for each observed cluster, rather than treating cluster effects as draws from a distribution. A random-intercept GLMM instead describes cluster deviations through a distribution and gives conditional predictions for clusters using their effects. Those choices involve different assumptions and interpretations; the random-intercept model is not automatically preferable simply because the data are clustered.

A further limitation is that the cluster-specific conditional baseline is not a population-average response. Averaging predictions over the distribution of random effects involves applying the inverse link and then averaging; in general, that does not equal applying the inverse link to the average linear predictor. In particular, the mean-zero assumption for \(b_{0j}\) does not make the population-average response equal to \(g^{-1}(\beta_0+\boldsymbol{x}^{\mathsf T}\boldsymbol{\beta})\) for a nonlinear link.

Common mistake: “The cluster effect is \(0.5\), so the outcome is 0.5 units higher in that cluster.” This is correct only for the response-scale difference under an identity link. With a nonlinear link, \(0.5\) is a shift on the link scale; the response-scale change must be calculated as \(g^{-1}(\eta+0.5)-g^{-1}(\eta)\) at the stated covariate profile.

A Practical Reading Sequence

When interpreting a fitted random-intercept model, keep the scales and reference point explicit. The following sequence prevents most baseline misreadings.

1
State the profile.
Name the covariate values, including the reference categories, at which the baseline is defined.
2
Form the linear predictor.
Add the fixed intercept, the fixed covariate contribution, and the cluster random intercept.
3
Apply the inverse link.
Transform the link-scale value to obtain the conditional response mean in the outcome’s units.
4
Qualify the interpretation.
Say that the result is conditional on the cluster effect and covariates; do not call it a population-average response unless it has been averaged appropriately.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. For a logit model with \(\beta_0=-0.8\) and \(b_{0j}=0.3\), calculate the cluster’s baseline probability at the reference profile.
  2. In a log-link model, two clusters have random intercepts \(0.2\) and \(-0.1\). What is the difference in their linear predictors at the same covariate values?
  3. For an identity-link model, a cluster intercept is \(-2\). What is its response-scale shift in the conditional mean relative to a cluster with random intercept zero, at the same covariates?
  4. Why might a baseline at \(x=0\) be difficult to interpret when the observed values of \(x\) are between 10 and 20?

Solutions. (1) The baseline linear predictor is \(-0.8+0.3=-0.5\), so the probability is \(1/(1+e^{0.5})=0.3775\). (2) The difference is \(0.2-(-0.1)=0.3\) on the link scale; the corresponding conditional means require applying the inverse link at the relevant predictor values. (3) Under the identity link, the conditional mean is shifted by \(-2\) outcome units. (4) Zero lies outside the observed range, so the baseline refers to an extrapolated covariate profile rather than a profile represented by the data; centering \(x\) at a meaningful value can make the intercept easier to interpret.

Clinical Biostats