Tutorials › Joint Modeling of Longitudinal and Time-to-Event Data › Measurement Error Versus Latent Biomarker Values

Dynamic Prediction · Tutorial 534 of 697

Measurement Error Versus Latent Biomarker Values

See how a joint model separates noisy biomarker readings from the latent trajectory used in the hazard, and how that distinction changes individualized risk predictions.

Advanced 12 min read

What You'll Learn

  • Distinguish an observed biomarker measurement from the latent biomarker process.
  • State the measurement and hazard components of a joint model and their key assumptions.
  • Express landmark risk as an average over latent effects given the marker history and survival to the landmark.
  • Calculate how substituting a noisy reading can change a hazard and a predicted risk.
  • Diagnose when measurement error or an inadequate longitudinal model may undermine predictions.
  • Compare latent-process prediction with using a raw reading, a smoothed estimate, or a posterior average.

Why a Recorded Biomarker Is Not the Hazard Predictor

A biomarker recorded at a clinic visit is not generally the patient's underlying biomarker value at that time. It is a measurement of that value, subject to assay variation, biological fluctuation, and other sources of error. In a joint model, the longitudinal component represents the underlying trajectory, while the event component links the hazard to that latent trajectory. Confusing a single noisy reading with the latent value can therefore change the hazard and the predicted risk.

The distinction matters in dynamic prediction. At a landmark time \(s\), the information includes the patient's observed biomarker history up to \(s\) and the fact that the patient has remained event-free through \(s\). That history informs the latent trajectory; it is not itself the trajectory. The prediction should reflect uncertainty about the latent process rather than silently treating the most recent measurement as exact.

Definition: Let \(Y_{ij}\) denote the biomarker observed for patient \(i\) at time \(t_{ij}\), and let \(m_i(t)\) denote that patient's latent, or underlying, biomarker value at time \(t\). A measurement model relates the recorded \(Y_{ij}\) to \(m_i(t_{ij})\), commonly as \(Y_{ij}=m_i(t_{ij})+\epsilon_{ij}\), where \(\epsilon_{ij}\) is measurement error. The hazard model uses \(m_i(t)\), not \(Y_{ij}\), as the biomarker value.

Joint-Model Setup and Prediction Target

A standard specification has a longitudinal submodel and a time-to-event submodel. For example, a mixed model can represent the latent marker as \(m_i(t)=x_i(t)^\top\beta+z_i(t)^\top b_i\), where \(x_i(t)\) and \(z_i(t)\) are covariate vectors, \(\beta\) is a vector of fixed effects, and \(b_i\) is a vector of patient-specific random effects. A simple measurement model is \(Y_{ij}=m_i(t_{ij})+\epsilon_{ij}\), with independent errors \(\epsilon_{ij}\sim N(0,\sigma^2)\), conditional on the latent process and model parameters.

For illustration, a current-value hazard model links the hazard at time \(t\) to the latent marker value at that time:

$$ h_i(t\mid b_i)=h_0(t)\exp\{\gamma^\top w_i+\alpha m_i(t)\}. $$

Here \(h_0(t)\) is the baseline hazard, \(w_i\) denotes event-model covariates, and \(\alpha\) describes the association between the latent marker and the log hazard. If \(\alpha>0\), a higher latent marker is associated with a higher hazard, conditional on the other model terms. This is an association specified by the model, not evidence that changing the marker would cause a change in risk.

The key assumptions for this formulation are that the longitudinal and event models are adequately specified; the measurement errors follow the stated measurement model; and, conditional on the latent process and included covariates, the event process does not depend on the measurement errors themselves. The random-effects distribution and any censoring assumptions must also be appropriate. These assumptions make the marker history informative about the latent process through the longitudinal model, while the event-free status up to \(s\) also informs the random effects.

With parameters held fixed at \(\theta\), define \(Y_i(s)\) as the biomarker history observed by \(s\). The landmark risk over a horizon \(u\) is

$$ R_i(s,u)=P(s<T_i\leq s+u\mid T_i>s,Y_i(s),w_i;\theta) =1-\int \exp\left\{-\int_s^{s+u}h_i(v\mid b_i,\theta)\,dv\right\} p(b_i\mid T_i>s,Y_i(s),w_i;\theta)\,db_i. $$

This expression averages conditional survival over the distribution of patient-specific effects given both the observed history and survival to the landmark. The latent trajectory at each time in the hazard is calculated from those effects and the longitudinal model. Replacing it with an observed reading changes the model being used. The integral also shows why simply evaluating the hazard at an average latent value is not generally the same as averaging the predicted risks.

Why Measurement Error Changes the Calculation

Even at a single time, the hazard link is nonlinear. If the latent value \(M\), conditional on the observed history, has mean \(\mu\) and variance \(\tau^2\), and the hazard is proportional to \(\exp(\alpha M)\), then for a normally distributed \(M\),

$$ E\{\exp(\alpha M)\}=\exp\left(\alpha\mu+\frac{\alpha^2\tau^2}{2}\right). $$

