Tutorials › Joint Modeling of Longitudinal and Time-to-Event Data › Joint Checks Of Biomarkers And Event Dependence

Model Diagnostics · Tutorial 610 of 697

Joint Checks Of Biomarkers And Event Dependence

Use joint posterior predictive checks to assess whether a fitted model reproduces clinically meaningful patterns linking biomarker histories with event occurrence.

Advanced 11 min read

What You'll Learn

  • Define joint discrepancy statistics that connect biomarker histories with event occurrence.
  • Generate replicated histories and event outcomes under a fitted joint model.
  • Compare observed association summaries with their posterior predictive distributions.
  • Interpret posterior predictive tail areas without treating them as conventional p-values.
  • Identify design, censoring, and measurement issues that can mislead a joint check.
  • Distinguish a broad joint check from marginal checks and targeted residual diagnostics.

Why Check Biomarkers and Events Together?

A joint model can reproduce the distribution of biomarker measurements and the distribution of event times separately, yet still fail to reproduce how the two are related. For example, it may capture the overall event rate but predict too little event occurrence among subjects whose biomarker rises rapidly. A check of either component alone could miss that mismatch.

A joint check compares an association summary calculated from the observed biomarker and event data with the same summary calculated from data replicated under the fitted joint model. The summary should target a scientifically interpretable pattern, such as event risk by a fixed biomarker threshold or the difference in pre-horizon biomarker levels between subjects with and without an event by that horizon. The check evaluates whether the fitted model reproduces that pattern; it does not establish that the biomarker causes the event.

Definition: A joint posterior predictive check compares a discrepancy statistic \(D\), which uses both biomarker and event information, in the observed data with its distribution in replicated data generated from the fitted joint model. A discrepancy statistic is a numerical summary chosen to reveal a feature of the data that matters for model adequacy.

Set Up the Replication Correctly

For subject \(i\), let \(Y_{ij}\) denote the biomarker measured at time \(t_{ij}\), \(T_i\) the event time, and \(C_i\) the censoring time. The observed event information is \(\tilde T_i=\min(T_i,C_i)\) and \(\Delta_i=I(T_i\leq C_i)\), where \(\Delta_i=1\) indicates an observed event. Let \(X_i\) denote observed covariates. A joint model specifies a distribution for the biomarker history and an event-time distribution linked through the model's latent quantities or association structure.

To form a posterior predictive check, draw model parameters from their fitted posterior distribution, then generate replicated biomarker histories and event times under the model. Apply the study's observation design to those histories: use the relevant visit schedule, follow-up window, and censoring procedure. If censoring is informative and is not adequately represented by a fixed design, the censoring mechanism must also be modeled. Do not compare complete simulated trajectories with incomplete observed records as if they had the same observation process.

A biomarker summary used for a subject who experiences an event must not use measurements after that event. Depending on the question, it may use measurements up to a fixed horizon, or only measurements taken before the event. The definition must be applied consistently to observed and replicated data. For example, if \(S_i\) is the mean biomarker value up to a prespecified horizon \(\tau\), specify what happens when a subject has an event before \(\tau\): use only measurements available before the event, or define another clinically meaningful summary. The choice changes the target pattern, so it should not be made after inspecting which version gives the strongest discrepancy.

A useful formal description is the posterior predictive distribution of a statistic \(D\):

$$ p(D^{\mathrm{rep}}\mid \text{observed data}) = \int p(D^{\mathrm{rep}}\mid \theta)\, p(\theta\mid \text{observed data})\,d\theta . $$

Here \(\theta\) represents the fitted model parameters, and \(D^{\mathrm{rep}}\) is computed from a replicated data set generated under \(\theta\). In practice, the integral is approximated with posterior draws and simulations. For a one-sided check, the posterior predictive tail area is estimated by the fraction of replicated discrepancies at least as extreme as the observed discrepancy. For example, for an upper-tail check,

$$ \widehat p_{\mathrm{ppc}} = \frac{1}{B}\sum_{b=1}^{B} I\!\left(D_b^{\mathrm{rep}}\geq D^{\mathrm{obs}}\right), $$

where \(B\) is the number of replications. When the observed discrepancy depends on the model parameters, calculate it using the corresponding posterior draw in each comparison. A small tail area flags tension between the data and the fitted model for that chosen feature; it is not a conventional null-hypothesis p-value.

Choose a Targeted Joint Summary

The statistic should connect the two data components directly. One option is an event-risk contrast across biomarker groups at a fixed clinical horizon. Another is the difference in a pre-horizon biomarker summary between subjects who do and do not experience the event by that horizon. These statistics are deliberately summaries, not complete descriptions of dependence. A check is most useful when its target is specified before examining the result and its clinical interpretation is clear.

