Cox Proportional Hazards — Regression Model for Time-to-Event Data

Statistics
Introduced by
Sir David Roxbee Cox
Year
1972
Type
Semi-parametric regression model
Family
Clinical / epidemiology

What does it do?

The Cox proportional hazards model is a semi-parametric regression method that estimates how one or more covariates affect the hazard, the instantaneous rate of an event such as death, relapse, or failure, without assuming a particular shape for the baseline hazard function.

David Cox introduced it in 1972, and it is widely used for multivariable survival analysis in clinical and epidemiological research.

The intuition behind the method

Suppose you want to know whether age and treatment type jointly affect how quickly patients reach remission. The Cox model can answer this without requiring you to specify whether the underlying risk rises, falls, or stays flat over time. It works by using the order in which events occur and estimating which covariate patterns are associated with earlier events. The proportional hazards assumption means that the ratio of hazards between two individuals with different covariate values stays constant over time: if a treated patient's instantaneous rate of recovery is twice that of an untreated patient at month 3, that ratio of rates is assumed to remain two at month 12. This is a statement about instantaneous rates, not about cumulative probabilities of recovery. Each coefficient is reported as a hazard ratio. For a continuous covariate with a log-linear effect, an HR of 1.5 means a 50 % higher instantaneous event rate for each one-unit increase in that covariate. For a binary covariate, the HR compares the exposed group with the reference group.

History

David Cox published the model in 1972 in the Journal of the Royal Statistical Society, Series B. In that paper the hazard is a function of covariates and unknown regression coefficients multiplied by an arbitrary, unknown function of time, and inference on the coefficients rests on a conditional likelihood, so covariate effects can be estimated without specifying the baseline hazard. Later extensions, including time-varying covariates, stratified baselines, and frailty (random effect) terms, are used for clustered, recurrent-event, and competing-risks settings.

When to use it

Use the Cox model when your outcome is time-to-event, censoring is present (not all participants experience the event), and you need to adjust for covariates. It is a common multivariable method for cohort studies, clinical trials, and registry analyses with survival endpoints. Do not use it when the proportional hazards assumption is severely violated across covariates; an accelerated failure time model or flexible parametric alternatives may be more suitable. Avoid it when events are very rare relative to the number of covariates, since fewer than 10 events per predictor is a recognised rule of thumb for instability. For a single exposure without covariates, Kaplan-Meier curves with log-rank tests are simpler and sufficient.

Limitations and considerations

  • The proportional hazards assumption must hold. If hazard ratios change over follow-up, the single reported HR is a summary that can mislead about the effect at specific times.
  • The model gives relative hazards; producing absolute survival time predictions requires an additional estimate of the baseline hazard.
  • Performance degrades when events are sparse relative to covariates, and overfitting risk rises with fewer than 10 events per predictor.
  • Censoring must be non-informative. If patients leave follow-up because they are deteriorating, the hazard estimates are biased.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Makes no assumption about the shape of the baseline hazard, so the same model applies without choosing a survival time distribution.
  • Handles right-censoring directly, which is common in clinical follow-up data.
  • Produces hazard ratios that quantify the relative effect of each covariate on the instantaneous event rate.
  • Can be extended to stratified baselines, time-varying covariates, and clustered data through frailty terms.
  • Implemented in major statistical packages (R, Stata, SAS, SPSS), with established residual-based diagnostics for checking assumptions.

Applications

  • Assessing the effect of treatment allocation on overall survival or progression-free survival in randomised clinical trials.
  • Identifying prognostic factors for disease recurrence or mortality in cancer registry and hospital cohort studies.
  • Estimating the association between occupational exposures and time to chronic disease onset in occupational epidemiology.
  • Modelling time to hospital readmission after adjusting for age, comorbidities, and discharge status in health services research.
  • Evaluating device or implant failure rates adjusted for patient-level risk factors in biomedical engineering studies.

How it works

How it works

1

Before modelling, verify the proportional hazards assumption for each covariate using Schoenfeld residual plots or a formal test (correlation of scaled residuals with time). Also check for near-zero event rates in covariate strata, extreme outliers in follow-up time, and whether the censoring mechanism is non-informative, since informative censoring invalidates standard inference.

2

Write the hazard function as h(t|X) = h_0(t) * exp(b_1*X_1 + ... + b_p*X_p), where h_0(t) is the unspecified baseline hazard and the b_i are log-hazard coefficients to be estimated. Select covariates based on subject-matter theory or prior literature, not purely on univariable p-values; include known confounders regardless of significance.

