Tutorials › Multi-Omics Data Integration › Time-Dependent Omics Covariates In Cox Models

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

Time-Dependent Omics Covariates In Cox Models

Build start-stop survival data from repeated omics assays and interpret Cox-model associations using only predictor values available at each event time.

Advanced 11 min read

What You'll Learn

  • Define start-stop intervals and event indicators for repeatedly measured omics predictors.
  • Construct risk sets using the covariate value available immediately before each event time.
  • Derive and calculate partial-likelihood contributions with time-updated covariates.
  • Interpret a fitted coefficient as a conditional hazard ratio per predictor-unit increase.
  • Diagnose look-ahead, incorrect interval boundaries, and informative measurement concerns.
  • Distinguish updating a covariate from allowing its coefficient to vary over time.

Why Update an Omics Covariate?

A baseline Cox model treats a predictor as fixed throughout follow-up. That can be an awkward representation when an omics assay is repeated: a person's expression level or metabolite concentration may change, and the value recorded at one visit may differ from the value recorded at the next. A time-dependent Cox covariate allows the predictor value used at an event time to change as follow-up proceeds.

The central requirement is temporal: the model may use only information available just before the time being analyzed. A later assay cannot be used to describe someone's earlier risk. Start-stop data encode this rule by dividing each person's observed follow-up into intervals over which the recorded covariate value is held fixed.

Definition: In start-stop data, each row represents one subject's follow-up over an interval \((a,b]\), with a covariate vector held constant over that interval and an event indicator equal to 1 only if the event occurs at \(b\). At time \(t\), a subject is in the risk set if they are under observation and event-free immediately before \(t\); their row must satisfy \(a<t\leq b\). The time-dependent covariate \(Z_i(t-)\) is the value available for subject \(i\) immediately before \(t\).

The Cox Model With Updated Covariates

Let \(T_i\) denote subject \(i\)'s event time, and let \(C_i\) denote their censoring time. The observed follow-up ends at the earlier of these times. For a \(p\)-component omics predictor vector, the time-dependent Cox model is

$$ \lambda_i(t\mid Z_i(t-))=\lambda_0(t)\exp\{\beta^\top Z_i(t-)\}. $$

Here \(\lambda_i(t)\) is the instantaneous event hazard for a subject still at risk at time \(t\), \(\lambda_0(t)\) is an unspecified baseline hazard, and \(\beta\) is a vector of regression coefficients. The covariate value \(Z_i(t-)\) must be known from the information available before \(t\). With a single predictor \(Z_i(t-)\), a one-unit increase at a given time is associated with a hazard multiplier of \(\exp(\beta)\), conditional on the other modeled covariates and the risk set.

The model assumes that this log-hazard association is proportional over time: \(\beta\) does not change with \(t\). Updating \(Z_i(t-)\) does not itself allow the coefficient to vary over time. Other working assumptions include a correctly specified covariate relationship, valid event and censoring times, and censoring independent of the event process conditional on the modeled covariate history. The visit and assay process must also provide meaningful measurements for the intended analysis; if measurement timing is related to unobserved health or impending events, the simple model may not adequately account for that process.

For a conventional Cox partial likelihood, each event time contributes a comparison between the subject who experiences the event and the other subjects then at risk. Under the usual independent-subject setup, the event process is appropriately modeled conditional on the observed covariate history. The covariate history used in that comparison must be predictable: it cannot depend on future outcomes or future assay results.

Constructing Start-Stop Records

Use one row for every interval during which a subject's recorded covariate vector is unchanged. Split a subject's follow-up at each new measurement, and end the final row at the event or censoring time. A row ending in an event has event indicator 1; all other rows have indicator 0. Under the \((a,b]\) convention, an update recorded at time \(s\) applies after \(s\): it is used for \(t>s\), while an event exactly at \(s\) uses the value available before that update.

1
Order the available measurements.
For each subject, list assay times and the end of observed follow-up. Do not use a measurement obtained after an event or censoring time.
2
Split follow-up at updates.
Create consecutive, non-overlapping intervals. Attach to each interval the covariate value that was available immediately after its start and remains the recorded value through its end.
3
Mark the terminal outcome.
Set the event indicator to 1 on the interval ending in the event; set it to 0 on intervals ending at an update or at censoring.
4
Check risk-set membership.
At an event time \(t\), include a subject only when \(a<t\leq b\) for their applicable row and they have not already had the event.

Worked Example: Building Intervals From Repeated Assays

