01 / 21

Cox Proportional
Hazards Model

Understand the most widely used survival analysis technique in biostatistics: modeling how covariates affect the rate of an event over time.

Biostatistics

What is Survival Analysis?

Survival analysis is a branch of statistics that studies the time until an event occurs: death, disease relapse, machine failure, or any well-defined endpoint. Unlike ordinary regression, it handles a unique challenge called censoring: when a subject leaves a study before the event happens.

Event
The outcome of interest, such as death or relapse
Survival Time
Duration from study entry until the event occurs
Censoring
Subject leaves or study ends before the event is observed

The Hazard Function \( h(t) \)

The hazard function describes the instantaneous rate of the event occurring at time \( t \), given that the subject has survived up to that point. Think of it as: "Right now, how risky is this moment?"

Visualizing Survival Curves

The survival function \( S(t) \) gives the probability of surviving past time \( t \). It always starts at 1 and decreases. Different groups (e.g., treatment vs. control) produce different curves.

0.0 0.5 1.0 0 2 4 6 8 Time (years)
\( S(t) \)
Treatment Control Censored

Why the Cox Model?

In clinical research, we rarely just compare two groups. We want to know: How does age, treatment, and tumor size together affect survival? The Cox model answers this by relating multiple covariates to the hazard, without requiring us to specify the exact shape of the baseline hazard.

Multiple Covariates
Adjust for age, sex, treatment, lab values simultaneously
Semi-parametric
No need to assume a specific distribution for survival times
Handles Censoring
Properly accounts for incomplete observations in the data

The Core Equation

\( h(t \mid \mathbf{X}) \)
Hazard at time \( t \) for a subject with covariates \( \mathbf{X} \)
\( h_0(t) \)
Baseline hazard: the hazard when all covariates equal zero
\( \exp(\beta_i X_i) \)
Covariates multiply the baseline hazard by exponential factors

The Proportional Hazards Assumption

The ratio of hazards between any two groups must remain constant over time. If treatment cuts the hazard in half at year 1, it must also cut it in half at year 5.

Time
\( h(t) \)
2x 2x
Baseline \( h_0(t) \)
Higher-risk group

Parametric vs. Semi-parametric

Parametric Models Cox Model
Baseline hazard Must specify a distribution (e.g., Weibull, exponential) Left completely unspecified
Flexibility Less flexible: wrong distribution = biased results More flexible: works without distributional assumption
Estimation Maximum likelihood Partial likelihood
Output Full hazard function + survival predictions Hazard ratios (relative effects)
Use case When distribution is known General-purpose survival regression

The Hazard Ratio

The most important output of the Cox model is the hazard ratio (HR). For a single binary covariate \( X \) (e.g., treatment = 1, control = 0):

HR > 1
The covariate increases the hazard (worse prognosis)
HR < 1
The covariate decreases the hazard (protective effect)
HR = 1
No effect: the covariate does not change the hazard

How to Fit a Cox Model

1
Define your data. You need three things for each subject: survival time \( t_i \), event indicator \( \delta_i \) (1 = event, 0 = censored), and covariate values \( X_i \).
2
Check the proportional hazards assumption. Plot log-log survival curves for categorical predictors: they should be roughly parallel. Use Schoenfeld residuals for continuous predictors.
3
Estimate coefficients. The model uses partial likelihood to estimate \( \beta \) values without needing \( h_0(t) \).
4
Interpret the results. Exponentiate each \( \beta \) to get the hazard ratio: \( HR = e^{\beta} \). Report with 95% confidence intervals and p-values.
5
Validate. Check model fit using concordance index (C-statistic), Cox-Snell residuals, and influence diagnostics.

Example 1: Single Covariate

A clinical trial compares a new drug (Treatment = 1) vs. placebo (Treatment = 0) for cancer survival. The Cox model yields: \( \hat{\beta} = -0.693 \).

Example 2: Multiple Covariates

A heart disease study fits a Cox model with two predictors. The estimated model is:

Age: \( \hat{\beta}_1 = 0.04 \)
\( HR = e^{0.04} \approx 1.04 \). Each additional year of age increases the hazard by 4%.
Exercise: \( \hat{\beta}_2 = -0.50 \)
\( HR = e^{-0.50} \approx 0.61 \). Regular exercise reduces the hazard by 39%.

Example 3: Comparing Two Patients

Using the model from Example 2, compare Patient A (Age = 60, Exercise = 1) and Patient B (Age = 70, Exercise = 0).

How Partial Likelihood Works

The genius of the Cox model is its partial likelihood: it estimates \( \beta \) by looking only at the order of events, not exact times. At each event time, it asks: "Of all subjects still at risk, what's the probability this one had the event?"

Common Mistakes

✕ Ignoring the PH Assumption
If the hazard ratio changes over time (curves cross), the Cox model gives misleading results. Always check before fitting.
✕ Interpreting HR as Risk Ratio
HR = 2 does not mean "twice as likely to get the disease." It means the instantaneous rate is doubled. These are different quantities.
✕ Confusing HR < 1 with "No Effect"
HR = 0.80 is a 20% reduction in hazard, which may be clinically meaningful. Only HR = 1 means no effect.

Summary: Key Concepts

Concept Symbol / Formula Meaning
Hazard function \( h(t) \) Instantaneous event rate at time \( t \)
Baseline hazard \( h_0(t) \) Hazard when all covariates = 0
Cox model \( h_0(t) \cdot e^{\beta^\top X} \) Covariates multiplicatively scale the hazard
Hazard ratio \( e^{\beta} \) Relative change in hazard per unit increase
PH assumption \( \text{HR} = \text{constant} \) Ratio of hazards is the same at all times
Partial likelihood \( L(\beta) \) Estimates \( \beta \) without specifying \( h_0(t) \)

Question 1 of 5

In the Cox proportional hazards model, what does the baseline hazard \( h_0(t) \) represent?

Question 2 of 5

A Cox model estimates \( \hat{\beta} = 0.693 \) for a binary treatment variable. What is the hazard ratio, and what does it mean?

Question 3 of 5

Why is the Cox model called "semi-parametric"?

Question 4 of 5

You observe that the survival curves for two treatment groups cross each other at year 3. What does this suggest?

Question 5 of 5

In the partial likelihood formula, why does the baseline hazard \( h_0(t) \) cancel out?