Formula
h(t|X) = h_0(t) * exp(b_1*X_1 + ... + b_p*X_p)
3

Coefficients are estimated by maximising the partial likelihood, which conditions on the observed event order so that the baseline hazard cancels out. For distinct event times t_j with covariate vectors X_j, the partial likelihood is L(b) = ∏_j exp(b'X_j) / Σ_{l in R(t_j)} exp(b'X_l), where R(t_j) is the risk set of subjects still under observation just before t_j. Cox (1972) obtains the estimator from a conditional likelihood. Because the baseline hazard drops out, no distributional assumption about survival time is needed, which is the source of the term 'semi-parametric'. Tied event times are handled by approximations such as Breslow or Efron. Some implementations use other corrections; for example, mgcv's cox.ph uses Peto's correction for ties. Check which tie method the software applies and report it.

4

Evaluate overall model significance with log-likelihood ratio, Wald, and score tests. Check the influence of individual observations with dfbeta residuals, and assess the functional form of continuous predictors using martingale residuals. If the proportional hazards assumption is violated for a covariate, consider stratifying by that variable or adding a time-interaction term.

5

Exponentiate each coefficient to obtain a hazard ratio: HR = exp(b_i). An HR above 1 indicates a higher instantaneous event rate at every time point, and an HR below 1 indicates a lower one. This does not by itself translate into a specific ratio of survival times or cumulative probabilities. Report HRs with 95 % confidence intervals and two-sided p-values. The HR is a ratio of instantaneous rates, not a risk ratio, and this distinction should be stated plainly for non-specialist readers.

Formula
HR = exp(b_i)

Common pitfalls

  • Ignoring the proportional hazards assumption. Not testing it, for example with Schoenfeld residuals, can leave violations undetected, and these can distort the hazard ratio estimates across the whole follow-up period.
  • Treating the hazard ratio as a risk ratio. The HR is an instantaneous rate ratio, not a cumulative risk ratio, and translating it into absolute risk language misleads clinical audiences.
  • Overfitting by entering many covariates relative to the number of events. This inflates type I error and produces unreliable confidence intervals.
  • Ignoring tied event times. Breslow and Efron are the common approximations. Breslow is adequate for few ties, but substantial ties call for the Efron approximation or an exact method. The default differs between software packages, so check which approximation was used and report it.

Frequently asked questions

What is the proportional hazards assumption and how do I test it?

The assumption states that the hazard ratio between any two covariate patterns is constant over time. Test it by plotting scaled Schoenfeld residuals against time for each covariate; a roughly flat line is consistent with the assumption. The cox.zph() function in R's survival package provides both the plot and a formal correlation test. A significant p-value indicates a violation that should be addressed by stratification or a time-interaction term. A non-significant test does not prove the assumption holds, so judge it together with the plot and with the clinical plausibility of constant hazard ratios.

When should I prefer a parametric survival model over the Cox model?

If subject-matter knowledge strongly supports a specific distribution for survival times (for example, Weibull for device failure), a fully parametric model is more efficient and gives direct predictions of median or mean survival time. The Cox model is preferable when you are agnostic about the hazard shape or when robustness to that choice matters more than efficiency, which is common in clinical research.

Can I use the Cox model with time-varying covariates?

Yes. The counting-process formulation of the Cox model accommodates covariates whose values change during follow-up, such as updated laboratory values or treatment switches. The dataset must be restructured into a start–stop interval format for each observation window. This is supported in R (survival package), Stata, and SAS.

How many events do I need?

A widely used heuristic is at least 10 events per predictor variable (EPV). Below this threshold, coefficient estimates can become unstable, confidence intervals widen, and the model may fail to converge reliably. For models with many candidate covariates, penalised regression (ridge, LASSO) or formal shrinkage methods can improve stability when EPV is low.

What is the difference between the Cox model and competing risks analysis?

When only one type of event is possible, the standard Cox model applies. Competing risks arise when a subject can experience one of several mutually exclusive events, such as cancer-specific death or death from other causes. Here, cause-specific Cox models or the Fine-Gray subdistribution hazard model are the appropriate tools. Cause-specific hazards do not by themselves give cumulative incidence, so they need to be interpreted with that in mind.

Related methods

Sources

  1. Cox, D. R. (1972). Regression models and life-tables. Journal of the Royal Statistical Society: Series B (Methodological), 34(2), 187–202.

    Open DOI reference
  2. Collett, D. (2015). Modelling Survival Data in Medical Research (3rd ed.). CRC Press.

    ISBN: 978-1439856789