Tutorials › Multi-Omics Data Integration › Worked Analysis Of Longitudinal Omics And Event Risk

Clinical Outcomes: Survival and Longitudinal Data · Tutorial 475 of 597

Worked Analysis Of Longitudinal Omics And Event Risk

Work through how observed longitudinal assays and latent omics trajectories can yield different event-risk estimates, and learn what each model’s assumptions and predictions mean.

Advanced 10 min read

What You'll Learn

  • Specify the time-dependent Cox model using the most recent observed omics value.
  • Interpret a Cox hazard ratio and calculate a survival probability from a fitted model.
  • Specify a shared-random-effects joint model for a longitudinal omics trajectory and event risk.
  • Distinguish an association with an observed assay from an association with a latent trajectory.
  • Explain why joint-model predictions average over uncertainty in subject-specific random effects.
  • Diagnose assumptions and recognize when the two analyses are not directly comparable.

From Repeated Assays to Event Risk

When omics measurements are collected repeatedly, event risk may relate to a patient’s changing molecular state rather than just a baseline value. A time-dependent Cox model uses the observed assay history to update the covariate over time. A shared-random-effects joint model instead links the event process to a latent longitudinal trajectory, accounting for measurement noise through a model for the repeated assays. Their estimates can differ because the models define the relevant marker differently, not simply because one calculation is more complicated.

The worked analyses below use hypothetical data. Suppose 120 patients have a standardized log-abundance measurement of one omics feature at scheduled visits, with event or censoring follow-up through 12 months. The feature is standardized so one unit represents one standard deviation in the analysis sample. Some patients experience the event; others are right-censored. For either analysis, the event time and censoring indicator must be recorded, and assay values used as predictors must be available before the time at which risk is evaluated.

Definition: A time-dependent Cox model relates the event hazard at time \(t\) to covariates that can vary over time. A shared-random-effects joint model specifies a longitudinal model for repeated measurements and a survival model whose hazard depends on the longitudinal trajectory, with subject-specific random effects shared between the two models.

Analysis A: Time-Dependent Cox Model

Let \(T_i\) be patient \(i\)'s event time, \(Z_i\) a baseline covariate, and \(Y_i(t-)\) the most recent measured omics value available strictly before \(t\). A common time-dependent Cox model is

$$ h_i(t \mid \mathcal{H}_i(t-)) = h_0(t)\exp\{\gamma Z_i+\beta Y_i(t-)\}. $$

Here \(h_i(t)\) is the instantaneous event rate among patients still event-free just before \(t\), \(h_0(t)\) is an unspecified baseline hazard, and \(\mathcal{H}_i(t-)\) denotes the available covariate history before \(t\). With a last-observation-carried-forward rule, \(Y_i(t-)\) remains constant between visits and changes when a new assay becomes available. A measurement taken after an event cannot be used to predict that event.

The model assumes proportional hazards: for two covariate histories, their hazard ratio is constant over time when their covariate difference is held fixed. It also requires an appropriate risk-set construction and censoring that is independent of the event process conditional on included information. The assay history must be handled in a way that is predictable, meaning the value used at time \(t\) was known before \(t\). A time-dependent Cox model does not, by itself, correct measurement error or account for an informative visit process.

Worked Example: Interpreting a Time-Dependent Cox Estimate

In a hypothetical analysis of 120 patients with 36 events, the fitted coefficient for the most recently observed standardized feature is \(\hat{\beta}=0.55\), with standard error \(0.18\). Assume the proportional-hazards form is adequate and the measurement recorded at each time is available before that time’s risk evaluation. Compare two otherwise similar patients whose current observed feature values differ by \(0.8\) standard deviations.

The estimated hazard ratio for the higher value relative to the lower value is

$$ \widehat{HR}=\exp\{0.55(0.8)\} =\exp(0.44)=1.553. $$

Thus, at a time when both patients are at risk, the model estimates a 1.553-fold instantaneous event hazard for the patient with the 0.8-standard-deviation higher observed value, conditional on the model covariates. This is not a statement that the higher value causes the event.

A 95% Wald interval for the coefficient is \(0.55 \pm 1.96(0.18)\), or \((0.1972,0.9028)\). Scaling by the same covariate difference and exponentiating gives

$$ \left(\exp\{0.8(0.1972)\},\exp\{0.8(0.9028)\}\right) =(1.171,2.059). $$

Under the fitted model and its interval approximation, the data are compatible with hazard ratios from 1.171 to 2.059 for this contrast. The interval is not a 95% probability statement about the fixed hazard ratio.

