Skip to content
Scintria
ToolsGrant writerFunding
HomeLiteratureClinical trialsEvidence LabProtocol packData analysisLearnProjectsLibraryReferencesApplications
Start free
ScintriaStart free

Learn / Biostatistics / Survival analysis

The Cox proportional hazards model

14 minute read · 6-question quiz

Download this lesson as a colour Word or PDF study guide with the figures and answers. Included in paid plans; reading and quizzes stay free.Sign in

What you will learn

  • Interpret a Cox regression table of hazard ratios

  • State and check the proportional hazards assumption

  • Adjust for covariates and understand time-varying effects

The log-rank test gives a p-value and cannot adjust for age, sex or disease stage. The Cox proportional hazards model (Sir David Cox, 1972) is the regression model for survival data. It models the hazard at time t as

h(t | X) = h_0(t) × exp(β_1 X_1 + β_2 X_2 + …)

  • h_0(t), the baseline hazard, is the hazard when all X are zero. Its shape over time is left unspecified; this is what makes the model 'semi-parametric' and flexible.
  • exp(β_j) is the hazard ratio for a one-unit increase in X_j, holding the others constant.
  • The model assumes the HR is constant over time (proportional hazards).

Reading a Cox table

A cohort of 1,200 adults starting ART, with time to death, 180 deaths (illustrative figures).

VariableHR95% CIp
Female (vs male)0.720.53 to 0.980.04
Age, per 10 years1.261.10 to 1.44<0.001
CD4 < 100 at start (vs ≥ 100)2.401.76 to 3.27<0.001
TB at start (vs none)1.851.30 to 2.63<0.001

Interpretation. At any time after ART start, women have 28% lower hazard of death than men of the same age, CD4 and TB status. Each additional 10 years of age raises the hazard by 26%. Starting with CD4 below 100 more than doubles the hazard (HR 2.4). Because HRs multiply, a man with CD4 < 100 and TB has a hazard 2.40 × 1.85 = 4.4 times that of a man with higher CD4 and no TB.

StudyEstimate (95% CI)Female (vs male)0.72 (0.53–0.98)Age, per 10 years1.26 (1.1–1.44)CD4 < 1002.4 (1.76–3.27)TB at start1.85 (1.3–2.63)12Hazard ratio (log scale)
A forest plot makes a Cox table easy to read: the further from 1, the stronger the association.

Checking proportional hazards

If the effect of a variable changes over time (for example, a surgical treatment has high early risk but long-term benefit), a single HR is wrong. Check by:

  1. Plotting log(-log(survival)) against log(time) for each group. Roughly parallel lines support proportionality.
  2. Schoenfeld residuals: a test of correlation between scaled residuals and time. A significant result flags non-proportionality.
  3. Eyeballing the KM curves: crossing curves are an obvious red flag.

If violated: stratify by the offending variable (separate baseline hazards for each stratum), include a variable-by-time interaction (a time-varying coefficient), split follow-up into periods and report a HR for each, or use restricted mean survival time.

Practical rules

  • Events, not participants, matter. Aim for at least 10 events per covariate (like logistic regression). 180 deaths would allow around 18 covariates; 20 deaths allows only 2.
  • Ties (several events at the same time) are handled by the Efron method in modern software.
  • Time scale and time zero: define a clear time zero (randomisation, not enrolment) and avoid beginning follow-up at a different point for different groups.
  • Time-varying covariates (e.g., current CD4) are allowed in extended Cox models, but those variables must be treated with care so as not to adjust away the effect of treatment.
  • Clustered data: if people come from the same site or household, use robust SEs or a frailty (random effect) model.
  • Prediction: a Cox model gives relative effects. To predict absolute risk at a time you also need the baseline survival.
Kaplan-Meier + log-rankCox regressionParametric (Weibull etc.)Describes and comparesgroupsNo adjustment forcovariatesNon-parametricStart hereAdjusts for covariatesHazard ratios with CIsAssumes proportionalhazardsPrimary analysis of manytrialsModels the whole hazardshapeAllows extrapolationCost-effectiveness modelsNeeds a good fit
Three levels of survival analysis.

Common errors

  1. Reporting a HR without checking proportionality.
  2. Treating HR as relative risk when reporting to a lay audience.
  3. Including 'time-dependent' information measured after baseline (such as treatment response) as a baseline predictor.
  4. Too many covariates for the number of events.
  5. Ignoring the fact that deaths unrelated to the condition act as competing risks.

Summary

  • Cox regression gives hazard ratios adjusted for covariates without specifying the baseline hazard.

  • Hazard ratios multiply across covariates and are assumed constant over time.

  • Check proportional hazards with log-log plots, Schoenfeld residuals and the KM plot.

  • Aim for about 10 events per covariate.

  • Report absolute survival alongside HRs.

Check your understanding

Question 1
1

In a Cox model, an HR of 1.26 per 10 years of age means:

Question 2
2

Two risk factors have HRs 2.0 and 1.5 and act independently on the log scale. A person with both has an HR of:

Question 3
3

Schoenfeld residuals are used to check:

Question 4
4

A Cox model is fitted with 25 events and 8 covariates. The main issue is:

Question 5
5

Which part of the hazard is left unspecified in a Cox model?

Question 6
6

If treatment benefit appears only after 6 months, the best response to a significant non-proportionality test is to:

Draft study guide. Spotted an error or something unclear? Tell us at hello@scintria.com. This is educational material, not clinical or regulatory advice.

Comparing survival curves: the log-rank test and hazard ratiosWhy sample size matters: the four ingredients of power