Tutorials › Joint Modeling of Longitudinal and Time-to-Event Data › Updating Risk After a New Biomarker Measurement

Dynamic Prediction · Tutorial 509 of 697

Updating Risk After a New Biomarker Measurement

Learn to incorporate a new biomarker measurement into a patient’s random-effects posterior and use that updated distribution to calculate conditional survival.

Advanced 11 min read

What You'll Learn

  • Write the posterior random-effects distribution before and after a new biomarker value is observed
  • Explain how event-free survival to the landmark contributes to the pre-measurement posterior
  • Calculate an updated posterior using marker likelihoods and normalized weights
  • Integrate conditional survival over the updated posterior to obtain a patient-specific prediction
  • Assess how measurement error and conflicting marker evidence affect the update
  • Distinguish posterior averaging from plug-in predictions and identify key assumptions

Why a New Measurement Changes a Prediction

A patient’s predicted survival after a landmark time depends on what is known about that patient at the landmark. Baseline covariates and prior biomarker history provide information, but a newly observed biomarker value can provide additional evidence about the patient’s latent trajectory and associated event risk. The update has two linked parts: revise the distribution of the patient’s random effects using the new measurement, then average future survival over that revised distribution.

The measurement does not directly reveal the random effects. It is an imperfect observation generated by a longitudinal model. A value that is more likely under random effects associated with higher event risk will generally increase the predicted event risk, but the size of the change depends on measurement error, the information already available, and the survival model.

Definition: Let \(t_0\) be a landmark time, \(x_i\) the patient’s baseline covariates, \(b_i\) the patient’s latent random-effects vector, and \(\mathcal{H}_i^-\) the patient’s biomarker history available before a new measurement at \(t_0\). The updated random-effects posterior is the conditional distribution of \(b_i\) given \(x_i\), \(\mathcal{H}_i^-\), survival beyond \(t_0\), and the new biomarker value \(y_i^*\). A prediction horizon \(u>0\) concerns survival from \(t_0\) to \(t_0+u\), conditional on the information available at \(t_0\).

The Bayesian Update at the Landmark

Suppose the fitted joint model has parameters \(\theta\). Before observing the new value, the random-effects distribution for a patient who has survived to \(t_0\) is proportional to the prior random-effects density, the likelihood of the prior biomarker history, and the likelihood contribution from event-free follow-up to \(t_0\). For a patient with an observed event time, event-free follow-up contributes the conditional survival likelihood; the displayed form assumes the patient is event-free at the landmark.

$$ q_i^-(b) = p(b_i=b\mid \mathcal{H}_i^-,T_i>t_0,x_i,\theta) \propto p(\mathcal{H}_i^-\mid b,x_i,\theta)\, S_i(t_0\mid b,x_i,\theta)\, p(b\mid\theta). $$

Here \(S_i(t\mid b,x_i,\theta)=P(T_i>t\mid b,x_i,\theta)\). The prior-history likelihood and the survival term are already incorporated into \(q_i^-(b)\); they should not be inserted a second time when the new measurement is added. Let \(g(y_i^*\mid b,x_i,t_0,\theta)\) denote the longitudinal model’s density for the new value, conditional on the random effects and other relevant predictors. Bayes’ rule gives

