Why integrate over random effects?
A patient’s observed biomarker history gives information about that patient’s latent trajectory, but it does not reveal the trajectory exactly. In a joint model, the trajectory depends on latent random effects, and the event hazard may depend on that same trajectory. An individual prediction therefore needs to account for which random effects are plausible given the patient’s data, rather than treating one estimated value as certain.
Likelihood-based integration does this by weighting each possible random-effect value according to its model probability and its compatibility with the patient’s longitudinal observations and survival to the prediction landmark. The resulting prediction averages conditional survival over that weighted distribution. This is a frequentist plug-in prediction when the population-model parameters are set to their fitted estimates; the integration over random effects does not, by itself, integrate uncertainty in those parameter estimates.
From the patient-specific likelihood to a prediction
For clarity, suppose the patient has measured covariates \(x_i\), that their longitudinal measurements up to \(t\) have a density conditional on \(b_i\), and that their event-free status through \(t\) is known. A common joint-model assumption is that, conditional on \(b_i\) and the covariates, the longitudinal process and event time are independent. Under this conditional independence, the joint contribution of the observed longitudinal history and survival to the landmark, conditional on \(b_i\), is the product \(f\{y_i(t)\mid b_i;\theta\}S_i(t\mid b_i;\theta)\). Multiplying by \(f(b_i;\theta)\) gives the patient-specific contribution before integrating out \(b_i\).
The corresponding conditional density for the latent effects is
The denominator normalizes the weights so they integrate to one. At a later prediction time \(u>t\), the individual’s predicted survival is the average of their random-effects-conditional survival from \(t\) to \(u\), using this landmark distribution:
Equivalently, substituting the definition of \(q_i\) cancels the landmark survival term inside the integral:
The event risk over \((t,u]\), conditional on being event-free at \(t\) and on the observed history, is one minus this survival probability. In an actual frequentist analysis, \(\theta\) is commonly replaced by its fitted estimate \(\hat\theta\). The expressions then describe a plug-in prediction conditional on the fitted population parameters.
Worked calculations
Worked Example: Updating Two Possible Random-Effects Values
Suppose, hypothetically, a fitted model assigns a patient’s random effect two possible values, \(b_L\) and \(b_H\), with prior probabilities \(0.6\) and \(0.4\). The observed longitudinal history has conditional likelihoods \(0.5\) and \(0.2\), respectively. The conditional probabilities of surviving to landmark \(t\) are \(0.8\) and \(0.4\), and the probabilities of surviving to \(u\) are \(0.6\) and \(0.2\). Calculate the prediction conditional on being event-free at \(t\).
Step 1: Form the landmark likelihood weights. For \(b_L\), the unnormalized weight is \(0.6(0.5)(0.8)=0.24\). For \(b_H\), it is \(0.4(0.2)(0.4)=0.032\). Their sum is \(0.272\), so the normalized weights are
Step 2: Calculate conditional survival from \(t\) to \(u\). For \(b_L\), it is \(0.6/0.8=0.75\). For \(b_H\), it is \(0.2/0.4=0.50\). Average these using the landmark weights:
The predicted event risk over \((t,u]\) is \(1-0.720588\approx0.279412\), or 27.94%. The calculation conditions on survival to the landmark twice in a coherent way: survival to \(t\) affects the weights on random effects, while the ratio \(S(u\mid b)/S(t\mid b)\) gives each random-effect value’s subsequent survival.
Worked Example: Why Survival to the Landmark Changes the Weights
Consider a hypothetical two-value random effect with prior probabilities \(0.5\) and \(0.5\). A patient’s longitudinal history has likelihoods \(0.8\) and \(0.4\). The probabilities of surviving to the landmark are \(0.9\) and \(0.3\). Suppose the conditional risks over the next interval are \(0.1\) and \(0.7\), respectively. Compare the correctly updated risk with the one obtained by ignoring survival to the landmark.
Correct update. The unnormalized landmark weights are \(0.5(0.8)(0.9)=0.36\) and \(0.5(0.4)(0.3)=0.06\). Normalizing by \(0.42\) gives weights \(6/7\) and \(1/7\). Thus the predicted interval risk is
The predicted risk is about 18.57%. If survival to the landmark were omitted, the weights would instead be proportional only to the longitudinal likelihoods: \(0.4\) and \(0.2\), giving weights \(2/3\) and \(1/3\). That incorrect calculation gives
Here the discrepancy is substantial because the higher-risk random-effects value is less compatible with having survived to the landmark. The likelihood for survival to \(t\) is part of the patient-specific information whenever the prediction conditions on \(T_i>t\).
Worked Example: Integrating Conditional Survival Over Two Weighted Values
Suppose a hypothetical calculation has two random-effects values with normalized likelihood-based landmark weights \(0.466218\) and \(0.533782\). Their conditional probabilities of surviving from landmark year 1 to year 2 are \(0.873423\) and \(0.367879\). Calculate the conditional survival and event risk for years 1 to 2.
The integrated conditional survival is
Therefore, the conditional event risk is \(1-0.603572713=0.396427287\approx0.396427\), or about 39.64%. The interpretation is that, under this fitted model and conditional on the patient’s history and being event-free at year 1, the predicted probability of an event by year 2 is approximately 39.64%. It is not a probability that the model or its parameters are correct.
Justification and assumptions
The integration formula follows directly from conditioning on the latent random effects. Given \(b_i\), the probability of surviving beyond \(u\), conditional on survival to \(t\), is \(S_i(u\mid b_i)/S_i(t\mid b_i)\). Averaging that conditional probability over the random effects compatible with the patient’s observed history gives the first integral formula. Substituting the normalized density \(q_i\) yields the ratio of integrals: the factor \(S_i(t\mid b_i)\) in the landmark weights cancels the denominator in the conditional survival ratio, leaving \(S_i(u\mid b_i)\) in the numerator and the landmark likelihood normalizer in the denominator. This establishes the desired conditional probability without treating a single estimated random effect as known.
The calculation relies on a correctly specified joint model for the longitudinal measurements, random effects, and event process. In particular, the conditional-independence assumption must be reasonable: after conditioning on the random effects and modeled covariates, the longitudinal and event processes have no remaining dependence that the joint model needs to represent. The random-effects distribution, longitudinal measurement model, and event hazard must also be adequate for the data. If the hazard depends on the latent trajectory, its conditional survival \(S_i(s\mid b_i;\theta)\) must use that dependence consistently.
The observed history must be represented by the appropriate longitudinal likelihood, including the actual measurement times when the model requires them. The formula also assumes that the observation or visit process is ignorable for the likelihood being used, or that it has been modeled. A missingness or visit process that depends on unobserved marker values or event risk can otherwise change the information the observed history carries about \(b_i\). Predictions beyond \(t\) additionally require future covariates to be fixed, known, or handled under an explicit model; the formulas do not make unknown future covariates disappear.
Diagnostics, alternatives, and limitations
Likelihood-based integration is a construction, not a guarantee of a reliable prediction. Examine whether the fitted model reproduces longitudinal trajectories and event patterns, especially in the parts of the covariate and marker ranges relevant to the patient. Check that the patient’s observed measurements and event-free time have non-negligible likelihood under the fitted model. Very concentrated weights on a narrow region of random-effects space may be appropriate for a highly informative history, but can also signal a poor fit, sparse data, or numerical difficulty. Predictions that change sharply when a measurement is modestly perturbed deserve scrutiny.
A common mistake is to use only \(f\{y_i(t)\mid b_i\}f(b_i)\) to weight random effects and then condition on survival afterward. That omits the fact that this particular patient is known to have survived to \(t\). The correction is to include \(S_i(t\mid b_i)\) in the landmark weights, or equivalently to use the ratio-of-integrals expression with \(S_i(t\mid b_i)\) in the denominator.
Another tempting alternative is to plug in a single patient-specific estimate of \(b_i\) and calculate conditional survival there. That is simpler, but it discards uncertainty about the patient’s latent trajectory and can produce a different risk, particularly when the observed history is short or noisy. The earlier material on separating parameter and random-effects uncertainty distinguishes uncertainty in \(b_i\) from uncertainty in fitted population parameters: the integral here addresses the former conditional on \(\theta\), not the latter.
The likelihood-weighted prediction is also distinct from a population-average prediction. It is tailored to one patient’s history and survival to the landmark; a population-average quantity averages over a population distribution rather than that patient’s updated random-effects distribution. Neither target is universally preferable: the target must match the clinical question. Finally, integration can be computationally demanding when \(b_i\) is high-dimensional or the integrand is concentrated. The exact target remains the same, but numerical methods are needed to evaluate the integrals; selecting and assessing those methods is a separate computational issue.
Check Your Understanding
Answer each question, then compare with the solutions below.
- In one sentence, why does the random-effects weighting include survival to landmark \(t\)?
- A patient’s integrated conditional survival from \(t\) to \(u\) is \(0.72\). What is the predicted event risk over \((t,u]\)?
- With two equally likely random-effects values, the longitudinal likelihoods are \(0.6\) and \(0.3\), and survival-to-landmark probabilities are \(0.5\) and \(0.8\). Find the normalized landmark weights.
- What uncertainty is not automatically included when \(\theta\) is replaced by its fitted estimate in the integration?
Solutions. (1) Because the prediction conditions on the patient being event-free at \(t\), survival to \(t\) is part of the observed patient-specific information and changes which random effects are plausible. (2) The risk is \(1-0.72=0.28\), or 28%. (3) The unnormalized weights are \(0.5(0.6)(0.5)=0.15\) and \(0.5(0.3)(0.8)=0.12\); their sum is \(0.27\), so the normalized weights are \(0.15/0.27=0.5556\) and \(0.12/0.27=0.4444\). (4) Uncertainty in the fitted population-model parameters is not automatically included; this calculation integrates over random effects conditional on the fitted parameter values.