Thus the hazard evaluated at the posterior mean, proportional to \(\exp(\alpha\mu)\), is not generally the posterior mean hazard. In an actual risk calculation, survival involves an exponential of an integrated hazard, so averaging hazards alone is not enough either: the conditional survival is computed for each latent effect and then averaged. The direction and size of the difference depend on the link, uncertainty, time horizon, and posterior distribution.

A short derivation explains the variance term. Write \(M=\mu+\tau Z\), where \(Z\sim N(0,1)\). Then

$$ E\{\exp(\alpha M)\} =\exp(\alpha\mu)E\{\exp(\alpha\tau Z)\} =\exp(\alpha\mu)\exp\left(\frac{\alpha^2\tau^2}{2}\right). $$

The final equality is the moment-generating function of a standard normal variable. It demonstrates that latent uncertainty can affect the mean hazard even when the posterior mean marker is unchanged. It does not provide a shortcut for the full risk integral, which must account for survival over the horizon.

Worked Example: Averaging Risk Over Latent Values

Suppose the hazard is constant over the next 10 days and, conditional on a latent marker value \(m\), equals \(0.020\exp(0.10m)\) per day. At a landmark, suppose the posterior distribution of the marker has two equally weighted possible values, \(m=4\) and \(m=7\). Assume the patient is event-free at the landmark and hold all other quantities fixed. Calculate the posterior-averaged 10-day risk and compare it with using the posterior mean marker as though it were known exactly.

For a constant hazard \(h\), the 10-day risk is \(1-\exp(-10h)\). At \(m=4\), calculate the risk from the unrounded hazard:

$$ 1-\exp\{-10(0.020)\exp(0.4)\}=0.2579695\approx 0.2580. $$

At \(m=7\), the corresponding calculation is

$$ 1-\exp\{-10(0.020)\exp(0.7)\}=0.3315212\approx 0.3315. $$

Average these two conditional risks using their posterior weights:

$$ 0.5(0.2579695)+0.5(0.3315212)=0.29474535\approx 0.2947. $$

The posterior mean marker is \(0.5(4)+0.5(7)=5.5\). Treating that mean as known gives

$$ 1-\exp\{-10(0.020)\exp(0.55)\}\approx 0.2929. $$

In this example, that plug-in risk is lower than the posterior-averaged risk. The two approaches answer different calculations: one averages risks across latent values, while the other computes risk at a single average value. Neither calculation uses a noisy observed value as if it were the latent marker.

Worked Comparisons With Noisy Measurements

Worked Example: A High Reading Does Not Determine the Latent Value

Suppose the most recent observed marker is \(Y_i(s)=8\). Based on the full longitudinal history and the event-free status at \(s\), assume the fitted model gives posterior probabilities \(0.25\), \(0.50\), and \(0.25\) for latent current values \(m_i(s)=5,6,7\), respectively. For a two-day prediction, let the conditional hazard be constant at \(0.030\exp(0.20m)\) per day. Compare the prediction that averages over these latent values with the naive calculation that substitutes the observed value 8.

For the latent values, the conditional risks are calculated from \(1-\exp\{-2(0.030)\exp(0.20m)\}\):

  • At \(m=5\): \(1-\exp(-0.06e^1)\approx 0.1505\).
  • At \(m=6\): \(1-\exp(-0.06e^{1.2})\approx 0.1806\).
  • At \(m=7\): \(1-\exp(-0.06e^{1.4})\approx 0.2160\).

Weight the risks by the given posterior probabilities:

$$ 0.25(0.1505)+0.50(0.1806)+0.25(0.2160)\approx 0.1819. $$

By contrast, substituting the observed reading \(8\) gives \(1-\exp\{-0.06e^{1.6}\}\approx 0.2571\). Under the assumed posterior distribution and hazard model, the latent-process calculation gives a two-day risk of about 0.1819, whereas the raw-reading substitution gives about 0.2571. The difference is not a universal correction factor; it results from the particular history, posterior distribution, and model in this example.

Worked Example: A Noisy Last Value Can Inflate the Hazard

Suppose a fitted longitudinal model estimates the latent marker at a landmark as \(m_i(s)=6.6\), while the last observed reading is \(Y_i(s)=8.1\). For illustration, take \(h_i(t)=0.015\exp\{0.12m_i(t)\}\) per day and assume the marker is held constant over the next 30 days. This fixed-value calculation isolates the effect of substituting the reading; it is not a substitute for integrating over uncertainty in the latent trajectory.

Using the latent estimate gives a 30-day risk of

$$ 1-\exp\{-30(0.015)\exp(0.12\times6.6)\} =1-\exp\{-0.45e^{0.792}\}\approx 0.6297. $$

Using the noisy reading as if it were the latent value instead gives

$$ 1-\exp\{-30(0.015)\exp(0.12\times8.1)\} =1-\exp\{-0.45e^{0.972}\}\approx 0.6957. $$