$$ q_i^+(b) = p(b_i=b\mid \mathcal{H}_i^-,T_i>t_0,x_i,y_i^*,\theta) = \frac{g(y_i^*\mid b,x_i,t_0,\theta)q_i^-(b)} {\displaystyle\int g(y_i^*\mid b',x_i,t_0,\theta)q_i^-(b')\,db'}. $$

The denominator is the normalizing constant: it ensures that \(q_i^+(b)\) integrates to one. In words, each possible random-effects value receives its earlier posterior weight multiplied by how well it predicts the new biomarker value. A Gaussian measurement model is common, but the likelihood factor must match the response model—for example, a probability rather than a density for a discrete observation.

Assumptions for this update: The fitted model correctly specifies the relevant random-effects distribution and biomarker likelihood; the new observation is conditionally independent of earlier biomarker measurements given the random effects and model covariates; and the measurement is available under the model’s assumed observation process. If measurement availability or timing carries additional information about latent risk, that process may also need to be modeled. The formulas below treat \(\theta\) as fixed at its fitted value.

From the Updated Posterior to Conditional Survival

Let \(S_i(t\mid b,x_i,\theta)\) be survival from the model’s time origin through time \(t\), conditional on \(b\) and \(x_i\). For a patient known to be event-free at \(t_0\), the conditional probability of surviving a further \(u\) time units at a fixed value of \(b\) is the survival ratio \(S_i(t_0+u\mid b,x_i,\theta)/S_i(t_0\mid b,x_i,\theta)\). Averaging this ratio over the updated posterior gives the patient-specific prediction:

$$ \widehat{S}_i(u\mid t_0,\mathcal{H}_i^-,y_i^*,x_i,\theta) = \int \frac{S_i(t_0+u\mid b,x_i,\theta)} {S_i(t_0\mid b,x_i,\theta)} q_i^+(b)\,db. $$

This is a conditional survival probability, not survival from the time origin. Equivalently, if the model specifies a hazard \(h_i(t\mid b,x_i,\theta)\), the ratio inside the integral is \(\exp\{-\int_{t_0}^{t_0+u}h_i(s\mid b,x_i,\theta)\,ds\}\). The prediction averages the patient’s possible latent risks rather than pretending that the random effects are known exactly.

Worked Example: Updating Two Latent-Risk Weights

Worked Example: Updating Two Latent-Risk Weights

Hypothetical data. Suppose a patient’s posterior distribution after earlier history and survival to \(t_0\) assigns probability \(0.60\) to a lower-risk random-effects class and \(0.40\) to a higher-risk class. Under a Gaussian marker model with standard deviation \(1.0\), the new marker has mean \(7.0\) in the lower-risk class and mean \(9.0\) in the higher-risk class. The observed value is \(8.2\). Find the updated class probabilities.

For a Gaussian likelihood with the same standard deviation in both classes, the common density constant cancels when the probabilities are normalized. The likelihood factors are therefore proportional to

$$ L_{\mathrm{low}}\propto \exp\left\{-\frac{(8.2-7.0)^2}{2(1.0)^2}\right\} =\exp(-0.72)=0.4868, \qquad L_{\mathrm{high}}\propto \exp\left\{-\frac{(8.2-9.0)^2}{2(1.0)^2}\right\} =\exp(-0.32)=0.7261. $$

Multiply each likelihood factor by its earlier probability. The unnormalized weights are \(0.60(0.4868)=0.2921\) and \(0.40(0.7261)=0.2904\). Their sum is \(0.5825\), so the normalized updated probabilities are

$$ P(\mathrm{low}\mid y_i^*)=\frac{0.2921}{0.5825}=0.5015, \qquad P(\mathrm{high}\mid y_i^*)=\frac{0.2904}{0.5825}=0.4985. $$

The value \(8.2\) is somewhat more likely under the higher-risk class, so its posterior probability rises from \(0.4000\) to \(0.4985\). The update is not decisive: the observation is also plausible under the lower-risk class.

Worked Example: Calculating Updated Survival

Worked Example: Calculating Updated Survival

Hypothetical continuation. Use the updated probabilities from the preceding calculation. Suppose the fitted event model gives conditional survival over the next year of \(0.80\) for the lower-risk class and \(0.45\) for the higher-risk class. Compute the patient’s one-year conditional survival and compare it with the prediction before the new marker was observed.

After observing the marker, average the class-specific survival probabilities using the updated weights:

$$ \widehat{S}_i(1\mid t_0,\mathcal{H}_i^-,y_i^*) = 0.5015(0.80)+0.4985(0.45) =0.4012+0.2243 =0.6255. $$

The predicted one-year event risk is \(1-0.6255=0.3745\), or \(37.45\%\). Before the marker, the corresponding survival prediction was \(0.60(0.80)+0.40(0.45)=0.6600\), giving event risk \(0.3400\), or \(34.00\%\). Thus this marker changes predicted survival by \(-0.0345\), or \(-3.45\) percentage points, and increases predicted event risk by \(3.45\) percentage points. This conclusion follows from the higher posterior weight on the class with lower conditional survival; it is a model-based prediction, not a causal effect of the marker.

Worked Example: How Measurement Error Limits the Update

Worked Example: How Measurement Error Limits the Update

Hypothetical comparison. Keep the earlier class probabilities \(0.60\) and \(0.40\), marker means \(7.0\) and \(9.0\), and observed value \(8.2\), but suppose the marker standard deviation is \(2.0\) rather than \(1.0\). Calculate the updated higher-risk probability and one-year event risk, using conditional survival \(0.80\) and \(0.45\) for the two classes.

The likelihood factors, again omitting the common normal density constant, are

$$ L_{\mathrm{low}}\propto\exp\left\{-\frac{(8.2-7.0)^2}{2(2.0)^2}\right\} =\exp(-0.18)=0.8353, \qquad L_{\mathrm{high}}\propto\exp\left\{-\frac{(8.2-9.0)^2}{2(2.0)^2}\right\} =\exp(-0.08)=0.9231. $$

The unnormalized weights are \(0.60(0.8353)=0.5012\) and \(0.40(0.9231)=0.3692\). The total is \(0.8704\), giving higher-risk posterior probability \(0.3692/0.8704=0.4242\) and lower-risk probability \(0.5758\). The marker shifts the higher-risk probability only from \(0.4000\) to \(0.4242\), less than in the first example, because the larger measurement error makes the observed value less discriminating.

The one-year survival prediction is \(0.5758(0.80)+0.4242(0.45)=0.6515\), so the event risk is \(1-0.6515=0.3485\), or \(34.85\%\). Compared with the pre-measurement risk of \(34.00\%\), this is an increase of \(0.85\) percentage points. A noisier measurement generally has less influence, although the exact change also depends on the prior weights and the class-specific survival probabilities.

Why the Averaging Step Matters

The posterior update and the survival calculation are related but distinct. The marker changes the weights assigned to possible random effects; the event model translates each possibility into a conditional survival probability. In general, averaging those survival probabilities is not the same as substituting a posterior mean random effect into the survival model. Nonlinear survival functions make these operations differ, and a point estimate can hide substantial posterior uncertainty.

The main alternatives have different meanings. A prediction that omits the new marker retains the pre-measurement weights and therefore does not use the new evidence. A plug-in prediction substitutes one estimated random-effects value and ignores uncertainty about \(b_i\). The posterior-integrated prediction uses the new value through its likelihood and averages over the resulting distribution. These distinctions matter most when the marker is noisy, the posterior is diffuse, or survival changes sharply across possible random effects.

1
Start with the appropriate pre-measurement posterior.
Include earlier biomarker history, baseline covariates, and event-free follow-up through the landmark exactly once.
2
Weight by the new observation’s likelihood.
For each possible random-effects value, multiply its earlier posterior density by the marker density or probability under the longitudinal model.
3
Normalize and predict.
Normalize the weights to obtain the updated posterior, then average the conditional survival ratio over that posterior.

Diagnostics, Limitations, and Common Mistakes

In computation, the posterior integral is often approximated by quadrature or Monte Carlo draws. With draws \(b^{(m)}\) from the pre-measurement posterior, calculate marker likelihood weights \(w_m=g(y_i^*\mid b^{(m)},x_i,t_0,\theta)\), normalize them to sum to one, and average the conditional survival ratios using those normalized weights. Inspect whether a small number of draws dominate the weights; that can signal a poorly supported update or unstable numerical approximation. Also check that the updated weights sum to one, that the survival prediction lies between zero and one, and that the likelihood is evaluated on the model’s correct response scale.

The prediction is conditional on the fitted joint model and the assumed measurement process. Model misspecification, an incorrectly handled event-free interval, or unmodeled informative measurement availability can distort the update. Treating fitted parameters as fixed also leaves parameter-estimation uncertainty outside these formulas. The update is not guaranteed to increase risk: the direction depends on which random-effects values the observation favors and how those values relate to conditional survival.

  • Common mistake: reusing the survival-to-landmark term. The pre-measurement posterior already conditions on surviving to \(t_0\). Multiplying by \(S_i(t_0\mid b,x_i,\theta)\) again after updating the marker double-counts that evidence. Use the posterior survival ratio for future survival.
  • Common mistake: plugging in the marker as if it were the true trajectory. The observed value contains measurement error. The likelihood update retains uncertainty about \(b_i\); replacing the latent trajectory with the raw observation does not.
  • Common mistake: assuming a higher marker always means higher risk. That direction is not universal. It depends on the fitted longitudinal and event models and on the updated posterior weights.
Key takeaway: A new biomarker value revises a patient’s random-effects distribution by multiplying the pre-measurement posterior by the value’s model-based likelihood. The updated distribution—not a marker value or a single random-effects estimate—is then used to average conditional survival beyond the landmark.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. If the pre-measurement posterior probabilities for two random-effects classes are \(0.70\) and \(0.30\), and the new marker likelihoods are \(0.20\) and \(0.60\), what are the updated probabilities?
  2. Using updated probabilities \(0.40\) and \(0.60\), and class-specific one-year survival probabilities \(0.90\) and \(0.50\), calculate one-year conditional survival and event risk.
  3. Why should a noisier marker generally exert less influence on the random-effects posterior?
  4. What survival quantity should be averaged over the updated posterior for prediction from \(t_0\), rather than survival from the model’s time origin?

Solutions. For question 1, the unnormalized weights are \(0.70(0.20)=0.14\) and \(0.30(0.60)=0.18\), with total \(0.32\). The updated probabilities are \(0.14/0.32=0.4375\) and \(0.18/0.32=0.5625\). For question 2, survival is \(0.40(0.90)+0.60(0.50)=0.66\), so event risk is \(1-0.66=0.34\), or \(34\%\). For question 3, higher measurement error makes the observed value’s likelihoods more similar across possible random effects, so likelihood weighting changes the earlier probabilities less. For question 4, average \(S_i(t_0+u\mid b,x_i,\theta)/S_i(t_0\mid b,x_i,\theta)\), the survival probability over the future horizon conditional on being event-free at \(t_0\).

Clinical Biostats