The Cox model and what a hazard ratio means
Today let's understand the Cox model, the method researchers reach for most often when comparing how fast an event happens between two groups, and the one number it hands back at the end, the hazard ratio.
Here is the trial we will use throughout this lesson. A hospital runs a 24-month trial on 30 patients with a chronic condition. Fifteen patients get standard care, and fifteen get a new drug. Every patient is followed for up to 24 months, and for each one the hospital records whether the condition came back and, if so, when, or else notes that the patient was still being followed with no return yet when the trial ended.
The chart below plots, for each arm, the share of patients who have not yet had the condition return, at every month of follow up.
Both curves start at 1, since nobody has had the condition return yet at month zero, and both fall as more patients do. By month 24 the two curves have drifted noticeably apart, the new drug's curve sitting above standard care for almost the whole 24 months.
Why the Cox model needs no assumption about survival time
Before writing the model down, one definition comes first. The hazard at a moment t is the instantaneous risk that the event happens right at t, given that it has not happened before t. A higher hazard means higher risk right then, not over the patient's whole follow-up.
The Cox model writes the hazard for patient i, at time t, as this.
\[ h_i(t) = h_0(t)\, e^{\beta x_i} \]
- \(h_i(t)\) is the hazard for patient i at time t.
- \(h_0(t)\) is the baseline hazard, a function of time only, the same for every patient in the trial.
- \(\beta\) is a single coefficient the model estimates.
- \(x_i\) is 0 for a patient on standard care and 1 for a patient on the new drug.
Notice what \(h_0(t)\) is doing. It is left completely unspecified. The model never says whether it rises, falls, or wiggles over the 24 months. It only has to be the same function for every patient, whichever arm they are in.
That is why the ratio of two patients' hazards comes out so clean. Take a new-drug patient and a standard-care patient, both still being followed at the same moment t.
\[ \frac{h_{\text{new}}(t)}{h_{\text{standard}}(t)} = \frac{h_0(t)\, e^{\beta \times 1}}{h_0(t)\, e^{\beta \times 0}} = e^{\beta} \]
The unspecified \(h_0(t)\) sits in both the top and the bottom, and cancels exactly. Whatever shape it has, the ratio comes out to \(e^{\beta}\) at every single moment of the trial. That constant, \(e^{\beta}\), is the hazard ratio, written HR.
This is why the Cox model is called semiparametric. It estimates \(\beta\), one real number, without ever assuming the trial's survival times follow a particular distribution such as exponential or Weibull. A model that had to assume a shape for \(h_0(t)\) would need that assumption to be right before any of its numbers could be trusted. The Cox model sidesteps the question entirely.