A time-dependent Cox estimate is an association with the observed, time-updated value as encoded in the analysis. If the assays are noisy measures of an underlying biological trajectory, that observed-value association need not equal the association with the trajectory itself. Further, if patients’ visit timing depends on evolving health, their observed values may be available more often precisely when their risk is changing. The analysis must then address the visit process rather than treating the recorded values as an uncomplicated schedule.

Analysis B: Shared-Random-Effects Joint Model

A simple joint model represents the repeated assay as a noisy observation of a smooth subject-specific trajectory. For example, let \(t_{ij}\) be the time of patient \(i\)'s \(j\)th assay, and write

$$ Y_{ij}=m_i(t_{ij})+\epsilon_{ij}, \qquad m_i(t)=\beta_0+\beta_1t+b_{0i}+b_{1i}t. $$

The residual errors \(\epsilon_{ij}\) are commonly assumed to have mean zero and constant variance, and the random effects \(b_i=(b_{0i},b_{1i})\) are commonly assigned a mean-zero multivariate normal distribution. The event model can link the hazard to the current latent trajectory:

$$ h_i(t \mid b_i,Z_i)=h_0(t) \exp\{\gamma Z_i+\alpha m_i(t)\}. $$

Here \(\alpha\) describes the association between the latent marker level and the event hazard, conditional on the model and other covariates. In this example, a one-unit higher latent marker level corresponds to a hazard ratio of \(\exp(\alpha)\). The longitudinal and event processes are linked because they share \(b_i\); conditional on those random effects and specified covariates, the model typically assumes the assay errors and event process are independent. Correct specification of the trajectory, random-effects distribution, association structure, baseline hazard, and censoring mechanism matters. This basic form also assumes the visit process is ignorable, unless it is explicitly modeled.

Worked Example: Calculating a Latent Trajectory and Hazard Ratio

For a hypothetical patient, suppose the fitted longitudinal model gives \(\beta_0=0.20\), \(\beta_1=0.15\) per month, \(b_{0i}=-0.10\), and \(b_{1i}=0.03\) per month. At month 6, the model-implied latent marker level is

$$ m_i(6)=0.20+0.15(6)-0.10+0.03(6) =0.20+0.90-0.10+0.18=1.18. $$

Suppose the fitted event association is \(\hat{\alpha}=0.70\). Comparing this trajectory value with a value 0.5 standard deviations lower, while holding other covariates fixed, gives

$$ \widehat{HR}=\exp\{0.70(0.5)\} =\exp(0.35)=1.419. $$

The model therefore estimates a 1.419-fold hazard for the higher latent trajectory value in that contrast. It is the latent level, not a single noisy assay reading, that defines this association.

A joint model can also produce a dynamic survival prediction after a patient’s observed history is available. Such a prediction must account for uncertainty in the patient’s random effects. Let \(s\) be the prediction time, \(u>s\) a future time, and \(Y_i[0,s]\) the assay history through \(s\). The model-based event-free probability is

$$ P(T_i>u \mid T_i>s,Y_i[0,s],Z_i) = \int \exp\left\{-\int_s^u h_0(v) \exp\big(\gamma Z_i+\alpha m_i(v;b_i)\big)\,dv\right\} p(b_i \mid T_i>s,Y_i[0,s],Z_i)\,db_i. $$

The inner expression is survival from \(s\) to \(u\) for a specified random effect. The outer integral averages that survival over the random-effects distribution conditional on the patient’s measurements and survival to \(s\). That conditional distribution reflects the observed longitudinal history and, under the joint model, the fact that the patient has remained event-free to \(s\).

Worked Example: A Conditional Dynamic Survival Calculation

Consider a hypothetical patient at month 6 with \(Z_i=0\), and suppose the model gives \(m_i(v)=1.18\) throughout the next six months for a simple illustration. Let \(\hat{\alpha}=0.70\) and let the estimated baseline cumulative hazard over months 6 to 12 be \(0.06\). If the random effects were known to be exactly those used for this trajectory, the conditional survival calculation is

$$ \widehat{S}_i(12\mid 6,b_i) = \exp\{-0.06\exp(0.70(1.18))\} = \exp\{-0.06\exp(0.826)\}. $$

Since \(\exp(0.826)=2.284\), the cumulative hazard is \(0.06(2.284)=0.1370\), and the conditional event-free probability is \(\exp(-0.1370)=0.8720\). This calculation is conditional on a fixed random effect. A full joint-model prediction instead averages the conditional survival over the posterior distribution of random effects given the patient’s assay history and survival through month 6. In general, that average is not equal to survival evaluated at the posterior mean trajectory.

Why the Estimates Can Differ

