Cox Proportional Hazards Regression

Statistics
Introduced by
Cox, D. R.
Year
1972
Type
Semi-parametric hazard regression model

What does it do?

Cox proportional hazards regression, introduced by D. R. Cox in 1972, is a semi-parametric model that relates one or more covariates to the hazard, the instantaneous rate of experiencing an event, while leaving the baseline hazard function unspecified.

It is a widely used multivariable method for time-to-event data, and its main output is a hazard ratio for each predictor, which compares event rates between covariate patterns.

The intuition behind the method

Imagine you want to know whether age, treatment assignment, and disease severity jointly affect how quickly patients reach an endpoint, such as death or relapse. Simple survival curves can show one group at a time but cannot simultaneously adjust for multiple predictors. Cox regression handles this by modelling the hazard at each moment as the product of a common baseline hazard shared by everyone and an exponential term that scales that baseline up or down according to each subject's covariate values. The key property is proportionality: the ratio of hazards between any two subjects stays constant over time, which means the covariates shift the baseline hazard curve by a fixed multiplicative factor throughout follow-up.

History

D. R. Cox proposed the regression model for censored failure times in his 1972 paper in the Journal of the Royal Statistical Society: Series B. As the paper's abstract describes, the hazard is modelled as a function of explanatory variables and unknown regression coefficients multiplied by an arbitrary, unknown function of time, and inference on the coefficients rests on a conditional likelihood. Later texts, including Therneau and Grambsch (2000), cover extensions and residual-based diagnostics for the model.

When to use it

Choose Cox regression when the outcome is a time to an event, some observations are right-censored, and you need to adjust several covariates at once, estimate adjusted hazard ratios, or build a multivariable prognostic model. It is less suitable when the proportional hazards assumption is clearly violated and no time-varying extension is planned, and when you have too few events to support the number of predictors. As a rule of thumb, about 10 or more events per predictor variable (EPV) is recommended; this is a heuristic guideline rather than a strict threshold, and no fixed minimum sample size is required. If competing risks are present, where a subject can experience one of several distinct event types and the cumulative incidence of one type is the target, a subdistribution hazard approach such as the Fine-Gray model is usually preferred.

Limitations and considerations

  • The estimated hazard ratio assumes that the effect of each predictor is constant over time; when it is not, the single coefficient is an average over follow-up and may be misleading.
  • Coefficient estimates become biased and imprecise when there are few events relative to the number of predictors, which is why the EPV guideline matters.
  • Standard Cox regression does not model competing risks directly; when other event types remove subjects from observation, a separate competing-risks model is needed.
  • Because the baseline hazard is left unspecified, the model gives relative effects directly but does not produce absolute survival probabilities without an additional estimation step.
  • Key assumptions: censoring must be non-informative, meaning it is unrelated to the hazard once the covariates are accounted for; continuous covariates are assumed to act linearly on the log-hazard scale, which can be checked with Schoenfeld-based or martingale residual plots or by modelling them with splines; and the time scale (for example, follow-up time or age) should be chosen to match the research question. Informative censoring can bias the estimated hazard ratios.
  • Tied event times are handled by an approximation. The Breslow method is reported as the tie-handling method in SAS PHREG output, and alternatives such as Efron's method can give different estimates when many events occur at the same time.

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

Strengths

  • The baseline hazard does not need to be specified, so the model does not impose a parametric shape on how risk changes over time.
  • The hazard ratio, exp(β̂), gives a directly interpretable multiplicative comparison of event rates between covariate patterns.
  • Right-censored subjects contribute to the estimation up to their censoring time, so the analysis uses their partial follow-up rather than discarding them.

Applications

  • Clinical trials and observational studies in which the outcome is time to death, relapse, or readmission, and adjustment for covariates is required.
  • Prognostic model development in clinical fields, where estimated hazard ratios are used to build risk scores.
  • Epidemiological cohort studies that relate exposures to the incidence of disease after adjustment for confounders such as age and sex.
  • Social science and economic studies of time to an event, such as time to re-employment, with adjustment for individual characteristics.

How it works

How it works

1

The model expresses the hazard for subject i at time t as the product of a baseline hazard h₀(t), which can take any shape and is not estimated explicitly, and an exponential linear predictor built from the covariates. Multiplying h₀(t) by exp(β₁x₁ + … + βₚxₚ) lets each covariate scale the hazard by a constant factor without fixing a parametric form for the time dependence.

Formula
h(t \mid \mathbf{x}) = h_0(t)\exp\!\left(\beta_1 x_1 + \beta_2 x_2 + \cdots + \beta_p x_p\right)
2

