Tutorials › Generalized Linear Mixed Models (GLMM) › Interpreting Correlated Intercept and Slope Predictions

Prediction of Random Effects · Tutorial 472 of 698

Interpreting Correlated Intercept and Slope Predictions

You will learn when evidence about a group’s intercept changes its predicted slope, how to calculate that change, and how to interpret the resulting group trajectory.

Advanced 12 min read

What You'll Learn

  • State a GLMM with a bivariate normal random intercept and slope.
  • Derive the conditional mean and variance of one random effect given the other.
  • Distinguish prior intercept–slope association from a posterior update using group data.
  • Calculate an intercept-only evidence update under a Gaussian likelihood summary.
  • Translate joint random-effect predictions into a group-specific trajectory on the link scale.
  • Identify when sparse data, weakly estimated covariance, or extrapolation makes predictions unreliable.

Why Intercept–Slope Covariance Matters

A group can start above the population trajectory and then change more slowly than the population, or start above it and change more quickly. In a random-intercept-and-slope model, the relationship between those two group effects is represented by their covariance. When that covariance is nonzero, evidence about one effect can also inform prediction of the other. The direction and strength of that information depend on the sign and size of the covariance, the uncertainty in the effects, and which covariate values the group data cover.

The central interpretive caution is that a correlation in the random-effects distribution is not, by itself, a statement that every group with a high intercept must have a high slope. It describes a population-level association among group effects. A group’s predicted effects are conditional on its observed data and on the fitted model; the association helps connect the two predictions, but it does not replace the group likelihood.

Model and Conditional Relationship

Let \(Y_{ij}\) be the response for observation \(i\) in group \(j\), and let \(t_{ij}\) be a covariate measured relative to a chosen reference value, so \(t_{ij}=0\) at that reference. A GLMM with a random intercept and random slope can be written as

$$ g\{E(Y_{ij}\mid b_{0j},b_{1j})\} =\beta_0+\beta_1t_{ij}+b_{0j}+b_{1j}t_{ij}, \qquad \begin{pmatrix}b_{0j}\\b_{1j}\end{pmatrix} \sim N\left[ \begin{pmatrix}0\\0\end{pmatrix}, \begin{pmatrix} \sigma_0^2 & \sigma_{01}\\ \sigma_{01} & \sigma_1^2 \end{pmatrix} \right]. $$

Here \(g\) is the link function, \(\beta_0+\beta_1t\) is the population-level linear predictor, and \(b_{0j}+b_{1j}t\) is group \(j\)’s deviation from it. Thus \(b_{0j}\) is the group’s deviation at \(t=0\), and \(b_{1j}\) is its deviation in linear-predictor units per one-unit increase in \(t\). The random effects are assumed to have mean zero and a common bivariate normal distribution across groups, with a positive-semidefinite covariance matrix. Conditional on the random effects and covariates, responses are independent and follow the specified GLMM response distribution. The fixed effects and covariance parameters are usually estimated; predictions using their estimates treat those estimates as fixed unless parameter uncertainty is explicitly included.

Definition: The intercept–slope covariance is \(\sigma_{01}=\operatorname{Cov}(b_{0j},b_{1j})\). If both variances are positive, the corresponding correlation is \(\rho=\sigma_{01}/(\sigma_0\sigma_1)\). Under the bivariate normal random-effects assumption, \(E(b_{1j}\mid b_{0j}=b)=\dfrac{\sigma_{01}}{\sigma_0^2}b\) and \(\operatorname{Var}(b_{1j}\mid b_{0j})=\sigma_1^2-\dfrac{\sigma_{01}^2}{\sigma_0^2}=\sigma_1^2(1-\rho^2)\).

The conditional mean is a regression of the slope on the intercept under the random-effects distribution. Its coefficient \(\sigma_{01}/\sigma_0^2\) is not the correlation itself: it has units of slope per intercept unit. If \(\sigma_{01}>0\), a positive intercept is associated with a positive conditional mean slope; if \(\sigma_{01}<0\), the direction is reversed. The conditional variance describes the remaining slope variation after the intercept is known.

Why the Conditional Formula Holds

Write \(a=\sigma_{01}/\sigma_0^2\) and define \(R=b_{1j}-ab_{0j}\). Direct calculation gives

$$ \operatorname{Cov}(R,b_{0j}) =\sigma_{01}-a\sigma_0^2=0, \qquad \operatorname{Var}(R) =\sigma_1^2-\frac{\sigma_{01}^2}{\sigma_0^2}. $$

Because \((R,b_{0j})\) is jointly normal, zero covariance implies independence. Therefore \(b_{1j}=ab_{0j}+R\), where \(R\) is independent of \(b_{0j}\), has mean zero and the variance shown above. Conditioning on \(b_{0j}=b\) leaves \(R\)’s distribution unchanged, so the conditional mean is \(ab\) and the conditional variance is \(\operatorname{Var}(R)\). This derivation relies on the bivariate normal assumption; a covariance alone does not determine this linear conditional expectation for arbitrary nonnormal random effects.

