A log-rank test answers whether survival differs between groups. The test does not quantify the effect, adjust for other factors, or handle a continuous predictor like age.
Cox proportional hazards regression does all three. The model treats the hazard — the instantaneous rate of the event among those still at risk — as a baseline hazard multiplied by the combined effect of the covariates:
h(t | x) = h0(t) × exp(β1x1 + β2x2 + … + βpxp)
Here h0(t) is the baseline hazard, the event rate over time for a subject whose covariates are all zero, and the exponential term scales that baseline up or down. Because the covariates enter multiplicatively, exponentiating a coefficient gives a hazard ratio: the factor by which the hazard is multiplied for a one-unit increase in that covariate.
Cox regression is described as semi-parametric because it leaves h0(t) completely unspecified. The omission is the model’s central trick, and it is worth understanding rather than accepting.
Fitting uses a partial likelihood. At each time an event occurs, the method asks a narrow question: given that exactly one subject in the risk set had the event at this instant, what is the probability it was the subject who actually did? The answer is each subject’s hazard divided by the total hazard across everyone still at risk. Every one of those hazards contains the same h0(t) factor, so it cancels from top and bottom. The baseline hazard drops out of the arithmetic entirely.
Multiply those probabilities across all the event times and you have the partial likelihood, which depends only on the coefficients. Maximising it estimates the covariate effects without ever committing to a survival distribution — no exponential, no Weibull, no assumption about the shape of the underlying risk over time. That freedom is why Cox regression became the default for time-to-event data.
What the model does need is the data in the right shape: for each subject, a follow-up time, an indicator of whether that time ended in the event or in censoring, and the covariate values. Where two or more events share the same recorded time, the fit uses a correction for ties — Efron’s is the usual default and Breslow’s the simpler alternative — because the partial likelihood above assumes one event at a time.
A hazard ratio is multiplicative, read against 1. A ratio of 1 means the covariate makes no difference to the rate of the event. Above 1 it raises the hazard. A ratio of 1.07 per year of age means the event rate rises about 7% for each additional year. Below 1 it lowers it: a protective effect.
The confidence interval is what makes the estimate usable. An interval lying entirely above or entirely below 1 is a significant effect. An interval that crosses 1 is not significant, however far the point estimate sits from it, because the data are compatible with the covariate raising the hazard, lowering it, or doing nothing.
A crossing interval does not establish that there is no effect. A crossing interval means the study could not distinguish one, and those are different findings. A hazard ratio of 1.9 with an interval from 0.8 to 4.5 is an imprecise estimate of something possibly substantial. A hazard ratio of 1.02 with an interval from 0.97 to 1.07 is good evidence that any effect is small. Both cross 1, and only the second supports a claim of no important effect. Read the width, not just whether the line was crossed.
Because hazard ratios multiply, they belong on a log scale, where a doubling and a halving sit the same distance from 1.
The model reports a coefficient for each term with its confidence interval and a test against zero on the log-hazard scale. The exponentiated coefficients are hazard ratios on the natural scale.
Alongside the individual terms is a likelihood-ratio test of the whole model against a null model. The test is the survival equivalent of an overall F-test, and it says whether the covariates together explain the survival pattern. In the worked example that whole-model test is decisive. The individual hazard ratios then locate the effect: age and heart rate raise the hazard, and body-mass index and sex act in ways that depend on the rest of the model.
A common misreading is to quote one hazard ratio for a covariate when the model says the effect depends on another. The worked model includes a sex-by-age interaction, so no single hazard ratio for sex exists. The female-to-male ratio is 2.56 at age 40 and 0.79 at age 80.
The model also carries a squared body-mass-index term, so the effect of a five-unit rise in BMI is protective in the middle of the range (0.85 at BMI 25) and harmful at the top (1.46 at BMI 40). Neither is a quirk to average away. Each is the model reporting that the relationship is not a straight multiplicative constant.
When a model contains interactions or non-linear terms, quote the hazard ratio at stated levels of the other covariates, exactly as the hazard-ratio table does. A single number is wrong.
Everything above rests on one assumption in the name: the hazard ratio for a covariate is constant over time. The hazards for any two individuals stay in fixed proportion. When that holds, a single hazard ratio summarises the whole follow-up.
When it does not (a treatment effect that fades, a risk that only appears late), the reported ratio is a time-average that describes no particular moment, and it can mislead. Check the assumption. Do not just assume it. Residual diagnostics and a test of whether an effect varies with time will show you.
Check the assumption rather than assume it. Three approaches are standard, and they complement each other. A plot of Schoenfeld residuals against time should show no trend; a slope means the covariate’s effect is changing over follow-up, and the accompanying test puts a p-value on that. A log-minus-log survival plot for a categorical covariate should show roughly parallel curves. And adding a covariate-by-time interaction to the model tests directly whether the effect moves with time.
Where the assumption fails, the restricted mean survival time (the area under the survival curve up to a fixed horizon) gives an effect measure that needs no proportionality. Use that when the assumption is in doubt.
Quoting one hazard ratio when the model has an interaction. If the effect depends on another covariate, the ratio must be evaluated at stated levels of it. A single number hides the interaction the model went to the trouble of fitting.
Reading a hazard ratio as a risk ratio. A hazard ratio compares instantaneous rates, not cumulative probabilities. Over a long follow-up the two can diverge substantially.
Assuming proportional hazards rather than checking. When the assumption fails, the hazard ratio is a time-average that fits no single moment. Test it, and fall back on restricted mean survival time where it does not hold.
Treating a wide interval that crosses 1 as “no effect”. A non-significant covariate may be null or simply imprecisely estimated. The interval’s width tells you which.
Analyse-it fits proportional hazards models on your own time-to-event data, inside Excel:
Every feature from all five editions for 15 days. Survival analysis is in the Medical and Ultimate editions, from US$ 340 a year. Alongside Kaplan–Meier estimation and the group-comparison tests. Full detail in the survival and reliability reference guide.