Red Door Analytics
Resources · Primer

What a hazard ratio means when hazards are not proportional

What a Cox hazard ratio estimates when the effect changes over time, why it depends on follow-up, and what to report with it or instead.

Primer5 min read

When hazards are not proportional, the hazard ratio from a Cox model is roughly a weighted average of a hazard ratio that changes over follow-up. The weights depend on when events happen, on censoring and on how long the study ran, so the same treatment can give different hazard ratios in different studies. Report how the effect changes over time, or summaries with a fixed meaning, such as survival differences at chosen times or restricted mean survival time.

What the single number averages

Under proportional hazards, the hazard ratio is the same at every point in follow-up, and a Cox model estimates it. When the true hazard ratio changes with time, written HR(t), the model still returns one number, without warning. That number can be read, approximately, as a weighted average of the log hazard ratio over follow-up (Xu and O’Quigley, 2000), which is why it is often called an average of the time-specific hazard ratios (Stensrud and Hernán, 2020).

The analyst does not choose the weights. Without censoring, the estimate approximates an average weighted by when events happen; with censoring, it converges to a quantity that also depends on the censoring (Xu and O’Quigley, 2000). People who are censored early are missing from later risk sets, so a study with shorter follow-up gives later periods less weight, or none. Two studies of the same treatment in the same population can therefore estimate different hazard ratios, however large they are (Uno et al., 2014).

An example where follow-up changed the answer

In the Women’s Health Initiative trial of combined oestrogen and progestin, the hazard ratio for coronary heart disease was 1.81 in the first year, between 1.25 and 1.45 in years two to five, and 0.70 from year six. The overall hazard ratio, after an average of 5.2 years, was 1.24. Had the trial stopped after one year, it would have been about 1.8 (Hernán, 2010). Each is an average over a different period.

Delayed, waning and crossing effects

  • Delayed effect. The hazard ratio is close to one at first and falls later. Chen (2013) describes this delayed separation of the Kaplan–Meier curves as a feature of most randomised trials of cancer immunotherapy; in one trial of ipilimumab in advanced melanoma, the curves did not separate until about four months. A single hazard ratio mixes the early period of no effect with the later benefit and understates that benefit, and a trial designed assuming proportional hazards can lose power.
  • Waning effect. The hazard ratio is furthest from one early and moves towards one, so the hazards converge. The longer the follow-up, the closer to one the single hazard ratio tends to be.
  • Crossing hazards. The hazard ratio is below one for a time and above one later, or the reverse. The average can sit near one, with a wide confidence interval, while the curves differ, as in the myeloma trial described in our RMST primer. Survival curves that cross imply that the hazards crossed earlier, but hazards can cross without the survival curves crossing.

Our hazard ratio tool simulates each pattern and shows what a Cox model would report against the hazard ratio over time, survival and RMST.

A caution about hazard ratios over time

A hazard ratio at a later time compares the people still event-free in each group. If treatment brings forward events among the most susceptible, the treated people still at risk are less susceptible than the controls still at risk. Hernán (2010) showed this could explain the Women’s Health Initiative hazard ratio falling below one after year five, even if hormone therapy protected no woman at any time. The same drift towards one occurs when treatment multiplies every person’s hazard by the same amount but people differ in risk (Aalen, Cook and Røysland, 2015). A changing HR(t) describes how the surviving groups differ, which need not be how treatment acts on any one person, and hazard ratios for later periods of a trial are not randomised comparisons.

How to estimate a hazard ratio that changes

  • A flexible parametric model with a time-varying effect. The log cumulative hazard is a spline of log time, and interactions between treatment and spline terms in log time let the hazard ratio change smoothly (Royston and Parmar, 2002). Plot HR(t) with its confidence interval, and predict survival and RMST from the same model. Our merlin package for Stata fits such models and predicts the hazard ratio, survival difference and RMST difference at any time.
  • A Cox model with a time-varying effect. Add an interaction between treatment and a function of time, fitted as a time-varying covariate. The proportional hazards primer explains how, and how not to.
  • Piecewise hazard ratios. Split follow-up at cut-points chosen in advance and estimate a hazard ratio in each period. This is simple to present, and the caution above applies to the later periods.

What to report instead

Testing the assumption, and reporting the single hazard ratio if the test passes, does not solve the problem. Hazards are rarely exactly proportional (Stensrud and Hernán, 2020), and a test can miss an important departure in a study with few events and flag a trivial one in a large study (Uno et al., 2014). Choose the summaries for the question, in advance:

  • the Kaplan–Meier curves, with numbers at risk;
  • the hazard ratio over time, from a model that lets it change, with confidence intervals;
  • differences in survival, or in risk, at times chosen in advance, as Stensrud and Hernán (2020) recommend;
  • the RMST difference up to a horizon chosen in advance, which summarises the curves to that point in units of time;
  • if a single Cox hazard ratio is given, a statement that it averages over this study’s follow-up, and how long that was.

Want to learn more?

Need this applied to your own data?

Tell us what you're modelling and we'll point you to the closest worked example — or build one with you.

Get in touch Start a project