Worked Example: Interpreting the Random-Effects Association

Suppose a hypothetical fitted model has \(\sigma_0=0.80\), \(\sigma_1=0.30\), and \(\rho=0.60\). Calculate the intercept–slope covariance and the conditional prediction of the slope for a group whose intercept effect is \(0.80\).

The covariance is \(\sigma_{01}=\rho\sigma_0\sigma_1=(0.60)(0.80)(0.30)=0.144\). The conditional-mean coefficient is \(0.144/0.80^2=0.144/0.64=0.225\). Thus the conditional mean slope is \(E(b_{1j}\mid b_{0j}=0.80)=0.225(0.80)=0.180\).

The conditional variance and standard deviation are \(\operatorname{Var}(b_{1j}\mid b_{0j})=0.30^2(1-0.60^2)=0.09(0.64)=0.0576\) and \(\sqrt{0.0576}=0.240\). The distribution of the slope given that exact intercept is therefore normal with mean \(0.180\) and standard deviation \(0.240\). This is a distributional prediction, not a claim that the group’s actual slope is exactly \(0.180\).

How Group Evidence Updates the Pair

For observed group data \(y_j\), the posterior distribution of the random effects is proportional to the group likelihood times their joint normal distribution:

$$ p(b_{0j},b_{1j}\mid y_j) \propto p(y_j\mid b_{0j},b_{1j})\, p(b_{0j},b_{1j}). $$

In general, the likelihood depends on both effects. Repeated observations across a range of \(t\) values can provide direct evidence about both the group’s level and its rate of change. Consequently, the posterior prediction of the slope is not generally obtained by taking a posterior intercept prediction and inserting it into the prior conditional-mean formula. That shortcut is justified in the special case where the group evidence informs only the intercept, or under an explicitly stated approximation with that structure. For general GLMM data, calculate or approximate the joint conditional distribution using the likelihood and the fitted model.

The next example isolates the covariance-based update. Treat the group’s intercept evidence as a Gaussian likelihood summary and suppose it contains no direct slope information. This is a transparent calculation of how intercept information alone propagates through the fitted random-effects association; it is not a claim that every GLMM group likelihood has this form.

Worked Example: Updating the Slope From Intercept-Only Evidence

Use the random-effects values from the previous example. For a hypothetical group, suppose a local Gaussian likelihood summary for its intercept is centered at \(0.50\), with standard error \(0.30\): \(z\mid b_{0j}\sim N(b_{0j},0.30^2)\), where the observed summary is \(z=0.50\). Assume this summary depends only on \(b_{0j}\). Find the posterior means and variances of both effects.

The prior intercept is \(b_{0j}\sim N(0,0.64)\), and the summary variance is \(V=0.09\). Normal–normal updating gives posterior variance \(V_0=(1/0.64+1/0.09)^{-1}=(0.64)(0.09)/(0.64+0.09)=0.0576/0.73=0.07890\). The posterior mean is \(m_0=V_0(0.50/0.09)=0.4384\). Equivalently, the posterior mean is \(0.64/(0.64+0.09)\) times \(0.50\).

Because the likelihood summary contains no slope term, the conditional distribution of \(b_{1j}\) given \(b_{0j}\) remains the prior conditional distribution from the bivariate normal model. Averaging its conditional mean over the posterior distribution of \(b_{0j}\) gives \(E(b_{1j}\mid z)=0.225(0.4384)=0.09863\). The posterior variance includes both the residual conditional slope variance and uncertainty about the intercept: \[ \operatorname{Var}(b_{1j}\mid z) =0.0576+(0.225)^2(0.07890) =0.0576+0.003994 =0.06159. \]

Thus the posterior mean slope is \(0.09863\), with posterior standard deviation \(\sqrt{0.06159}=0.2482\). Evidence favoring a positive intercept shifts the slope prediction upward because the fitted covariance is positive. The slope remains uncertain: the intercept evidence does not directly measure the group’s rate of change.

Reading the Group-Specific Trajectory

A predicted trajectory combines the fixed effects and the predicted random effects. On the linear-predictor scale, the group-specific line is \(\beta_0+m_0+(\beta_1+m_1)t\), where \(m_0\) and \(m_1\) are the posterior means of the group effects. The group’s predicted deviation from the population trajectory is \(m_0+m_1t\). These are predictions on the link scale; interpreting them on the response scale requires applying the inverse link, a separate transformation.

Worked Example: Tracing a Group’s Predicted Trajectory

Continue with the posterior means \(m_0=0.4384\) and \(m_1=0.09863\). Suppose the hypothetical population linear predictor is \(-1.20+0.35t\), with \(t\) measured in years from the reference time. Calculate the population and group-specific predictors at \(t=-1,0,\) and \(t=2\).

