Tutorials › Joint Modeling of Longitudinal and Time-to-Event Data › Worked Current-Value Risk Update

Dynamic Prediction · Tutorial 544 of 697

Worked Current-Value Risk Update

Learn to update a conditional event-risk prediction when a new biomarker reading arrives and the hazard depends on the patient’s current latent marker value.

Advanced 12 min read

What You'll Learn

  • Define conditional event risk after a landmark time using a current-value hazard.
  • Distinguish the observed biomarker reading from the latent marker value.
  • Update latent-state weights with a new reading while retaining survival conditioning.
  • Calculate and average Weibull-based risks across latent marker states.
  • Integrate risk over possible future marker paths when those paths vary during the horizon.
  • Identify common numerical and modeling failures in patient-specific updates.

Why a New Reading Changes a Risk Prediction

A prediction made at a landmark time \(s\) uses the patient’s biomarker history and the fact that the patient remained event-free through \(s\). When another biomarker value arrives, it provides new information about the patient’s latent marker trajectory. A current-value joint model connects that trajectory to the event hazard: at each time, the hazard depends on the marker’s latent value at that time, not simply on the most recently observed measurement.

The update therefore has two distinct parts. First, revise the distribution of the latent marker trajectory using the new, potentially noisy observation. Second, compute future risk conditional on each possible trajectory and average those risks using the revised distribution. Plugging the observed reading directly into the hazard skips the first part’s uncertainty and can misstate risk.

Definition: Let \(T_i\) be the event time for patient \(i\), \(s\) a prediction landmark, and \(\Delta\) a future horizon. The conditional event risk is \(P(s<T_i\leq s+\Delta\mid T_i>s,\mathcal H_i(s))\), where \(\mathcal H_i(s)\) denotes the biomarker and covariate information available by \(s\). A current-value hazard model specifies, conditional on latent effects \(b_i\), \(h_i(t\mid b_i)=h_0(t)\exp\{\gamma^\top w_i(t)+\alpha m_i(t;b_i)\}\). Here \(h_0(t)\) is the baseline hazard, \(w_i(t)\) contains covariates, \(m_i(t;b_i)\) is the latent marker value, and \(\alpha\) is its association parameter.

The reading \(Y_i(s)\) is not generally equal to \(m_i(s;b_i)\). For example, a measurement model may be \(Y_i(s)=m_i(s;b_i)+\epsilon_i(s)\), with mean-zero measurement error having variance \(\sigma^2\). The posterior distribution of \(b_i\), and hence of the latent marker, accounts for that error. It should also account for survival to the landmark: a patient who is still event-free at \(s\) contributes information about \(b_i\) through the event model.

The Update in Two Steps

Suppose the prediction made just before a new measurement is based on the distribution of latent effects conditional on the old history and survival to \(s\). Once the new measurement \(y_i(s)\) arrives, Bayes’ rule reweights that distribution by the measurement likelihood. In density notation,

$$ p(b_i\mid T_i>s,\mathcal H_i(s),Y_i(s)=y_i(s)) \propto p(y_i(s)\mid b_i)\, p(b_i\mid T_i>s,\mathcal H_i(s)). $$

The proportionality constant is chosen so the updated density integrates to one. If the new reading is already included in \(\mathcal H_i(s)\), it must not be multiplied into the likelihood a second time. The event-free condition must also remain in the conditioning set; dropping it would change the prediction target.

For a fixed latent trajectory and covariate path, define the cumulative hazard over the prediction interval by \(A_i(s,s+\Delta;b_i)=\int_s^{s+\Delta}h_i(u\mid b_i)\,du\). Conditional survival over the interval is \(\exp\{-A_i(s,s+\Delta;b_i)\}\), so conditional event risk is one minus that quantity. Averaging over the updated latent-effects distribution gives the patient-specific prediction:

$$ P(s<T_i\leq s+\Delta\mid T_i>s,\mathcal H_i(s),Y_i(s)=y_i(s)) = \int \left[1-\exp\{-A_i(s,s+\Delta;b_i)\}\right] p(b_i\mid T_i>s,\mathcal H_i(s),y_i(s))\,db_i. $$

If the marker can change in the future in ways not fixed by \(b_i\), the risk inside the integral must also be averaged over possible future marker paths, conditional on the observed history and latent effects. The prediction is then an expectation of the path-specific risk, not the risk calculated from an average marker path. This distinction is important because the exponential hazard is nonlinear.