For a horizon \(\tau\), a simple risk contrast is

$$ D_{\mathrm{risk}}(\tau) = \widehat P(T_i\leq\tau\mid G_i=1) - \widehat P(T_i\leq\tau\mid G_i=0), $$

where \(G_i\) is a prespecified biomarker group, perhaps defined by a clinical cutoff applied to a biomarker summary. In each replicate, recalculate the group and event proportions using the same rule. If there is censoring before \(\tau\), the raw proportion of observed events is not generally an estimate of event risk by \(\tau\); use a censoring-aware summary or restrict the check to a setting where the follow-up information supports the calculation.

A second possible statistic is

$$ D_{\mathrm{mean}}(\tau) = \overline S_{\Delta=1,\ \tilde T\leq\tau} - \overline S_{\Delta=0,\ \tilde T>\tau}, $$

where \(S_i\) is defined using the biomarker history available under the chosen rule. The groups must be defined in a way that makes sense for the observed follow-up. In particular, an event observed by \(\tau\) and a subject known to be event-free through \(\tau\) are not interchangeable with a subject censored before \(\tau\). Depending on the design, censored subjects may require a survival-based summary, or the statistic may be restricted to subjects whose status at \(\tau\) is known.

Worked Example: Risk Contrast Across Biomarker Groups

Suppose a hypothetical study has 100 subjects with complete event-status information through one year. A biomarker summary measured before that horizon is classified using a fixed clinical cutoff. In the observed data, 50 subjects are in the high group and 50 in the low group; 18 high-group subjects and 8 low-group subjects have an event by one year. The risk contrast is

$$ D_{\mathrm{risk}}^{\mathrm{obs}} = \frac{18}{50}-\frac{8}{50} = 0.36-0.16 = 0.20. $$

Thus the observed one-year event risk is 20 percentage points higher in the high biomarker group. Suppose 1,000 posterior predictive replications, using the same cutoff and follow-up rules, give a median contrast of 0.08 and a central 90% predictive interval from \(-0.02\) to \(0.18\). If 30 replications have a contrast at least 0.20, then the estimated upper-tail area is \(30/1000=0.030\). The observed contrast is larger than nearly all contrasts produced by this fitted model, suggesting that it may underrepresent this particular association pattern. This is evidence of model-data tension, not proof that the biomarker group causes the excess risk.

This calculation is appropriate only because event status through one year is known for all subjects in this example. If some subjects were censored earlier, treating them as event-free through one year would distort the risk contrast; the check would need to account for censoring.

Read the Predictive Comparison in Context

A predictive interval for \(D^{\mathrm{rep}}\) describes the range of discrepancies commonly generated by the fitted model, conditional on the data used to fit it and on the replication design. It is not a confidence interval for a population parameter. The observed discrepancy may be plotted against the replicate distribution, and a tail area may summarize how unusual it is relative to that distribution. For a two-sided concern, use a defined two-sided discrepancy or examine departures in both directions; do not assume that doubling a one-sided tail area is always justified.

Posterior predictive tail areas are often conservative as diagnostic summaries because the observed data are used both to estimate the posterior and to define the observed discrepancy. They are not expected to be uniformly distributed under a correctly specified model. Consequently, a value such as 0.04 is a warning about this chosen check, not a calibrated 4% false-alarm probability. Conversely, a non-extreme result does not show that all aspects of the joint model are adequate.

Worked Example: Biomarker Levels by Event Status

In a second hypothetical study, 20 subjects have biomarker measurements available under a prespecified rule up to a one-year horizon, and event status at one year is known. Five subjects experience the event by one year. Their mean pre-horizon biomarker summary is 7.0 units; the mean among the 15 subjects without an event by one year is 3.0 units. The observed difference is

$$ D_{\mathrm{mean}}^{\mathrm{obs}}=7.0-3.0=4.0\text{ units}. $$

Suppose the replicated differences have mean 2.1 units, a central 90% predictive interval from 0.5 to 3.6 units, and 24 of 1,000 replications at least as large as 4.0 units. The upper-tail estimate is \(24/1000=0.024\). The observed difference lies above the predictive interval, indicating that the fitted model tends to produce a weaker separation in these biomarker summaries by event status than was observed.

The interpretation depends on the definition of the summary. It is not valid to include biomarker values recorded after an event, since such values cannot represent the pre-event history and may not exist in the observed data. In this example, the stated measurement rule uses only information available before the event and is reproduced identically in each simulation.

A Short Justification for Replicating the Whole Data Structure

