Why Let an Omics Association Change Over Time?
A molecular feature may have a stronger association with the instantaneous event rate early in follow-up than later, or its association may change direction. A single proportional-hazards coefficient cannot represent that pattern: it imposes a constant hazard ratio over time. When the proportional-hazards assumption is not suitable for a predictor of interest, a Cox model can instead let that predictor's coefficient depend on follow-up time.
The target is still a hazard association, not a direct change in survival probability or a causal effect. A hazard ratio compares instantaneous event rates among individuals who remain at risk at a given time, conditional on included covariates. A time-varying coefficient therefore describes how that conditional comparison changes with follow-up.
Modeling a Smooth Change With a Time Interaction
One direct specification represents the coefficient as a function of time. For a single omics predictor \(x\), a simple linear time interaction is
where \(h_0(t)\) is an unspecified baseline hazard, \(z\) is a vector of adjustment covariates, and \(g(t)\) is a chosen time function. The coefficient for \(x\) at time \(t\) is \(\beta(t)=\beta+\gamma g(t)\). For a one-unit increase in \(x\), the hazard ratio at time \(t\) is \(\exp\{\beta+\gamma g(t)\}\). If \(x\) is standardized, one unit can represent a one-standard-deviation difference; the scale must be stated to make the effect interpretable.
The time function should be selected with the scientific question and observed follow-up in mind. Taking \(g(t)=t\) makes the log hazard ratio linear in time. A function such as \(g(t)=\log(t)\) represents a different pattern and requires a positive time scale. Centering or scaling time can make coefficients easier to interpret and may improve numerical stability. In all cases, \(\beta\) is the log hazard ratio where \(g(t)=0\), not necessarily the effect at time zero unless the chosen time function makes that interpretation appropriate.
Worked Example: A Linear Time Interaction
Suppose a hypothetical Cox model uses a standardized omics score \(x\), follow-up time in years, and \(g(t)=t\). The fitted terms for this score are \(\hat\beta=-0.20\) and \(\hat\gamma=0.08\) per year. Other covariates are held fixed. Calculate the hazard ratio for a one-standard-deviation higher score at years 1 and 4.
At time \(t\), the estimated log hazard ratio is \(\hat\beta+\hat\gamma t\). At year 1,
Thus, at year 1, a one-standard-deviation higher score is associated with an estimated instantaneous event rate about 0.887 times that for a score one standard deviation lower, conditional on the other covariates. At year 4,
The estimated conditional hazard ratio is about 1.13 at year 4. The fitted association changes from below 1 to above 1 because the estimated log hazard ratio crosses zero at \(t=0.20/0.08=2.5\) years. This describes changing association, not evidence that the score causes a change in event rates.
Modeling Different Effects in Follow-Up Intervals
When a gradual trend is not plausible, or when the scientific question identifies meaningful periods, a piecewise coefficient can assign a separate effect to each interval. For one prespecified cut point \(\tau\), write
Here \(I(\cdot)\) is an indicator, equal to 1 when its condition is true and 0 otherwise. The coefficient for \(x\) is \(\beta_1\) before \(\tau\) and \(\beta_2\) from \(\tau\) onward. The model allows a step change at the cut point; it does not assert that the biology itself changes abruptly there. The time intervals and cut point should be chosen for defensible scientific or design reasons, rather than selected solely because one choice produces the most appealing result.
Worked Example: Two Prespecified Follow-Up Periods
In a hypothetical analysis, follow-up is divided at 2 years and \(x\) is a standardized molecular score. The fitted log hazard ratio is \(\hat\beta_1=-0.40\) before 2 years and \(\hat\beta_2=0.15\) from 2 years onward. Calculate and interpret the period-specific hazard ratios.
For the first interval, exponentiate its coefficient:
Before 2 years, a one-standard-deviation higher score is associated with an estimated conditional hazard 0.670 times as large, or about 33.0% lower, than the hazard for a score one standard deviation lower. For the second interval,
From 2 years onward, the corresponding estimated conditional hazard is about 1.16 times as large, or 16.2% higher. These comparisons are within each interval, holding the other modeled covariates fixed. The point estimates alone do not establish that either interval-specific association differs from zero or that the effects differ from each other; uncertainty and the contrast between coefficients must also be assessed.
Assumptions and a Time-Specific Confidence Interval
The Cox model with a time interaction or piecewise coefficient retains the usual conditional modeling requirements. The hazard specification must correctly represent the included predictors and their time dependence; the form \(g(t)\), or the chosen intervals, must be adequate for the pattern being modeled. Other covariates with constant coefficients are still assumed to have constant conditional hazard ratios. Observations from distinct individuals are ordinarily treated as independent, and censoring must be non-informative conditional on the modeled information for the likelihood-based interpretation to apply. The covariates used in a time interaction must be available and correctly aligned with the risk sets; a changing covariate history must be handled as a time-dependent predictor rather than confused with a changing coefficient. There must also be sufficient events and risk-set information across the periods of interest to estimate the effects.
The reason for evaluating a time-specific effect as a linear combination of fitted coefficients is immediate from the model. For \(g(t)=t\), the log hazard ratio at time \(t\) is \(\beta+t\gamma\). If the estimated coefficients have covariance matrix entries \(\widehat{\mathrm{Var}}(\hat\beta)\), \(\widehat{\mathrm{Var}}(\hat\gamma)\), and \(\widehat{\mathrm{Cov}}(\hat\beta,\hat\gamma)\), then the variance of that sum follows by expanding the variance of a linear combination:
A pointwise Wald interval on the log hazard-ratio scale is the estimated log hazard ratio plus or minus 1.96 times its standard error; exponentiating both endpoints gives an interval for the hazard ratio. It is pointwise because it applies at the specified time, not simultaneously over all follow-up times.
Worked Example: Uncertainty at a Specified Follow-Up Time
Consider a hypothetical linear time-interaction model with \(g(t)=t\), where time is measured in years. At year 3, the estimated log hazard ratio for a one-unit increase in the omics score is \(-0.1921\). The estimated standard errors are \(0.12\) for \(\hat\beta\) and \(0.035\) for \(\hat\gamma\), and their estimated covariance is \(-0.001073\). Calculate the standard error and 95% pointwise confidence interval at year 3.
First, use the covariance formula for \(\hat\beta+3\hat\gamma\):
The standard error is \(\sqrt{0.018987}\approx0.1378\). Using the displayed rounded values, the 95% interval on the log scale is
Exponentiating gives an estimated hazard ratio of \(\exp(-0.1921)\approx0.8252\), with a 95% pointwise confidence interval of approximately \([\exp(-0.4622),\exp(0.0780)]=[0.6299,1.0811]\). At year 3, the fitted association is a lower conditional hazard for a higher score, but this interval includes 1. The data therefore do not rule out no association at the 5% two-sided level for this time-specific comparison. The interval does not assign a 95% probability to the fixed hazard ratio.
Diagnostics, Alternatives, and Limitations
The earlier material on diagnosing proportional hazards concerns ways to detect time dependence; after finding evidence of a changing association, the modeling question is whether the chosen time function gives an adequate and stable description. Inspect the estimated hazard-ratio curve over the follow-up range, with uncertainty, rather than reporting only a coefficient for the interaction. Check whether the pattern is driven by a small number of late events, whether there are enough individuals at risk in each interval, and whether reasonable alternative time functions or prespecified cut points change the substantive conclusion. A visibly poor fit, unstable estimates, or very wide late-follow-up intervals signals that the model is asking the data to estimate more than they can support.
A single constant-coefficient Cox model is more parsimonious and easier to summarize, but imposes one hazard ratio throughout follow-up. A time interaction gives a smooth, function-specific change and can use follow-up information efficiently when that shape is credible. A piecewise model is easier to interpret across clinically meaningful periods, but depends on the cut point and can create a sharp estimated discontinuity. Stratifying the baseline hazard by a categorical nuisance variable can allow that variable to have different baseline hazards across strata, but does not estimate a time-varying hazard ratio for the stratified variable itself. These approaches answer different modeling needs; none should be selected simply because it yields a preferred significance result.
Both time-interaction and piecewise models can be imprecise, particularly with few events or sparse risk sets late in follow-up. A complicated time function may overfit, while an overly simple function can hide a meaningful pattern. Time-specific hazard ratios are conditional comparisons among those still at risk and can change partly because the composition of the risk set changes. They are not risk differences, cumulative-incidence comparisons, or causal effects. Interpret them over the observed follow-up range, on the stated predictor scale, and alongside their uncertainty.
Common Mistakes
- Confusing a changing coefficient with a changing predictor. The interaction \(xg(t)\) lets the association of \(x\) vary; it does not mean that the measured value of \(x\) itself changes over time.
- Interpreting \(\exp(\gamma)\) as the hazard ratio at every time. In a linear interaction model, the hazard ratio at time \(t\) is \(\exp\{\beta+\gamma t\}\), not \(\exp(\gamma)\). The latter represents a change in the log hazard ratio per unit of time.
- Using a coefficient without its scale or time interval. State whether \(x\) is raw or standardized and identify the time or interval for the reported hazard ratio.
- Ignoring covariance when calculating uncertainty. The variance of \(\hat\beta+t\hat\gamma\) includes \(2t\widehat{\mathrm{Cov}}(\hat\beta,\hat\gamma)\); omitting it can misstate the standard error.
- Calling a hazard ratio a risk ratio. A time-specific hazard ratio compares instantaneous event rates among individuals still at risk, not the proportions who have experienced the event by that time.
Check Your Understanding
Try each question, then check the brief solutions below.
- For \(g(t)=t\), \(\hat\beta=0.10\), and \(\hat\gamma=-0.03\) per month, what is the estimated hazard ratio per one-unit increase in \(x\) at month 2?
- A piecewise model estimates \(\hat\beta_1=0\) before a cut point and \(\hat\beta_2=\log(1.5)\) afterward. What are the two hazard ratios per one-unit increase in \(x\)?
- Why is the covariance between \(\hat\beta\) and \(\hat\gamma\) needed for an interval at time \(t\)?
- A time-specific 95% confidence interval for a hazard ratio includes 1. What conclusion is justified for that time-specific comparison, and what conclusion is not justified?
Solutions. (1) The log hazard ratio is \(0.10+2(-0.03)=0.04\); exponentiating gives \(\exp(0.04)=1.041\). (2) The hazard ratios are \(\exp(0)=1\) before the cut point and \(\exp\{\log(1.5)\}=1.5\) afterward. (3) The estimated log hazard ratio is a sum of fitted coefficients, and the variance of a sum includes \(2t\widehat{\mathrm{Cov}}(\hat\beta,\hat\gamma)\). (4) The interval indicates that a hazard ratio of 1 is compatible with the data at the 5% two-sided level for that time-specific comparison. It does not prove the absence of an association, establish the effect at other times, or give the probability that the null hypothesis is true.