Tutorials › Joint Modeling of Longitudinal and Time-to-Event Data › Likelihood-Based Integration for Individual Prediction

Dynamic Prediction · Tutorial 526 of 697

Likelihood-Based Integration for Individual Prediction

Combine a patient’s longitudinal history and survival to the landmark to weight latent random effects, then average conditional survival to obtain an individual prediction.

Advanced 10 min read

What You'll Learn

  • Define the patient-specific likelihood contribution used to update random effects.
  • Include survival to the landmark when forming the conditional random-effects distribution.
  • Derive an integrated survival probability and its corresponding event risk.
  • Work through likelihood-weighted calculations using a finite random-effects example.
  • Diagnose failures caused by model misspecification or omitted likelihood contributions.
  • Distinguish integrated individual predictions from plug-in and population-average predictions.

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.

Definition: Let \(T_i\) be patient \(i\)’s event time, \(b_i\) their latent random-effects vector, and \(y_i(t)\) their longitudinal measurements observed by landmark time \(t\). Write \(f(b_i;\theta)\) for the random-effects density, \(f\{y_i(t)\mid b_i;\theta\}\) for the longitudinal-data likelihood conditional on the random effects, and \(S_i(s\mid b_i;\theta)=P(T_i>s\mid b_i,\theta)\) for conditional event-free survival. The likelihood-weighted random-effects distribution at the landmark is proportional to \[ f\{y_i(t)\mid b_i;\theta\}S_i(t\mid b_i;\theta)f(b_i;\theta). \] It describes how the model weights possible random effects for a patient who has the observed history and is event-free at \(t\).

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

$$ q_i(b_i\mid y_i(t),T_i>t;\theta) = \frac{ f\{y_i(t)\mid b_i;\theta\}S_i(t\mid b_i;\theta)f(b_i;\theta) }{ \int f\{y_i(t)\mid b_i;\theta\}S_i(t\mid b_i;\theta)f(b_i;\theta)\,db_i }. $$

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:

$$ P(T_i>u\mid T_i>t,y_i(t);\theta) = \int \frac{S_i(u\mid b_i;\theta)}{S_i(t\mid b_i;\theta)} q_i(b_i\mid y_i(t),T_i>t;\theta)\,db_i. $$

Equivalently, substituting the definition of \(q_i\) cancels the landmark survival term inside the integral:

$$ P(T_i>u\mid T_i>t,y_i(t);\theta) = \frac{ \int f\{y_i(t)\mid b_i;\theta\}S_i(u\mid b_i;\theta)f(b_i;\theta)\,db_i }{ \int f\{y_i(t)\mid b_i;\theta\}S_i(t\mid b_i;\theta)f(b_i;\theta)\,db_i }. $$

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

$$ w_L=\frac{0.24}{0.272}=\frac{15}{17}\approx0.882353, \qquad w_H=\frac{0.032}{0.272}=\frac{2}{17}\approx0.117647. $$

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:

$$ P(T_i>u\mid T_i>t,y_i(t)) = \frac{15}{17}(0.75)+\frac{2}{17}(0.50) = \frac{49}{68} \approx0.720588. $$

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

$$ \frac{6}{7}(0.1)+\frac{1}{7}(0.7) = \frac{1.3}{7} \approx0.185714. $$

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

$$ \frac{2}{3}(0.1)+\frac{1}{3}(0.7) = 0.300000. $$

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

$$ (0.466218)(0.873423)+(0.533782)(0.367879) = 0.407205524+0.196367188 = 0.603572713 \approx0.603573. $$

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.

Key takeaway: For a landmark prediction, combine the patient’s longitudinal likelihood, survival to the landmark, and random-effects distribution to obtain normalized weights. Average conditional future survival over those weights, then subtract from one for the corresponding event risk.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. In one sentence, why does the random-effects weighting include survival to landmark \(t\)?
  2. A patient’s integrated conditional survival from \(t\) to \(u\) is \(0.72\). What is the predicted event risk over \((t,u]\)?
  3. 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.
  4. 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.

Clinical Biostats