Why Allow a Cause-Specific Effect to Change With Time?
A cause-specific Cox model usually represents a covariate’s effect by one hazard ratio that applies at every event time. That proportional-hazards assumption can be too restrictive. For example, a treatment might have a stronger association with the instantaneous rate of one event type early in follow-up than later. A time-by-covariate interaction makes that change explicit and lets the hazard ratio be described as a function of time.
This model concerns the cause-specific hazard for one specified cause, not the probability of experiencing that cause by a given time. In competing-risks data, a person who has a competing event leaves the event-free risk set for the cause-specific Cox analysis. The time-varying effect changes the covariate’s cause-specific hazard ratio; it does not, by itself, describe how the cumulative incidence changes.
Model and Time-Specific Hazard Ratio
For one covariate \(X\), a cause-specific Cox model with a time-varying effect can be written
Here \(\lambda_{0k}(t)\) is the unspecified baseline cause-specific hazard for cause \(k\), and \(g(t)\) is a specified function of time. The term \(Xg(t)\) is the time-by-covariate interaction. For two covariate values \(x_1\) and \(x_0\), the cause-specific hazard ratio at time \(t\) is
Thus, for a one-unit increase in \(X\), the log hazard ratio at time \(t\) is \(\beta_1+\beta_2g(t)\), and the hazard ratio is \(\exp\{\beta_1+\beta_2g(t)\}\). If \(\beta_2=0\), this reduces to a proportional cause-specific effect. If \(\beta_2\ne 0\), the hazard ratio changes with time according to the chosen \(g(t)\).
A common choice is \(g(t)=\log(t/t_*)\), where \(t_*>0\) is a reference time in the same time units as \(t\). This centers the interaction because \(g(t_*)=0\), so \(\beta_1\) is the log hazard ratio at \(t_*\). Centering makes the main coefficient easier to interpret; it does not change the fitted hazard ratios. The time unit and reference time should be stated, especially when logarithms are used.
Worked Example: Reading a Changing Hazard Ratio
Suppose a hypothetical study models the cause-specific hazard of an event with binary treatment \(X\), where \(X=1\) is treated and \(X=0\) is untreated. Time is measured in months, \(g(t)=\log(t/6)\), and the fitted coefficients are \(\hat\beta_1=0.50\) and \(\hat\beta_2=-0.30\). The model’s treatment hazard ratio is $$ \widehat{HR}_k(t)=\exp\{0.50-0.30\log(t/6)\}. $$
At 6 months, \(g(6)=\log(1)=0\), so $$ \widehat{HR}_k(6)=\exp(0.50)\approx 1.649. $$ At that time, the estimated cause-specific hazard is about 1.65 times as high for treated as untreated individuals who are still event-free, under the model.
At 18 months, \(g(18)=\log(3)\approx 1.0986\). The estimated log hazard ratio is $$ 0.50-0.30(1.0986)=0.1704, $$ and the estimated hazard ratio is \(\exp(0.1704)\approx 1.186\). The estimated relative hazard is therefore closer to 1 at 18 months than at 6 months.
The estimated log hazard ratio is zero when \(0.50-0.30\log(t/6)=0\), giving \(t=6\exp(0.50/0.30)\approx31.8\) months. This is the model’s estimated time at which the two cause-specific hazards are equal for the two treatment groups, conditional on the model. It does not imply equal cumulative incidence or equal numbers of events by that time.
How the Interaction Enters the Cox Partial Likelihood
At an observed cause-\(k\) event time \(t_i\), the Cox partial likelihood compares the event subject’s relative hazard with the relative hazards of everyone in the cause-specific risk set at that time. For clarity, assume distinct event times; tied event times require an appropriate tie method. Let \(R_k(t_i)\) contain people still event-free immediately before \(t_i\). Under the model above, the event-time contribution when subject \(i\) has cause \(k\) is
The baseline hazard cancels because it is shared by all members of that risk set at the same time. Notice that the time function is evaluated at the event time \(t_i\), and the competing-event subjects are not in \(R_k(t_i)\) after their competing event. Multiplying these contributions over cause-\(k\) event times gives the partial likelihood used to estimate the coefficients.
The ratio formula follows directly from the model: at a fixed \(t\), divide the hazard at \(x_1\) by the hazard at \(x_0\). The common factor \(\lambda_{0k}(t)\) cancels, and the remaining exponent is \((x_1-x_0)[\beta_1+\beta_2g(t)]\). This is why the time-specific hazard ratio is interpretable without estimating the baseline hazard.
Worked Example: A Partial-Likelihood Contribution at 12 Months
Consider a hypothetical event time of 12 months and a risk set containing two people: one treated (\(X=1\)) and one untreated (\(X=0\)). Suppose the fitted coefficients are \(\hat\beta_1=0.40\) and \(\hat\beta_2=-0.25\), with \(g(t)=\log(t/6)\). At 12 months, \(g(12)=\log(2)\approx0.6931\). The treated person’s linear predictor relative to the untreated person is $$ 0.40-0.25(0.6931)=0.2267. $$
The relative hazard for the treated person is \(\exp(0.2267)\approx1.25445\); the untreated person’s relative hazard is 1. If the treated person has the cause-\(k\) event, the partial-likelihood contribution is $$ \frac{1.25445}{1.25445+1}\approx0.5564. $$ If the untreated person has the cause-\(k\) event instead, the contribution is $$ \frac{1}{1.25445+1}\approx0.4436. $$
These contributions sum to 1 because the risk set has only two members and there is one event. In an actual analysis, each event-time denominator includes every eligible person in the risk set, and the contributions across event times are combined to estimate the coefficients.
Uncertainty and Testing Proportionality
A time-specific estimate uses both coefficient estimates, so its uncertainty must account for their covariance. Let \(\widehat{\boldsymbol\beta}=(\hat\beta_1,\hat\beta_2)^\mathsf{T}\) have estimated covariance matrix \(\widehat V\). For a one-unit increase in \(X\), the estimated log hazard ratio at \(t\) is \(\hat\theta(t)=\hat\beta_1+\hat\beta_2g(t)\), with
A Wald confidence interval for the log hazard ratio is \(\hat\theta(t)\pm z_{1-\alpha/2}SE\{\hat\theta(t)\}\), where \(z_{1-\alpha/2}\) is the corresponding standard-normal quantile. Exponentiating both endpoints gives an interval for the hazard ratio. The interval is specific to the selected time; it is not a simultaneous band for the whole time-varying effect.
To test whether this model has a nonproportional effect for \(X\), test \(H_0:\beta_2=0\) against \(H_a:\beta_2\ne0\). A Wald statistic is \(Z=\hat\beta_2/SE(\hat\beta_2)\), or equivalently \(Z^2\), which is compared with a chi-square distribution with one degree of freedom. A likelihood-ratio or score test can also test the interaction. A small p-value is evidence against the specified proportional-effect model in favor of this time-interaction model; it does not prove that the selected time function is correct.
Worked Example: A Time-Specific Interval and Interaction Test
Suppose a hypothetical cause-specific Cox fit uses \(g(t)=\log(t/6)\), and returns \(\hat\beta_1=0.40\), \(\hat\beta_2=-0.25\), \(\widehat{\operatorname{Var}}(\hat\beta_1)=0.040\), \(\widehat{\operatorname{Var}}(\hat\beta_2)=0.010\), and \(\widehat{\operatorname{Cov}}(\hat\beta_1,\hat\beta_2)=-0.012\). At 12 months, \(g(12)=0.6931\), so the estimated log hazard ratio is $$ \hat\theta(12)=0.40-0.25(0.6931)=0.2267. $$
Its estimated variance is $$ 0.040+(0.6931)^2(0.010)+2(0.6931)(-0.012) =0.02817, $$ so \(SE=\sqrt{0.02817}\approx0.1678\). A 95% Wald interval on the log scale is $$ 0.2267\pm1.96(0.1678)=[-0.1023,\ 0.5557]. $$
Exponentiating gives a 95% confidence interval for the 12-month cause-specific hazard ratio of approximately \([0.903,\ 1.743]\), with point estimate \(\exp(0.2267)\approx1.254\). The interval includes 1, so these data do not establish a difference in cause-specific hazards at 12 months at the two-sided 5% level. It is not a 95% probability statement about the fixed parameter.
For proportionality, \(SE(\hat\beta_2)=\sqrt{0.010}=0.100\), and $$ Z=\frac{-0.25}{0.100}=-2.50,\qquad Z^2=6.25. $$ Against a chi-square distribution with 1 degree of freedom, the two-sided Wald p-value is about 0.0124. At \(\alpha=0.05\), this is evidence that the proportional-effect restriction \(\beta_2=0\) is inadequate under this model. It does not establish that the log-time interaction is the only or best possible time pattern.
Assumptions, Diagnostics, and Alternatives
The model requires a suitable cause-specific risk set and an appropriate censoring assumption: conditional on included covariates, censoring should not carry unmodeled information about future event times relevant to the cause-specific analysis. The specified \(g(t)\) must be appropriate enough to describe how the log hazard ratio changes. Other covariate effects left without time interactions are still assumed proportional on the cause-specific hazard scale. There must also be enough cause-\(k\) events and covariate overlap over time to estimate the interaction with useful precision. With no observations or events in a time region for one exposure group, the effect there is unsupported by the data, even if the equation returns a numerical prediction.
Inspect proportionality diagnostics for the cause-specific Cox model, plots of estimated time-specific effects, and the distribution of cause-\(k\) events and risk-set membership over time. For a log-time interaction, a plot of \(\hat\theta(t)\) or \(\exp\{\hat\theta(t)\}\) across the observed follow-up can reveal whether the assumed smooth change is plausible. Large uncertainty late in follow-up, abrupt unstable swings, or sensitivity to a small number of events are warnings. Check that the time scale and reference time are meaningful and that the interaction function was selected for a substantive or diagnostic reason rather than repeatedly searching until a small p-value appears.
A proportional cause-specific Cox model is simpler and more precise when its constant effect is adequate. An interaction with a prespecified function such as \(\log(t/t_*)\) represents gradual change with relatively few parameters. A piecewise effect can allow different effects in prespecified time intervals, but depends on cut points and can be imprecise when events are sparse. These approaches model the cause-specific hazard; Fine-Gray regression instead targets the subdistribution hazard and should not be treated as a substitute interpretation of the same coefficient.
A statistically detectable interaction need not be clinically important, and a nonsignificant interaction is not proof of proportionality. Confidence intervals can be wide when cause-specific events are few, particularly at later times. Finally, a time-varying cause-specific hazard ratio is not a time-varying risk ratio: the cumulative incidence for a cause also depends on the other cause-specific hazards.
Common Mistakes
- Reporting \(\exp(\beta_1)\) as the effect at every time. With an interaction, the one-unit hazard ratio is \(\exp\{\beta_1+\beta_2g(t)\}\); \(\exp(\beta_1)\) applies only where \(g(t)=0\).
- Ignoring covariance when forming an interval. The variance of \(\hat\beta_1+g(t)\hat\beta_2\) includes \(2g(t)\widehat{\operatorname{Cov}}(\hat\beta_1,\hat\beta_2)\).
- Calling the result a risk ratio or causal effect. It is a conditional cause-specific hazard ratio; causal interpretation requires additional design and identification assumptions.
- Assuming a significant interaction validates its shape. The test evaluates \(\beta_2=0\) for the specified \(g(t)\); it does not validate that function or guarantee stable estimates throughout follow-up.
- Extrapolating beyond observed follow-up. The fitted formula can be evaluated at later times, but without supporting risk sets and events such a value may be unreliable.
Check Your Understanding
Answer each question, then compare with the brief solutions below.
- For \(g(t)=\log(t/4)\), what does \(\beta_1\) represent for a one-unit increase in \(X\)?
- If \(\beta_1=0.20\), \(\beta_2=0.10\), and \(g(t)=2\), calculate the one-unit cause-specific hazard ratio.
- What null hypothesis tests proportionality for the covariate in this model?
- Why is \(\exp\{\beta_1+\beta_2g(t)\}\) not generally a cumulative-incidence ratio?
Solutions. (1) Since \(g(4)=0\), \(\beta_1\) is the log cause-specific hazard ratio at time 4 in the chosen time units; the hazard ratio is \(\exp(\beta_1)\). (2) The log hazard ratio is \(0.20+0.10(2)=0.40\), so the ratio is \(\exp(0.40)\approx1.492\). (3) Test \(H_0:\beta_2=0\), against a nonzero interaction. (4) A cumulative incidence depends on the event process over time and on the hazards of competing causes; this model’s ratio compares instantaneous cause-specific hazards among those still event-free at time \(t\).