Suppose, hypothetically, subject K has an assay value of 2 at time 0, a value of 3 measured at time 5, and an event at time 8. Subject L has a baseline value of 0, a value of 1 measured at time 4, and is censored at time 7. The assay unit is an arbitrary concentration unit. Using the rule that a measurement applies after its measurement time gives:

SubjectStartStopAssay valueEvent indicator
K0520
K5831
L0400
L4710

At time 5, K's new value is not yet used for an event exactly at that instant, because the row with value 3 covers times \(t\) satisfying \(5<t\leq8\). At time 6, K's value is 3 and L's value is 1, so both are in the risk set. K's event occurs at time 8; L has already been censored at time 7 and is not in that risk set. These interval and boundary rules prevent future assay information from entering an earlier risk comparison.

Partial Likelihood and a Risk-Set Calculation

If there are no tied event times, let \(R(t)\) be the subjects at risk immediately before an event at time \(t\), and let \(j\) be the subject who experiences that event. Given the risk set and one event at \(t\), the Cox model assigns the event subject the conditional probability

$$ \frac{\exp\{\beta^\top Z_j(t-)\}} {\sum_{i\in R(t)}\exp\{\beta^\top Z_i(t-)\}}. $$

Multiplying this contribution across event times gives the partial likelihood. It contains information about \(\beta\) while eliminating the unspecified baseline hazard. The risk-set values must be taken from the intervals active at each event time, not from a single row chosen for the whole subject.

Justification: At a time \(t\) with one event, the hazard model gives each at-risk subject a hazard proportional to \(\exp\{\beta^\top Z_i(t-)\}\), with the same baseline factor \(\lambda_0(t)\). Conditional on one event occurring among the risk set at that time, the relative probability that subject \(j\) is the one with the event is therefore $$ \frac{\lambda_0(t)\exp\{\beta^\top Z_j(t-)\}} {\sum_{i\in R(t)}\lambda_0(t)\exp\{\beta^\top Z_i(t-)\}} = \frac{\exp\{\beta^\top Z_j(t-)\}} {\sum_{i\in R(t)}\exp\{\beta^\top Z_i(t-)\}}. $$ The common baseline factor cancels. Multiplying these conditional contributions over event times yields the Cox partial likelihood. Tied event times require a specified tie method, such as the Efron or Breslow approximation, rather than this single-event expression applied unchanged.

Worked Example: One Event-Time Contribution

Consider hypothetical subjects A, B, and C. A has assay value 1 at an event time \(t=4\); B, who is censored at time 5, has value 0 at \(t=4\); and C, who has value 2 and an event later at time 6, is also at risk at \(t=4\). Suppose the fitted coefficient is \(\beta=0.4\) per assay unit. The event at time 4 is A's, so the partial-likelihood contribution is

$$ \frac{\exp(0.4\times1)} {\exp(0.4\times1)+\exp(0.4\times0)+\exp(0.4\times2)} = \frac{1.4918}{1.4918+1+2.2255} = \frac{1.4918}{4.7173} \approx 0.3162. $$

The calculation uses each subject's value at time 4, and all three subjects belong to that risk set. The contribution is the model-based conditional probability that A is the event subject at that time, given one event in this risk set. It is not the probability that A will experience an event at any time during follow-up.

For this one-predictor model, a one-unit increase in the assay value is associated with a hazard ratio of

$$ \exp(0.4)=1.492. $$

Thus, at a particular time, a subject with an assay value one unit higher has an estimated hazard 1.492 times as large, conditional on the model and covariates. This is an association, not evidence that experimentally changing the assay value would cause the hazard to change.

Worked Example: Multiplying Contributions Across Updated Risk Sets

In a second hypothetical data set, A has value 1 and an event at time 2. B has value 0 at time 2, receives a new assay value of 2 at time 3, and has an event at time 4. C has value 0 through censoring at time 5. At the candidate coefficient \(\beta=0.3\), the event at time 2 has all three subjects in its risk set:

$$ L_2(0.3) = \frac{\exp(0.3\times1)} {\exp(0.3\times1)+\exp(0.3\times0)+\exp(0.3\times0)} = \frac{1.3499}{1.3499+1+1} \approx 0.4030. $$

At time 4, A has had the event and is no longer at risk. B's updated value is 2, and C's value is 0, so

$$ L_4(0.3) = \frac{\exp(0.3\times2)} {\exp(0.3\times2)+\exp(0.3\times0)} = \frac{1.8221}{1.8221+1} \approx 0.6457. $$

The partial likelihood at \(\beta=0.3\) is the product of the contributions:

$$ L(0.3)=L_2(0.3)L_4(0.3) \approx 0.4030\times0.6457 \approx 0.2602. $$