The ratio of the two instantaneous hazards is \(\exp\{0.12(8.1-6.6)\}=\exp(0.18)\approx 1.197\): the raw-reading substitution raises the hazard by about 19.7% in this calculation. Because risk is a nonlinear function of the hazard and horizon, the risk does not rise by exactly 19.7%.

Practical Checks, Alternatives, and Limitations

A latent-process prediction is only as credible as the measurement and hazard models that produce it. Useful checks include inspecting whether the longitudinal model captures the observed time pattern and between-patient variation, and whether the residual spread is compatible with the assumed measurement-error model. Repeated readings close in time can help reveal short-term variation that a smooth latent trajectory does not capture. For prediction, also examine whether a single unusual reading dominates the posterior latent trajectory or risk; a large change after one reading may indicate influential measurement error, a poorly fitting longitudinal model, or a genuine abrupt change that the model cannot represent.

It is informative to compare predictions under the fitted model with a sensitivity calculation that varies plausible measurement-error or trajectory assumptions. Such comparisons do not establish which model is correct, but they show whether the reported prediction depends strongly on those choices. A very sparse history may leave substantial uncertainty about the latent process even when a model returns a point estimate; that uncertainty should not be hidden by treating an estimated trajectory as known.

ApproachWhat it usesMain concern
Substitute the latest observed valueThe raw reading as the marker in the hazardTransfers measurement noise directly to the hazard and ignores uncertainty about the latent value
Use a fitted latent trajectory at a point estimateA smoothed or fitted marker valueSeparates measurement error from the trajectory, but may understate risk uncertainty if treated as exact
Average conditional predictions over latent effectsThe posterior distribution given marker history and survival to the landmarkRequires a suitable joint model and adequate integration; reflects latent-effect uncertainty under that model

The third approach is the natural individual-prediction calculation under the joint model: for each plausible latent effect, compute conditional survival using the corresponding latent trajectory, then average over its distribution given the available history and survival to the landmark. This is different from averaging the marker first and calculating one risk, as the first worked example showed. If parameters are treated as fixed, this procedure represents uncertainty about patient-specific effects, not all sources of uncertainty in the prediction.

The model also has limitations. A current-value link is one possible association structure, not a universal biological law. Measurement error may be non-Gaussian, correlated over time, or dependent on observed conditions; an overly simple error model can distort the inferred latent process. The latent trajectory is model-defined and cannot be observed directly, so good fit to the recorded measurements alone does not guarantee a correct hazard relationship. Finally, the conditional-independence assumption is substantive: if measurement errors or unmodeled processes carry event-related information after conditioning on the latent process and covariates, the stated joint model may be inadequate.

Common Mistake

Common mistake: “The latest biomarker is the best current information, so I can insert it directly into the hazard and treat the result as the patient's risk.” The correction is that a reading is an error-prone observation, whereas the hazard model is specified in terms of the latent marker process. Use the history and survival to the landmark to infer the latent process, then calculate and average conditional predictions over that uncertainty. A raw reading can be substituted only under an explicit assumption that it equals the latent value, an assumption that is usually not justified by the measurement model.
Key takeaway: The observed marker history informs the latent trajectory; it does not replace it. In joint-model prediction, the hazard is evaluated along the latent process, and individual risk averages over plausible latent effects conditional on the history and survival to the landmark.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions.

  1. In the measurement model \(Y_{ij}=m_i(t_{ij})+\epsilon_{ij}\), what does each term represent, and which marker quantity enters the current-value hazard?
  2. A patient has a high observed reading but a posterior distribution that places most probability on moderate latent values. Why can directly substituting the reading give a different risk?
  3. Suppose the posterior latent marker has mean \(\mu\), variance \(\tau^2\), and is normal. What is \(E\{\exp(\alpha M)\}\), and why does it differ from the hazard link evaluated at \(\mu\)?
  4. For posterior latent values 2 and 4 with equal probabilities, conditional risks of 0.10 and 0.30 give what posterior-averaged risk? What does that average represent?
  5. Name one model diagnostic or sensitivity check relevant to separating measurement error from the latent biomarker process.

Solutions. (1) \(Y_{ij}\) is the observed reading, \(m_i(t_{ij})\) is the latent marker at that time, and \(\epsilon_{ij}\) is measurement error; the hazard uses \(m_i(t)\). (2) The reading may include measurement error, whereas the posterior latent distribution reflects the whole history and survival information; the hazard link and risk calculation are nonlinear, so the substituted-reading risk need not equal the averaged latent-process risk. (3) \(E\{\exp(\alpha M)\}=\exp(\alpha\mu+\alpha^2\tau^2/2)\); the extra variance term means that uncertainty affects the mean hazard. (4) The average is \(0.5(0.10)+0.5(0.30)=0.20\), the risk averaged over the two equally probable latent values. (5) For example, inspect longitudinal residual patterns or assess how predictions change under plausible measurement-error assumptions.

Clinical Biostats