Why Future Covariates Matter
A dynamic prediction is made at a landmark time for a person who has survived event-free to that time. The predicted risk over the next several months or years can depend not only on the person’s history so far, but also on how covariates change during the prediction horizon. A planned treatment change, a scheduled dose, or a specified exposure trajectory can therefore produce a different risk prediction from holding the current covariate value fixed.
The key is to state which future covariate path the prediction conditions on. If the path is known by design or specified as a scenario, the result is a conditional prediction under that path. It is not automatically the patient’s unconditional future risk: that would also require accounting for uncertainty about what path will actually occur.
The path may be known, for example because a dosing schedule is fixed over the horizon, or hypothetical, for example a comparison of “continue the current regimen” with “increase the dose after one month.” In the second case, the resulting values are scenario-specific predictions. They should not be described as the probability of what will happen under an intervention unless the model and study design justify a causal interpretation.
Conditional Risk Under a Specified Path
For clarity, consider a joint model whose event hazard, conditional on random effects \(b_i\), model parameters \(\theta\), and a covariate path, is
Here \(\lambda_0(u)\) is the baseline hazard, \(z_i\) contains time-constant covariates, and \(m_i(u)\) is a latent longitudinal marker when the event model includes one. The vector \(x_i^*(u)\) represents other time-varying covariates whose future values are being specified. The model’s coefficients and units must be interpreted on the hazard scale: for example, a one-unit increase in a covariate with coefficient \(\eta_j\) multiplies the hazard by \(\exp(\eta_j)\), holding the other predictors fixed.
For fixed \(b_i\), \(\theta\), and path, the cumulative hazard over the horizon is
The conditional survival probability over that horizon is \(\exp\{-A_i(s,w\mid b_i,\theta,x_i^*)\}\), so the conditional event risk is one minus this quantity. In a joint model, the random effects and possibly the parameters are uncertain even after the observed history is used. The prediction averages survival over their distribution given that history and survival to the landmark:
If model parameters are treated as fixed estimates, the integral is over \(b_i\) alone. The distribution in the integral must reflect the information available at prediction time, including that the person has remained event-free through \(s\). This is the same conditional survival target used in dynamic prediction; specifying \(x_i^*\) determines the future covariate values inserted into the hazard after \(s\).
Why the Path Must Be Applied Inside the Hazard
A specified path affects the hazard at each future time, and those hazards accumulate through the integral. The calculation is therefore not generally equivalent to substituting an average covariate value into the hazard. Nor, with random effects, is it generally correct to calculate risk using an average cumulative hazard. The exponential survival transformation and the averaging over random effects must be handled in the order shown in the formula.
For a fixed random effect and parameter value, the basic calculation follows directly from the survival-hazard relationship. Write \(S(u\mid b_i,\theta)\) for survival beyond time \(u\), conditional on survival to \(s\) and the specified path. Then
Integrating from \(s\) to \(s+w\), with \(S(s\mid b_i,\theta)=1\) for this conditional survival calculation, gives
Taking one minus survival gives the event risk for fixed \(b_i,\theta\). Averaging that survival probability over \(p(b_i,\theta\mid D_i(s),T_i>s)\) then gives the dynamic risk formula. This derivation also shows why the path needs to be defined over the whole prediction horizon, not only at the landmark.
Worked Example: A Covariate That Changes Once
Suppose a hypothetical model has a constant baseline hazard of \(0.03\) events per year and a binary covariate \(x(u)\) with hazard ratio \(2\), so that \(\lambda(u)=0.03\exp\{(\log 2)x(u)\}\). Consider a five-year horizon from the landmark. Under a specified path, \(x(u)=0\) for the first two years and \(x(u)=1\) for the remaining three. For this calculation, treat the model coefficients and individual effect as fixed, and suppose there are no other predictors.
The hazard is \(0.03\) per year during the first two years and \(0.03(2)=0.06\) per year during the next three. Thus
The five-year event risk under this path is
The predicted risk is about \(21.34\%\) over five years under the specified path. If instead \(x(u)=0\) throughout, then \(A=0.03(5)=0.15\) and \(R=1-\exp(-0.15)\approx0.1393\), or \(13.93\%\). These are conditional model predictions under two different paths, not evidence that changing the covariate would causally change an individual’s risk by that difference.
Continuously Varying Covariates
When a covariate changes smoothly, the cumulative hazard is an integral rather than a sum over constant segments. If the integral has no convenient closed form, numerical integration can be used. The path must be evaluated at the same time scale as the baseline hazard and the coefficients; a covariate recorded in months cannot be inserted as if it were recorded in years without converting units.
Worked Example: A Linearly Increasing Predictor
Consider a hypothetical landmark prediction over the next four years. Suppose the hazard under a specified path is \(\lambda(t)=0.02\exp(0.08+0.04t)\) per year, where \(t\) is years since the landmark. Treat the coefficients and individual effect as fixed. The linear predictor increases from \(0.08\) at the landmark to \(0.24\) at year four.
The cumulative hazard is
Therefore,
The predicted four-year event risk under this path is approximately \(8.97\%\). The calculation uses the hazard at every time over the horizon; using only the hazard at year zero or year four would not give the same cumulative hazard.
Accounting for Individual-Level Uncertainty
A path-specific hazard does not remove uncertainty about the individual. The observed history generally leaves a distribution of plausible random effects, and each value of \(b_i\) can imply a different hazard trajectory under the same covariate path. For a fixed path, calculate the horizon survival for each plausible random-effect value and average those survival probabilities using their distribution conditional on the observed history and survival to the landmark.
Worked Example: Averaging Risk Across Two Posterior States
Suppose a hypothetical patient has two equally weighted random-effect states after conditioning on the observed history and survival to the landmark. Under a constant path \(x=0\), these states imply constant hazards of \(0.02\) and \(0.06\) per year. The covariate has hazard ratio \(2\), so under the alternative fixed path \(x=1\), the corresponding hazards are \(0.04\) and \(0.12\) per year. Compare three-year risks under the two paths.
For \(x=0\), the conditional risks in the two states are \(1-\exp\{-0.02(3)\}\) and \(1-\exp\{-0.06(3)\}\). Averaging them gives
For \(x=1\), the conditional risks are \(1-\exp\{-0.04(3)\}\) and \(1-\exp\{-0.12(3)\}\), so
The three-year predictions are about \(11.15\%\) under \(x=0\) and \(20.77\%\) under \(x=1\). The weights represent uncertainty about the patient’s random effect, not uncertainty about which covariate path was used: each prediction conditions on one fixed path.
Choosing and Checking a Future Path
Before calculating risk, identify the source and meaning of every future covariate value. A fixed schedule or externally specified plan may support a known path. A path chosen to compare plausible future courses supports a scenario analysis. For an internal marker, future values are usually not known merely because its history has been observed. This tutorial treats such future values as specified when calculating a path-conditional prediction; prediction that averages over uncertain future marker paths is a distinct calculation.
Name the landmark \(s\), horizon \(w\), event, and conditioning on survival and observed history.
Give the covariate values and their time intervals or continuous-time formula for \(s<u\leq s+w\), including units.
Insert the path into the fitted hazard and integrate across the full horizon, using numerical integration if needed.
Transform each cumulative hazard to survival, then average survival over the individual-level uncertainty distribution before taking one minus the result.
Useful diagnostics include plotting the specified covariate path and resulting hazard over time; checking for implausible jumps, unit mismatches, or covariate values outside the model’s observed range; and confirming that the path covers the entire horizon. If the hazard changes sharply at a stated transition, verify that the integration interval is split at that time or that the numerical integration grid captures it. Also check that the posterior random-effect distribution is conditioned on survival to the landmark rather than taken from a population distribution without that update.
A known future path, a scenario path, and a prediction averaged over possible future paths answer different questions. Carrying the last observed value forward is one possible assumption about the path, not a neutral default. Likewise, substituting the mean of several possible future covariate values generally does not reproduce the risk averaged over those paths, because the hazard and survival transformations are nonlinear.
Common Mistakes and Limits
| Incorrect reasoning | Correction |
|---|---|
| “The current covariate value is the future value.” | That is a carry-forward assumption. State it explicitly and assess whether it is plausible over the prediction horizon. |
| “A risk under a scenario is the patient’s unconditional future risk.” | It is conditional on that scenario. An unconditional prediction must also account for uncertainty about future paths. |
| “Average the covariate values first, then calculate risk.” | In general, calculate survival under each path and average the survival probabilities with appropriate path weights. |
| “The scenario comparison shows the causal effect of changing the covariate.” | Different model-based predictions alone do not establish a causal effect. Causal interpretation requires appropriate assumptions and design. |
Path-conditional predictions are only as credible as the fitted hazard model and the chosen path. Extrapolating a covariate far beyond observed values can produce unstable predictions, and a covariate process related to unobserved prognosis can make a simple conditional scenario misleading. The calculation also does not represent uncertainty about the path unless that uncertainty is explicitly included. These limitations should be stated when predictions are reported.
Check Your Understanding
Answer each question, then compare with the solutions.
- A constant hazard is \(0.04\) per year for a two-year horizon under a specified path. What is the cumulative hazard and risk?
- Why is a prediction under a planned covariate scenario not necessarily an unconditional prediction for the patient?
- Two equally weighted random-effect states imply three-year hazards of \(0.01\) and \(0.05\) per year under one path. Write the formula for the averaged risk under that path.
- What assumption is made when the most recently observed covariate value is held constant over the prediction horizon?
- Give two checks that can reveal a problem with a specified future path.
Solutions. (1) The cumulative hazard is \(A=0.04(2)=0.08\). The risk is \(1-\exp(-0.08)\approx0.0769\), or \(7.69\%\) over two years. (2) It conditions on the planned path occurring; an unconditional prediction must also account for uncertainty about which path will occur. (3) The averaged risk is \(\{[1-\exp\{-0.01(3)\}]+[1-\exp\{-0.05(3)\}]\}/2\). (4) It assumes a carry-forward, constant future covariate path. (5) For example, check units and whether the path is defined over the full horizon; also inspect for implausible jumps or values outside the model’s observed range.