Checking Proportional Hazards
In Lesson 3 Dr. Rao's Cox model handed her one clean number: a hazard ratio of 0.36 for her new drug, still protective after adjusting for age. One number for the whole two years. It was only trustworthy because of a quiet promise buried in the model: that the drug's edge stays a fixed multiple of the baseline risk at every moment of follow-up.
This lesson tests that promise. You will see what happens when it fails, learn the residual that makes the failure visible, run the one-line test that puts a p-value on it, and repair a broken model so it tells the truth about time.
By the end of this lesson you will be able to:
- Say what proportional hazards actually claims, and recognize a violation when you see one
- Read a Schoenfeld residual plot and run
cox.zph()to get an honest verdict, covering which variable is at fault - Fix a violation by letting a hazard ratio change over time, and know when to stratify instead
Prerequisites: Lesson 3 (the Cox model \(h(t\mid x)=h_0(t)\exp(\beta'x)\), the hazard ratio \(\exp(\beta)\), and reading coxph output), plus Lesson 1 (the hazard, censoring, Surv()) and Lesson 2 (the at-risk set). You can run R and read a coefficient table.
What proportional hazards really claims
Start with the assumption itself, stated plainly. A hazard ratio compares two groups' risk-of-the-moment. Proportional hazards is the claim that this ratio is one fixed number that never changes with time. Surgery patients, say, might carry \(\text{HR}=1.5\) times the hazard of medical patients, and the claim is that it is 1.5 at month 1, at month 12, and at month 30, forever.
Written with the two hazards, for a covariate value that raises the log-hazard by \(\beta\):
\[ \frac{h_1(t)}{h_0(t)} = e^{\beta} \quad\text{for every time } t. \]
The \(t\) has dropped out of the right side. That is the whole assumption: the ratio has no \(t\) in it. And it has a clean visual consequence for survival curves, the one you toggled on the cover. If one hazard is a constant multiple of the other, then one survival curve is the other raised to a power:
\[ S_1(t) = S_0(t)^{\text{HR}}. \]
Raising a curve that lives between 0 and 1 to a power pulls it up (if \(\text{HR}<1\)) or down (if \(\text{HR}>1\)), but it can never make the two curves touch or swap places. Under proportional hazards, the survival curves never cross.