The regression coefficients β are estimated from a likelihood that uses only the ordering of observed event times, not the baseline hazard itself. At each event time t_i, the term compares the predictor score of the subject who had the event with the scores of all subjects still at risk in the risk set R(t_i). Multiplying these terms over all event times gives the function that is maximised to estimate β, so h₀(t) cancels out of the estimation.

Formula
L(\boldsymbol{\beta}) = \prod_{i:\,\delta_i=1} \frac{\exp(\boldsymbol{\beta}^\top \mathbf{x}_i)}{\sum_{j \in \mathcal{R}(t_i)} \exp(\boldsymbol{\beta}^\top \mathbf{x}_j)}
3

Once the coefficients are estimated, the hazard ratio for predictor k is exp(β̂_k). For a continuous covariate, a hazard ratio of 1.5 means that, at any point in time, a subject with one additional unit of x_k has a hazard 50% higher than the reference, under the proportional hazards assumption. The size of this change depends on the chosen unit. For a binary covariate, the hazard ratio compares the group coded 1 with the reference group coded 0, because the baseline hazard corresponds to covariate values of 0. The hazard ratio should be reported together with its 95% confidence interval.

Formula
\widehat{\mathrm{HR}} = \exp(\hat{\beta}_k)
4

The proportional hazards assumption requires that the ratio of hazards between any two covariate patterns is constant over time. If it is violated, the effect of a predictor changes as follow-up progresses, and a single hazard ratio summarises a time-varying effect. The assumption is usually checked with Schoenfeld residuals, using a test of their trend over time (cox.zph in R), and with a visual check of the log-log survival plot, where roughly parallel curves are expected under proportionality.

Formula
\frac{h(t \mid \mathbf{x}_1)}{h(t \mid \mathbf{x}_2)} = \exp\!\left[\boldsymbol{\beta}^\top(\mathbf{x}_1 - \mathbf{x}_2)\right] = \text{constant in } t

Common pitfalls

  • Interpreting the hazard ratios without first checking the proportional hazards assumption with Schoenfeld residuals.
  • Including many predictors relative to the number of events, which can produce unstable coefficient estimates and imprecise confidence intervals.
  • Reporting only p-values without the hazard ratios and their 95% confidence intervals, which carry the size and precision of the effect.
  • Treating deaths from other causes as ordinary censoring when competing risks are present, which can overstate the cumulative incidence of the event of interest.
  • Continuing with a standard Cox model when proportionality is clearly violated, instead of adding time-varying coefficients or using a stratified Cox model.

Frequently asked questions

What is a hazard ratio and how do I interpret it?

The hazard ratio (HR) for a predictor is exp(β̂), where β̂ is its estimated regression coefficient. An HR of 1.5 means that, under the proportional hazards assumption, subjects with one additional unit of a continuous predictor have a 50% higher instantaneous event rate than the reference group at any time point. For a binary predictor, the HR compares the group coded 1 with the reference group coded 0. An HR below 1 indicates a protective association. Report the HR with its 95% confidence interval, because a p-value alone does not convey the direction or size of the effect.

How do I check the proportional hazards assumption?

The usual approach is to compute Schoenfeld residuals for each covariate and test whether they trend with time, for example with the cox.zph function in R. A significant test for a covariate (p < 0.05) suggests that its hazard ratio is not constant over follow-up. As a visual check, plot log(−log) survival curves by group: if proportionality holds, the curves should be roughly parallel.

What should I do if the proportional hazards assumption is violated?

The options depend on the form of the violation. If a predictor's effect changes over time, a time-by-covariate interaction (a time-varying coefficient) can be added to the model. If a variable violates the assumption but its own effect is not of primary interest, the model can be stratified by that variable, giving each stratum its own baseline hazard. Accelerated failure time or parametric models are sometimes considered as alternatives, but they estimate different quantities, such as time ratios or differently scaled effects rather than hazard ratios. The choice of distribution in these models has implications for the hazard function and can lead to different interpretations, so switching models changes what the reported effect means.

When should I use Fine-Gray regression instead of Cox regression?

Fine-Gray regression is used when subjects can experience one of several distinct event types and the target is the cumulative incidence of one specific type. In that setting, treating other-cause events as ordinary censoring in a Cox model can overstate the cumulative incidence of the event of interest. The Fine-Gray model targets the subdistribution hazard, which corresponds to the cumulative incidence function, so the choice depends on the question being asked.

Related methods

Sources

  1. Cox, D. R. (1972). Regression Models and Life-Tables. Journal of the Royal Statistical Society: Series B, 34(2), 187–202.

    Open DOI reference
  2. Therneau, T. M. & Grambsch, P. M. (2000). Modeling Survival Data: Extending the Cox Model. Springer.

    ISBN: 978-0387987842