The value 0.2602 is the partial-likelihood value at this candidate coefficient, not a p-value. Estimation searches for the coefficient that maximizes the partial likelihood (or its logarithm), using the correct updated values in each risk set.

Interpretation, Diagnostics, and Alternatives

A fitted coefficient describes an association between the current modeled covariate value and the hazard, conditional on the covariates in the model and the subject being in the risk set. For an omics predictor measured in a meaningful unit, state that unit when reporting \(\exp(\hat\beta)\). If predictors are standardized, state the scaling used. A time-updated coefficient does not, by itself, separate within-person changes from differences between people; both kinds of variation can contribute to the estimated association.

Useful checks include verifying that each subject's intervals are in time order, do not overlap, and cover the observed follow-up without unintended gaps. Confirm that no interval begins before the subject enters observation or extends beyond their event or censoring time. At each event time, inspect the risk set and confirm that the covariate attached to each person was available before that time. Also check for errors in event indicators, implausible assay values, and sparse risk sets.

The proportional-hazards assumption still matters: updating a covariate is not a remedy for a coefficient whose association changes over time. A time-varying coefficient is a different model feature. Standard model diagnostics can help assess proportional hazards and functional form, while plots or tabulations of assay values against visit and event times can reveal data-construction problems. An implausible coefficient may reflect a coding error, limited information, confounding, or a misspecified relationship; it is not automatically evidence of a biological mechanism.

A baseline Cox model is simpler and may be appropriate when the scientific question concerns baseline predictors or when repeated values are not part of the intended estimand. It cannot represent an association with updated values. A time-dependent Cox model uses observed covariates as they become available, but it does not by itself model the measurement process, correct measurement error, or handle informative visiting. Those issues require additional methods. A joint longitudinal-survival model is one alternative when the longitudinal trajectory and event process need to be modeled together; it answers a related but distinct modeling question.

Worked Example: Avoiding Future-Value Leakage

Suppose, hypothetically, a participant has a baseline assay of 1.2 units, a repeat assay of 2.0 units at month 6, and an event at month 4. The valid record for this participant ends at month 4 with value 1.2 and event indicator 1. The month-6 assay is after the event and must not be used in the participant's risk set or copied backward to the earlier interval. Using 2.0 would make a future observation appear to predict an earlier event, producing look-ahead bias. The same temporal rule applies when an assay is delayed in processing: its value is not available for prediction until it is actually available under the analysis's measurement convention.

Common Mistakes and Limits

  • Using the last observed value for all follow-up. This discards later updates. Split the record at each update and use the applicable value in each risk set.
  • Using a future value or smoothing with future observations. This introduces information unavailable at the event time. Use only values available before that time for the specified analysis.
  • Reversing the interval boundary rule. With \((a,b]\), the row includes its stop time but excludes its start time. State and apply one convention consistently, especially when an event and assay occur at the same recorded time.
  • Interpreting a covariate update as a causal effect. A time-dependent Cox coefficient is an adjusted hazard association under its assumptions, not necessarily the effect of an intervention on the omics marker.
  • Assuming repeated measurements are automatically harmless. Measurement error, selective visits, and informative dropout can undermine interpretation. The time-dependent Cox construction alone does not solve these problems.

The analysis is most defensible when assay timing and data availability are clearly recorded, intervals are constructed consistently, and the scientific interpretation matches the information actually used. Report the update rule and the event-time convention so another analyst can reproduce the risk sets.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. A subject has assay value 4 at time 0, a new value 6 measured at time 3, and an event at time 3. Which assay value applies at the event under the \((a,b]\) convention?
  2. At an event time, a one-unit increase in a single omics covariate has estimated coefficient \(\hat\beta=0.25\). What is the estimated hazard ratio, and how should it be interpreted?
  3. A subject is observed over \((0,2]\) and \((2,5]\), has an event at time 5, and the covariate changes at time 2. Which row receives event indicator 1?
  4. Does a time-dependent covariate allow its Cox coefficient to vary over time? Explain the distinction.

Solutions. (1) The value 4 applies at time 3: the interval starting at 3 excludes that instant, so the new value applies after time 3. (2) \(\exp(0.25)\approx1.284\). At a given time, a one-unit higher covariate value is associated with an estimated hazard 1.284 times as large, conditional on the model and other covariates; this is not a causal statement. (3) The row \((2,5]\) receives event indicator 1, because it contains the stop time 5. The first row has indicator 0. (4) No. Updating the covariate changes \(Z_i(t-)\), while a time-varying coefficient replaces the constant \(\beta\) with a coefficient that depends on time.

Clinical Biostats