The group’s predicted deviation is \(0.4384+0.09863t\), and its total slope is \(0.35+0.09863=0.44863\) linear-predictor units per year. At \(t=-1\), the deviation is \(0.4384-0.09863=0.3398\); the population predictor is \(-1.20-0.35=-1.55\), so the group predictor is \(-1.55+0.3398=-1.210\).

At \(t=0\), the deviation is \(0.4384\), and the group predictor is \(-1.20+0.4384=-0.7616\). At \(t=2\), the deviation is \(0.4384+2(0.09863)=0.6357\); the population predictor is \(-1.20+2(0.35)=-0.500\), so the group predictor is \(-0.500+0.6357=0.1357\).

The group is predicted to be above the population trajectory at all three times, and its positive slope deviation makes that gap grow as \(t\) increases. These predictions are on the link scale and are based on the intercept-only likelihood summary; the example does not establish that the group’s data directly identify a changing trajectory.

Uncertainty, Diagnostics, and Alternatives

The covariance affects not only point predictions but also uncertainty about the group deviation at a particular \(t\). In the preceding intercept-only update, the posterior covariance is \(\operatorname{Cov}(b_{0j},b_{1j}\mid z)=0.225(0.07890)=0.01775\). Therefore the posterior variance of \(b_{0j}+tb_{1j}\) is \[ \operatorname{Var}(b_{0j}+tb_{1j}\mid z) =0.07890+2t(0.01775)+t^2(0.06159). \] At \(t=0\), its standard deviation is \(\sqrt{0.07890}=0.281\). At \(t=2\), the variance is \(0.07890+4(0.01775)+4(0.06159)=0.3963\), giving standard deviation \(0.6295\). A trajectory point farther from the reference time can be less precise because slope uncertainty accumulates with distance. The covariance term may increase or decrease the variance depending on the signs of \(t\) and the covariance.

Several checks help reveal when an interpretation is fragile. First, examine uncertainty in the estimated covariance or correlation: a point estimate of \(\rho\) can be unstable when there are few groups or little between-group variation. A covariance matrix near a singular boundary may imply that the data support little independent variation in one direction. Second, check whether groups have observations across enough distinct \(t\) values to separate intercept from slope. If most observations are near \(t=0\), they may inform the intercept while providing little direct slope information. Third, compare predictions over the range of observed covariates with predictions far beyond it; a mathematically defined trajectory can still be an unreliable extrapolation.

A model with independent random intercepts and slopes sets \(\sigma_{01}=0\), so the prior conditional mean of the slope does not change with the intercept. This may be a useful simpler model if the data do not support estimating a covariance, but it is a substantive restriction, not a harmless computational choice. A full correlated-effects model allows the association, while joint posterior prediction uses all group data to update both effects. The latter is the appropriate general view for GLMMs: the prior covariance links effects, and the group likelihood can add direct information about either or both.

Do not interpret covariance as causal influence, and do not infer a strong group-specific slope from a high intercept alone. The conditional-mean calculation depends on the fitted covariance structure and its uncertainty; it can be especially misleading when that structure is weakly estimated. Also distinguish the slope deviation \(b_{1j}\) from the total group slope \(\beta_1+b_{1j}\). The former is the group’s departure from the population slope, not its entire rate of change.

Key takeaway: Under bivariate normal random effects, intercept–slope covariance gives a precise conditional relationship between the two effects. Group data update their joint distribution through the likelihood; only when the likelihood informs the intercept alone does the simple prior conditional-mean formula directly describe how intercept evidence shifts the slope prediction.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. If \(\sigma_{01}<0\), what direction of conditional slope prediction is associated with a positive intercept effect?
  2. With \(\sigma_0=0.50\), \(\sigma_1=0.20\), and \(\rho=-0.40\), calculate \(\sigma_{01}\) and \(E(b_{1j}\mid b_{0j}=0.25)\).
  3. Why is it generally incorrect to obtain a GLMM group’s slope prediction by plugging its posterior intercept mean into the prior conditional-mean formula?
  4. In a model with \(\beta_1=0.30\) and predicted \(b_{1j}=-0.08\), what is the group’s total slope on the linear-predictor scale?

Solutions. (1) The conditional slope mean is \((\sigma_{01}/\sigma_0^2)b_{0j}\); with positive \(b_{0j}\) and negative covariance, it is negative. (2) The covariance is \((-0.40)(0.50)(0.20)=-0.040\). The conditional-mean coefficient is \(-0.040/0.50^2=-0.16\), so the predicted conditional mean is \((-0.16)(0.25)=-0.040\). (3) In general, the group likelihood depends on both intercept and slope, so both effects are updated jointly; the prior conditional relationship alone does not capture all the data’s slope information. (4) The total slope is \(\beta_1+b_{1j}=0.30-0.08=0.22\) linear-predictor units per unit increase in the covariate.

Clinical Biostats