Justification: Conditional on a latent trajectory, the probability of no event from \(s\) through \(s+\Delta\) is \(\exp\{-\int_s^{s+\Delta}h_i(u)\,du\}\). Thus the conditional event probability is one minus this survival probability. The law of total probability then averages that event probability over the posterior distribution of latent effects, given the history, new reading, and survival to \(s\). This is why the prediction averages risks, rather than substituting a posterior mean marker into the hazard.

Worked Updates With Latent Marker Values

Worked Example: Updating a Weibull Risk Across Two Latent States

Hypothetical data. A patient is event-free at year 2. The model has Weibull baseline hazard \(h_0(t)=\lambda\rho t^{\rho-1}\), with \(\lambda=0.01\) and \(\rho=1.5\), no additional covariates, and association parameter \(\alpha=0.8\). Over years 2 to 3, consider two possible constant latent marker values, \(m=0.5\) and \(m=1.5\). After the earlier history and survival through year 2 have been accounted for, suppose the new reading updates their probabilities to 0.4026 and 0.5974, respectively.

For a constant marker value \(m\), the cumulative hazard from year 2 to year 3 is \(0.01(3^{1.5}-2^{1.5})\exp(0.8m)\). The baseline increment is \(0.01(5.196152-2.828427)=0.02367725\).

For \(m=0.5\), the cumulative hazard increment is \(0.02367725\exp(0.4)\approx0.03532\), giving risk \(1-\exp(-0.03532)\approx0.03471\), or 3.471%. For \(m=1.5\), the increment is \(0.02367725\exp(1.2)\approx0.07861\), giving risk \(1-\exp(-0.07861)\approx0.07560\), or 7.560%.

The updated patient-specific risk is the posterior-weighted average: \(0.4026(0.03471)+0.5974(0.07560)\approx0.05914\). The predicted event risk from year 2 through year 3 is therefore about 5.914%, conditional on being event-free at year 2 and on the information used to obtain these weights.

Worked Example: Reweighting States With a Noisy New Reading

Hypothetical data. At the landmark, before the new reading, the survival-conditioned probabilities of latent marker states \(m=0.5\) and \(m=1.5\) are 0.60 and 0.40. The new biomarker value is \(y=1.2\), and the measurement model is normal with mean \(m\) and standard deviation 0.5. Assume the two state values remain constant over years 2 to 3 and use the Weibull model and risks calculated in the preceding example.

Ignoring a common normal-density constant, the likelihood for \(m=0.5\) is \(\exp\{-(1.2-0.5)^2/(2(0.5)^2)\}=\exp(-0.98)\approx0.3753\). For \(m=1.5\), it is \(\exp\{-(1.2-1.5)^2/(2(0.5)^2)\}=\exp(-0.18)\approx0.8353\). Multiply each likelihood by its prior state probability: \(0.60(0.3753)=0.2252\) and \(0.40(0.8353)=0.3341\). Their sum is 0.5593, so the normalized updated weights are approximately \(0.2252/0.5593=0.4026\) and \(0.3341/0.5593=0.5974\).

Before the new reading, the predicted risk is \(0.60(0.03471)+0.40(0.07560)\approx0.05106\), or 5.106%. After the reading, it is \(0.4026(0.03471)+0.5974(0.07560)\approx0.05914\), or 5.914%. The increase reflects evidence favoring the higher latent state in this hypothetical example. It is an update in prediction, not evidence that the biomarker causes the event.

When the Marker Changes During the Prediction Horizon

A current-value hazard can respond to the marker throughout the future interval. If the marker trajectory is uncertain and varies over time, calculating risk from its value at the landmark alone can be inadequate. The following example integrates the hazard along each of two possible paths, then averages their risks.

Worked Example: Averaging Risk Over Two Future Marker Paths

Hypothetical data. From the landmark to one year later, let \(u\) denote time in years after the landmark. The baseline hazard is constant at \(0.03\) per year, \(\alpha=0.7\), and there are no other covariates. Given the updated biomarker history, suppose two future paths have posterior probabilities 0.2402 and 0.7598: \(m_L(u)=0.4+0.2u\) and \(m_H(u)=1.2+0.2u\), for \(0\leq u\leq1\). The marker is in its stated marker units.