A time-dependent Cox coefficient and a joint-model association parameter answer related but distinct questions. The Cox coefficient uses the most recent observed assay under a chosen update rule. The joint-model parameter links the hazard to a latent trajectory estimated from all repeated measurements and the shared-effects model. If the assays are noisy, smoothing can change the exposure contrast. If marker effects depend on trajectory features not included in the Cox model, such as slope, the two models also differ in structure. Differences between estimates do not by themselves establish that one model is correct.

Worked Example: Comparing Estimates Without Treating Them as Identical

Suppose, in a second hypothetical fit to the same patients and standardized feature, the time-dependent Cox model estimates \(\hat{\beta}=0.38\) (standard error \(0.16\)), while a joint model estimates \(\hat{\alpha}=0.72\) (standard error \(0.20\)). For a one-standard-deviation contrast, their respective hazard ratios are

$$ \exp(0.38)=1.462, \qquad \exp(0.72)=2.054. $$

The Cox estimate describes the association with a one-unit higher most recent observed assay; the joint-model estimate describes the association with a one-unit higher latent trajectory under its model. Even on the same standardized scale, the targets differ. For example, assay noise can make successive observed values fluctuate around the underlying trajectory, while the joint model uses the repeated values to estimate that trajectory. The joint estimate is not automatically preferable: a misspecified trajectory or random-effects distribution can also distort it. The comparison is most informative when both models use the same patients, time origin, event definition, covariates, and clearly stated marker scale.

Checks, Alternatives, and Limitations

Before interpreting either analysis, verify that the data structure matches the model. In the time-dependent Cox analysis, check that every covariate value precedes the event-risk time, risk sets are correct, the proportional-hazards assumption is plausible, and visit timing does not create an unaddressed selection process. In the joint analysis, inspect whether the fitted trajectory represents the observed patterns, whether residual variability and random-effects assumptions are reasonable, and whether the event association form is adequate. For both approaches, examine influential patients, missing assay patterns, and censoring assumptions.

ApproachExposure in the event modelMain advantageImportant vulnerability
Time-dependent CoxMost recent observed value, or another specified predictable summaryDirect interpretation and fewer distributional assumptions about the longitudinal processMeasurement error, update-rule choices, and informative observation can affect the estimate
Shared-random-effects joint modelLatent trajectory, often informed by all repeated measurementsLinks the measurement and event processes and propagates trajectory uncertainty into predictionDepends on the longitudinal, random-effects, association, and censoring specifications

Neither approach is universally superior. A time-dependent Cox model may be a useful choice when the scientific target is explicitly association with an available observed value and the update rule is defensible. A joint model may be useful when measurement error and the latent trajectory are central to the question, or when prediction should condition on repeated assay history. If visits are triggered by clinical deterioration, the observation process may need a joint or otherwise explicit treatment; merely switching to a joint longitudinal-survival model does not automatically solve informative visiting or dropout. These analyses estimate conditional associations and predictions under their assumptions, not causal effects without additional design and identification assumptions.

Common pitfall: It is incorrect to report the joint-model association as though it were the hazard ratio for a one-unit increase in the latest measured assay. The joint-model parameter applies to the latent trajectory specified in that model. State whether the contrast is in an observed measurement or a latent marker, and give its scale and time interpretation.

Check Your Understanding

Answer each question, then compare with the brief solutions.

  1. A time-dependent Cox coefficient is \(0.40\). What is the estimated hazard ratio for a 0.5-unit increase in the current observed marker?
  2. Why must an assay value measured after an event not be used as the time-dependent predictor for that event?
  3. In a joint model, why is dynamic survival generally averaged over the conditional distribution of random effects rather than calculated only at their posterior mean?
  4. Name one assumption that differs in emphasis between a time-dependent Cox model and a shared-random-effects joint model.
  5. If the time-dependent Cox and joint-model hazard ratios differ, can that difference alone establish which model is correct? Explain.

Solutions. (1) \(\exp\{0.40(0.5)\}=\exp(0.20)=1.221\); the model estimates a 1.221-fold hazard for that observed-marker contrast. (2) It was not available before the event and using it would introduce future information into the risk prediction. (3) Random effects are uncertain; averaging conditional survival over their distribution incorporates that uncertainty, and the nonlinear survival function means the result generally differs from survival at the mean random effect. (4) The Cox analysis emphasizes proportional hazards and a predictable covariate history; the joint model additionally requires a specified longitudinal trajectory and random-effects distribution, as well as a valid shared-effects association structure. (5) No. The models target different marker quantities and rely on different assumptions, so the difference calls for checking model fit, measurement, and target definitions rather than choosing a winner from the estimates alone.

Clinical Biostats