From a Fitted Model to a Patient-Specific Forecast
A fitted joint model contains the ingredients for dynamic prediction, but a forecast is not obtained by simply inserting a patient’s latest biomarker value into a hazard equation. The patient’s observed marker history and survival up to the prediction time both inform the latent random effects. The algorithm must account for that updated uncertainty, calculate survival from the landmark to the chosen horizon, and average over the resulting patient-specific distribution.
Let \(s\) be the landmark time, when the patient is known to be alive and event-free, and let \(u>0\) be the prediction horizon measured from that landmark. The target is conditional survival through time \(s+u\), given survival through \(s\) and the observed history available by \(s\). The corresponding event risk over the interval is one minus this conditional survival.
A shared-random-effects model links the longitudinal trajectory to the event process through \(b_i\). For example, a marker model may specify a latent trajectory \(m_i(t)=X_i(t)^\mathsf{T}\beta+Z_i(t)^\mathsf{T}b_i\), while the event hazard may depend on that trajectory or on some of its features. The exact association structure depends on the fitted model; the algorithm below uses that structure as fitted rather than replacing it with a new one.
The Conditioning and Integration Steps
Suppose first that the model parameters are held fixed at \(\theta\), as in a plug-in prediction based on fitted parameter estimates. The patient’s random effects are not known. Their distribution after observing the patient’s history must include the fact that the patient survived event-free to \(s\). If \(p(b_i\mid\theta)\) is the random-effects distribution and \(p(Y_i(s)\mid b_i,\theta)\) is the longitudinal-data likelihood through \(s\), then
where \(S_i(t\mid b_i,\theta)=P(T_i>t\mid b_i,\theta)\) is survival conditional on the random effects and model parameters. This expression assumes the longitudinal and event processes are conditionally independent given the shared random effects and other modeled covariates, and that the specified joint model is appropriate. It also assumes that any censoring information used in fitting or prediction is handled under the model’s censoring assumptions. Survival to \(s\) contributes information: random-effects values associated with lower survival to \(s\) receive less posterior weight among patients known to be alive at \(s\).
For a particular value of \(b_i\), survival over the forecast interval, conditional on survival to the landmark, is \(S_i(s+u\mid b_i,\theta)/S_i(s\mid b_i,\theta)\). Averaging this ratio over the patient-specific distribution of the random effects gives the prediction:
This is a conditional survival probability. It is not the unconditional survival \(S_i(s+u)\), nor is it the survival probability for a hypothetical patient whose random effects are known exactly. Its complement, \(1-\pi_i(s,u;\theta)\), is the predicted probability of experiencing the event between \(s\) and \(s+u\), conditional on the patient’s history and being event-free at \(s\).
An equivalent expression clarifies how the landmark survival information enters. Let \(q_i(b_i)=p(b_i\mid Y_i(s),\theta)\) denote the random-effects distribution updated by the longitudinal history alone. Then
The denominator is the model-based probability of surviving to \(s\), averaged over the marker-informed random-effects distribution. This ratio is equal to averaging the interval survival ratio over the distribution further updated by survival to \(s\). Both forms are useful for checking an implementation.
A Practical End-to-End Algorithm
In practice, the integrals may be evaluated with a numerical method suitable for the fitted model, such as quadrature or Monte Carlo integration. The integration method does not change the target; it approximates the averages in the equations. A complete prediction proceeds as follows.
Record the patient, landmark \(s\), horizon \(u\), event of interest, and covariate values or future covariate assumptions required by the fitted model. Confirm that the patient is event-free at \(s\).
Use only longitudinal observations available by \(s\), together with the patient’s modeled covariates and survival status through \(s\). Do not use measurements recorded after the landmark.
Combine the random-effects distribution, the longitudinal likelihood through \(s\), and the survival contribution through \(s\). With quadrature this produces normalized node weights; with simulation it produces draws or weighted draws.
For each random-effects value, evaluate \(S_i(s+u\mid b_i,\theta)/S_i(s\mid b_i,\theta)\), using the fitted event model and its specified marker association.
Average the interval survival values using the normalized patient-specific weights. Report the conditional survival and, if useful, its complement as interval event risk, with the landmark, horizon, and units stated.
If parameter uncertainty is part of the requested prediction, repeat the conditional calculation across parameter draws and average the resulting predictions using the appropriate draw weights. If parameters are fixed at estimates, report that the result is a plug-in prediction. These are different uncertainty targets; the calculation should make clear which one is being used.
Worked Example: A Six-Month Prediction With Two Integration Nodes
Hypothetical data. A patient is known to be event-free at month 12. The request is for conditional survival through month 18, so \(s=12\) months and \(u=6\) months. A fitted shared-random-effects model has been evaluated at two integration nodes for this patient’s history. After updating for the observed marker data and survival to month 12, the normalized node weights are \(0.506\) and \(0.494\). The fitted model implies constant event hazards over the forecast interval of \(0.04000\) and \(0.06595\) per month at the two nodes, respectively.
For a constant hazard \(h\) over six months, conditional survival over the interval is \(\exp(-hu)\). Thus, at node 1, \(h u=0.04000\times6=0.2400\), so the interval survival is \(\exp(-0.2400)=0.7866\). At node 2, \(h u=0.06595\times6=0.3957\), so the interval survival is \(\exp(-0.3957)=0.6732\).
Average these values with the patient-specific weights:
The predicted conditional survival from month 12 through month 18 is \(0.7306\), or \(73.06\%\). The corresponding six-month event risk, conditional on being event-free at month 12 and on the observed history used for the prediction, is \(1-0.7306=0.2694\), or \(26.94\%\). The hazards have units of inverse months, so their products with six months are dimensionless, as required by the exponential survival formula.
Why the Landmark Update Matters
The following small calculation isolates the survival update. It is not a separate model: it illustrates how survival to the landmark changes the weights before a future interval is forecast. Suppose the marker history alone gives two random-effects values equal weights, \(0.50\) and \(0.50\). Under the fitted model, their probabilities of surviving from study entry through landmark \(s\) are \(0.90\) and \(0.60\). Given that the patient is known to have survived to \(s\), the normalized weights become
If the two corresponding conditional survival probabilities over the future interval are \(0.80\) and \(0.50\), the forecast is \(0.600(0.80)+0.400(0.50)=0.680\), giving interval risk \(0.320\). All future interval probabilities in this calculation are conditional on survival to \(s\); the survival probabilities \(0.90\) and \(0.60\) are used to update the weights, not multiplied into the reported interval survival a second time.
Worked Example: Averaging Across Parameter Draws
Hypothetical data. Suppose three equally weighted posterior parameter draws are available. For each draw, the patient-specific random-effects integration has already produced a conditional six-month survival prediction of \(0.720\), \(0.800\), and \(0.760\). Averaging the conditional predictions gives
The posterior predictive conditional survival is \(0.760\), and the corresponding event risk is \(1-0.760=0.240\). This averages survival predictions, not hazard values. If the draws have unequal posterior weights, use a weighted average, \(\sum_m w_m\pi_i^{(m)}\), where the weights sum to one. The calculation summarizes parameter uncertainty in the prediction; it is not an uncertainty interval.
Checks, Alternatives, and Limitations
Several checks help detect errors before a forecast is reported. The integration weights should be nonnegative and sum to one, and the computed conditional survival should lie between zero and one. For a positive horizon, survival should not increase when the horizon is extended, provided the same conditioning information and model are used. The reported event risk must equal one minus the reported conditional survival. Also verify that the time scale in the baseline hazard, the landmark, and the horizon agree.
A common mistake is to update random-effects weights using the marker history but omit survival to the landmark. That treats the patient as if their event-free status through \(s\) carried no information about their latent trajectory. The correction is to include \(S_i(s\mid b_i,\theta)\) in the posterior weighting, or equivalently to use the numerator-over-denominator survival ratio. A different mistake is to include survival to \(s\) in the updated weights and then multiply the final forecast by survival to \(s\) again. That changes a conditional prediction into a quantity with the wrong conditioning. Once the weights are conditioned on survival to \(s\), average only the interval survival ratios.
The main computational alternatives differ in how they approximate the same integration. A plug-in random-effects prediction evaluates the model at one estimated random-effects value; it is simpler but can understate the impact of uncertainty in the patient’s latent trajectory. Likelihood-based integration, quadrature, and Monte Carlo integration instead average over a distribution of plausible random effects. A plug-in parameter prediction fixes \(\theta\) at its fitted estimate, whereas averaging across parameter draws also reflects parameter uncertainty. Neither computational choice removes the need for a correctly specified joint model or appropriate conditioning.
This algorithm assumes that the fitted model adequately represents the marker and event processes, their dependence through shared random effects, and the relevant covariates. It also requires the future covariate values needed by the event model to be specified or otherwise available under the prediction setup. The calculation does not correct model misspecification, poor extrapolation beyond observed follow-up, or an unsuitable baseline hazard. Sparse histories, measurement error, missing measurements, and uncertain future covariates require additional modeling choices; a forecast should not silently treat those issues as resolved.
Check Your Understanding
Answer each question before reading the brief solutions.
- A prediction is made at \(s=8\) weeks for a horizon of \(u=4\) weeks. What event interval does the reported conditional risk refer to?
- Marker-history weights are \(0.40\) and \(0.60\), and survival-to-landmark probabilities at the corresponding nodes are \(0.80\) and \(0.50\). What are the normalized weights after conditioning on survival?
- Using the weights from Question 2, suppose the future interval survival probabilities are \(0.90\) and \(0.70\). Compute conditional survival and event risk.
- Why is it generally incorrect to average the node-specific hazards first and then exponentiate to obtain the integrated survival?
Solutions. 1. It refers to the four-week interval from week 8 through week 12, conditional on being event-free at week 8 and on the history available then. 2. The unnormalized weights are \(0.40(0.80)=0.32\) and \(0.60(0.50)=0.30\), with sum \(0.62\). The normalized weights are \(0.32/0.62=0.5161\) and \(0.30/0.62=0.4839\). 3. Conditional survival is \(0.5161(0.90)+0.4839(0.70)=0.8032\) (to four significant figures); event risk is \(1-0.8032=0.1968\). 4. Survival is a nonlinear function of the hazard. In general, the weighted average of \(\exp(-h u)\) is not equal to \(\exp(-u\) times the weighted average of \(h)\). The algorithm averages survival probabilities over the updated random-effects distribution.