For the lower path, the cumulative hazard is \(0.03\int_0^1\exp\{0.7(0.4+0.2u)\}\,du\). Integrating the exponential gives \(0.03\exp(0.28)[\exp(0.14)-1]/0.14\approx0.04261\). Its one-year conditional risk is \(1-\exp(-0.04261)\approx0.04171\), or 4.171%.

For the higher path, the cumulative hazard is \(0.03\exp(0.84)[\exp(0.14)-1]/0.14\approx0.07459\). Its risk is \(1-\exp(-0.07459)\approx0.07188\), or 7.188%. Averaging the path-specific risks gives \(0.2402(0.04171)+0.7598(0.07188)\approx0.06463\). Thus the updated one-year conditional event risk is about 6.463%, conditional on survival to the landmark.

The marker value rises along both paths, so evaluating only the landmark value would miss the later hazard contributions. In a fitted joint model, the posterior path weights and paths would be obtained from the longitudinal and event model rather than assigned in advance as they are here.

Computation, Diagnostics, and Alternatives

In realistic models, the updated posterior and the integral over latent effects are rarely available in closed form. Monte Carlo integration can approximate the prediction: draw latent effects from the posterior conditional on the old history and landmark survival, reweight or sample those draws using the new measurement likelihood, calculate each draw’s interval risk, and average. If future marker paths are uncertain, simulate or integrate those paths as well. Numerical integration is another option when the latent dimension is small. The same posterior draws must be used consistently in the measurement update and risk calculation.

Several checks help identify a faulty update. Verify that the updated posterior weights sum to one and that the new observation has been included exactly once. Confirm that the risk is between zero and one, and that increasing \(\alpha m_i(t)\) increases the hazard when \(\alpha\) is positive. Check that numerical integration is stable as the number of draws or integration points increases. Also inspect whether a small number of draws dominate the posterior weights, which can indicate poor Monte Carlo overlap or a highly informative reading. Sensitivity to the measurement-error variance and association parameter is especially relevant when the new reading is extreme.

A landmark prediction that carries the last observed biomarker value forward is simpler, but it treats that value as the future latent marker and ignores measurement error and trajectory uncertainty. A plug-in approach that uses the posterior mean marker is also simpler, but in general it does not equal the posterior average risk because exponentiation and averaging do not commute. A full current-value update retains the model’s latent-marker uncertainty, at the cost of relying on the measurement, longitudinal, and event-model assumptions. It cannot correct misspecification merely by performing the integration accurately.

The calculation assumes a correctly specified association structure, baseline hazard, longitudinal measurement model, and relevant covariate histories. It also assumes that the new measurement is available at the stated landmark and that the patient is event-free then. If the measurement process is informative beyond the modeled history, or the marker dynamics are poorly described, the updated risk can be biased. As in the earlier material on measurement error versus latent biomarker values, an observed value should not be treated as the latent state without justification.

Common pitfall: “The new reading is 1.2, so I will put 1.2 directly into the hazard and calculate one risk.” This treats the measured value as error-free and discards uncertainty about the latent trajectory. The correction is to update the latent-state or random-effects distribution using the measurement likelihood, retain conditioning on survival to the landmark, and average the resulting risks over that updated distribution.

Check Your Understanding

Use the definitions and worked calculations above. The solutions are included below so each update can be checked directly.

  1. Why does the updated posterior distribution condition on survival to the landmark as well as on the new biomarker value?
  2. In the two-state Weibull example, what risk results if the updated weights were 0.25 for the lower state and 0.75 for the higher state?
  3. What is the likelihood ratio favoring \(m=1.5\) over \(m=0.5\) for the reading \(y=1.2\) with measurement standard deviation 0.5?
  4. Why should risk generally be averaged over future marker paths rather than calculated from the average path?
  5. Name two checks that could reveal a computational problem in a Monte Carlo update.

Solutions. (1) Survival is information about latent effects because the event hazard depends on the latent marker; omitting it changes the posterior and prediction target. (2) The risk is \(0.25(0.03471)+0.75(0.07560)=0.06538\), approximately 6.538%. (3) The likelihood ratio is \(0.8353/0.3753\approx2.226\), so the observed reading is about 2.226 times as likely under the higher state. (4) The hazard includes an exponential of the marker, so nonlinear transformation means the risk at an average path generally differs from the average risk across paths. (5) For example, check that posterior weights sum to one and that the risk is between zero and one; also check stability as the number of draws increases and inspect for domination by a few weighted draws.

Clinical Biostats