The predictive comparison is meaningful because both the observed and replicated discrepancy are calculated by the same function of the same kinds of data. If \(D\) is the chosen statistic and \(F\) is the observation procedure, then the relevant comparison is between \(D(F(\text{observed latent process}))\) and \(D(F(\text{replicated latent process}))\). Omitting \(F\)—for example, simulating event times but ignoring the way censoring hides them—changes the distribution of the statistic being checked.

More concretely, suppose a latent event time \(T_i\) is not observed when censoring occurs first. The observed indicator at horizon \(\tau\) is known only when \(\tilde T_i\geq\tau\), or when an event is observed by \(\tau\). A simulation that instead labels every subject with \(T_i>\tau\) as event-free uses information unavailable in the observed data. Its discrepancy is not comparable to the observed-data discrepancy. Applying the study's censoring rule to simulated times preserves the information structure and makes the comparison relevant to the actual analysis.

Worked Example: Censoring Before the Check Horizon

Consider a hypothetical check at \(\tau=12\) months. Among 40 subjects in one biomarker group, 6 events are observed by month 12, 28 subjects are known to be event-free at month 12, and 6 are censored before month 12 without an earlier event. The crude fraction \(6/40=0.15\) is not the one-year event risk: the six early-censored subjects have unknown status at month 12.

Suppose the fitted model predicts 8 events by month 12 among the 40 subjects, but after applying the simulated censoring procedure only 6 are observed by month 12. Comparing the observed count of 6 with the model's latent count of 8 would mismatch observed and latent quantities. The correct replication generates event and censoring times, then counts observed events by month 12 using the same observation rule. The observed count can then be compared with the distribution of replicated observed counts.

Diagnostics, Alternatives, and Limits

A joint check should be read alongside checks of each component. If the replicated biomarker trajectories are already implausible, an association discrepancy may reflect a poor longitudinal model rather than a specific failure to reproduce biomarker–event dependence. Likewise, a poor event-history fit can affect an association summary. Earlier material on posterior predictive checks of biomarker trajectories and event histories addresses these marginal features; a joint check adds a targeted comparison across them.

Several practical diagnostics help identify when the check itself is unreliable:

  • Inspect the replicate distribution. A highly skewed distribution, many undefined statistics, or unstable group sizes may make a single tail area misleading.
  • Check data availability. Few events, sparse visits, or extensive censoring can make an association summary imprecise or dependent on a small number of subjects.
  • Vary a prespecified summary thoughtfully. Different clinically relevant summaries can reveal different failures, but searching many summaries and reporting only an extreme result exaggerates the apparent evidence.
  • Verify the replication design. Measurement times, follow-up, censoring, and rules for missing values should match the observed-data process or be modeled as appropriate.

The main alternatives answer different questions. Marginal predictive checks assess whether the biomarker or event data alone look plausible. Residual diagnostics can reveal systematic patterns in component-specific fits. A joint posterior predictive check directly assesses whether a selected cross-component feature is reproduced, but it usually does not identify the source of a mismatch. A surprising check could arise from the longitudinal trajectory distribution, the event model, their association, or the observation process. More targeted diagnostics are needed to distinguish these explanations.

The check is also limited by the statistic chosen. A model can reproduce an average risk contrast while missing variation across subgroups or over time. It can reproduce a difference in mean biomarker levels while getting the distribution tails wrong. One satisfactory result therefore cannot certify the full joint model. Use a small set of scientifically motivated checks and report the statistic, horizon, handling of censoring, and replication procedure so the result is interpretable.

Common pitfall: “The observed association is inside the 95% predictive interval, so the joint model is correct.” The interval covers only the replicated values of one selected statistic under one specified design. The correction is to say that this check found no strong discrepancy for that statistic; other features of the joint distribution may still be misspecified.

Check Your Understanding

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

  1. Why should replicated event times be passed through the study's censoring procedure before comparing observed event counts with replicated counts?
  2. A check gives an observed risk contrast of 0.12 and an upper-tail posterior predictive area of 0.41. What can and cannot be concluded?
  3. At a fixed horizon, a subject is censored before the horizon and has no observed event. Why is it incorrect to classify that subject as event-free through the horizon?
  4. Name one way a marginal check and a joint check differ.

Solutions. (1) The observed count reflects both event times and which events are made observable by censoring. Applying the same censoring rule to replications compares like with like. (2) The observed contrast is not unusually large in the chosen predictive comparison; this gives no strong signal from that check, but does not establish adequacy of the full joint model or rule out other discrepancies. (3) The subject's event status at the horizon is unknown: an event could have occurred after censoring but before the horizon. (4) A marginal check concerns one component, such as biomarker trajectories alone; a joint check uses a statistic linking biomarker information with event occurrence.

Clinical Biostats