Why One Estimated Random Effect May Not Be Enough
A dynamic prediction uses a patient’s observed biomarker history and event-free status up to a landmark time to predict risk over a future interval. In a joint model, the random effects connect the patient’s latent biomarker trajectory to their event hazard. This makes the patient’s random effects relevant to prediction, but it does not make one estimated value an adequate substitute for their uncertainty.
The key distinction is between calculating risk at a single estimated random-effects value and averaging the risks associated with the plausible values of the random effects given the patient’s data. Because risk is a nonlinear function of those effects, these calculations generally differ. The difference can be clinically important, and its direction is not always the same.
The Prediction That Averages Risks
For clarity, consider a joint model with hazard \(h_i(v\mid b_i;\theta)\) at future time \(v\), conditional on patient \(i\)’s random effects and observed covariates. The hazard may depend on a latent marker trajectory, for example through a current-value or slope association. In this tutorial, the model parameters are treated as fixed so that the contrast concerns random-effects uncertainty alone.
Given \(b_i\), the event risk between landmark \(s\) and \(s+u\) is one minus the conditional survival probability over that interval. The patient-specific prediction conditional on the observed history averages this risk over the conditional random-effects distribution:
The survival information through \(s\) belongs in the conditional distribution of \(b_i\): a patient who has remained event-free may provide information about their random effects as well as their biomarker measurements. The integrand is the future risk conditional on a particular \(b_i\); the integral is the average of those risks, weighted by how plausible each \(b_i\) is given the history.
By contrast, a plug-in prediction chooses a single value, often the conditional mean \(\bar b_i=E(b_i\mid\mathcal H_i(s),T_i>s;\theta)\), and calculates:
These expressions differ in general: the first averages a nonlinear risk function, while the second evaluates that function at an average random effect. A conditional mode or other single estimate has the same basic limitation; it also discards the spread and shape of the conditional distribution.
Why Averaging Before and After Risk Calculation Differ
A local approximation helps show which feature of the distribution matters. Write \(f(b_i)\) for the conditional risk at a given random-effects value and \(\bar b_i\) for the conditional mean. If \(f\) is twice differentiable and the distribution is concentrated enough for a second-order Taylor approximation around \(\bar b_i\), then:
Take the conditional expectation on both sides. The expected first-order term is zero because \(E(b_i-\bar b_i\mid\mathcal H_i(s),T_i>s)=0\). If \(\Sigma_i\) is the conditional covariance matrix of \(b_i\), the second-order approximation becomes:
Thus, even when the plug-in value is the conditional mean, risk curvature and conditional random-effects variation can produce a difference. This approximation is explanatory, not a replacement for the average itself: it can be inaccurate for a broad or skewed distribution, or when risk changes sharply across plausible random-effects values.
There is no universal direction for the difference. For example, if the conditional cumulative hazard is \(\Lambda(b_i)\), risk is \(1-\exp\{-\Lambda(b_i)\}\). Risk is concave as a function of \(\Lambda\), but the plug-in calculation uses \(\Lambda(\bar b_i)\), not \(E\{\Lambda(b_i)\}\). The relationship between random effects and cumulative hazard also matters.
Worked Example: A Plug-In Prediction Understates Risk
Suppose, hypothetically, that a patient’s conditional random-effects distribution places probability \(0.5\) on each of two values. Under a constant hazard model, these values imply rates of \(0.10\) and \(0.90\) events per year. We predict the probability of an event over the next year. Assume the model and conditional distribution are correctly specified, and that these weights already condition on the patient’s observed history and event-free status at the landmark.
At a constant rate \(\lambda\), one-year risk is \(1-\exp(-\lambda)\). The distribution-averaged prediction is therefore:
For a log-linear hazard, the midpoint of the two log rates corresponds to the geometric mean rate, \(\sqrt{0.10\times0.90}=0.3000\) events per year. This is the rate at the conditional mean random effect when the two random-effects values are symmetric around that mean. The plug-in prediction is:
The plug-in value is lower by \(0.3443-0.2592=0.0851\), or 8.51 percentage points. In this hypothetical example, averaging conditional risks gives a one-year risk of 34.43%, whereas using the conditional mean random effect gives 25.92%. The result illustrates a possible distortion, not a general rule that plug-in predictions always understate risk.
The Direction of Distortion Can Reverse
A plug-in prediction is not guaranteed to be conservative or liberal. The nonlinearity of the model and the location of the plausible random-effects values both affect the direction. The next example keeps the same constant-hazard setup but uses higher rates.
Worked Example: A Plug-In Prediction Overstates Risk
Suppose, hypothetically, that the conditional random-effects distribution gives equal weight to hazard rates of \(0.80\) and \(4.00\) events per year. For a one-year horizon, the average conditional risk is:
If the two random-effects values are symmetric about their conditional mean in a log-linear hazard model, the rate at that mean is their geometric mean, \(\sqrt{0.80\times4.00}=\sqrt{3.20}=1.789\) events per year. Thus:
Here the plug-in prediction is higher by \(0.8328-0.7662=0.0666\), or 6.66 percentage points. The average conditional risk is 76.62% and the plug-in risk is 83.28%. Together with the previous example, this shows why neither the sign nor size of the distortion can be inferred from the fact that one calculation is a plug-in.
When the Difference Is Likely to Matter
The contrast is most consequential when plausible random-effects values produce meaningfully different future hazards and the risk function changes appreciably over those values. This can occur when there is substantial conditional variation in a random intercept or slope, when the association between the marker trajectory and the hazard is strong, or when the prediction horizon makes survival probabilities particularly sensitive to the hazard.
Conversely, a plug-in calculation may be a reasonable approximation when the conditional distribution is tightly concentrated and conditional risk is nearly linear over its appreciable range. The local expansion explains this: the approximation difference is small when the covariance is small or the risk curvature is weak. These are reasons to examine the prediction, not guarantees that the approximation is accurate.
A useful diagnostic is to compare the plug-in risk with risks evaluated at multiple plausible random-effects values or with a distribution-averaged risk. A large spread in those conditional risks signals that the choice of a single value may matter. Also check that the conditional distribution reflects the information used at the landmark, especially event-free status, and that predictions are reported for the intended time horizon. A discrepancy is not, by itself, evidence that the joint model is misspecified; it can arise solely from replacing a distribution with one value.
Common Mistake and Alternatives
Common mistake: “The conditional mean random effect is the best estimate, so the risk at that mean must be the best patient-specific risk.” The first clause may describe a sensible summary of the random-effects distribution, but the conclusion does not follow. A nonlinear risk function does not generally preserve averages: \(f\{E(b_i\mid\mathcal H_i)\}\) need not equal \(E\{f(b_i)\mid\mathcal H_i\}\). For a risk prediction, the quantity of interest is the average of conditional risks when uncertainty about \(b_i\) is to be retained.
The principal alternatives answer different questions or make different approximations:
| Approach | What it calculates | Main caution |
|---|---|---|
| Plug in the conditional mean or mode | Risk at one representative random-effects value | Does not account for the distribution’s spread or shape in the nonlinear risk calculation |
| Average conditional risks | Risk averaged over the random-effects distribution conditional on the observed history | Requires representing that conditional distribution adequately |
| Population-average risk | Risk averaged over a population distribution, rather than the patient’s history-conditioned distribution | Answers a population-level question, not necessarily the individual prediction question |
Population-average and patient-specific risks therefore should not be treated as interchangeable. A history-conditioned average over random effects remains patient-specific because the distribution being averaged is informed by that patient’s data. This tutorial isolates random-effects uncertainty while holding model parameters fixed; uncertainty about the parameters is a separate source of uncertainty.
Scope and Limitations
The comparisons assume a correctly specified joint model and a valid conditional random-effects distribution given the available history. If the biomarker model, event model, association structure, or observation process is misspecified, averaging over random effects does not repair that problem. Similarly, the calculations do not establish that a prediction is calibrated or clinically useful; those require suitable evaluation.
Nor does this discussion prescribe a numerical method for computing the average. The central point is about the target calculation: average the conditional future risks over the conditional random-effects distribution rather than automatically treating one estimate as known. The accuracy of any practical approximation to that average is a further question.
Check Your Understanding
Answer each question using the distinction between a single-value prediction and an average of conditional risks.
- Why can the risk at the conditional mean random effect differ from the average risk over the conditional random-effects distribution?
- In a landmark prediction, why should the conditional random-effects distribution account for being event-free through the landmark?
- A plug-in prediction is lower than a distribution-averaged prediction in one example. Does that establish that plug-in predictions always understate risk?
- Give one situation in which a plug-in prediction might be a reasonable approximation.
Solutions. (1) Risk is generally nonlinear in the random effects, so evaluating risk at their mean need not equal averaging risk across their distribution. (2) Event-free status through the landmark is part of the observed history and can provide information about the patient’s random effects. (3) No. The direction depends on the risk function and the distribution’s location and shape; a plug-in value can also overstate risk. (4) It may be reasonable when the conditional distribution is concentrated and risk is nearly linear across the plausible random-effects values.