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.
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.
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.
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.
The Core Equation
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.
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):
How to Fit a Cox Model
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:
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
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?