Survival › Time-to-event

Cox proportional hazards regression

Cox proportional-hazards regression models the hazard ratio of an event as a multiplicative function of predictors, without specifying the shape of the baseline hazard.

What is Cox proportional hazards regression?

The Cox model writes the hazard h(t | X) as h₀(t) · exp(β'X). The baseline hazard h₀(t) is left unspecified ("semi-parametric"), and β is estimated via the partial likelihood — the conditional probability that the failing subject at each event time is the one observed to fail, given the risk set.

The big assumption is *proportional hazards*: the ratio of hazards between any two subjects is constant over time. Check via Schoenfeld residuals: a non-significant global test and roughly horizontal Schoenfeld plots support PH; sloping plots or a significant test mean the HR is time-varying and you need coxph_tt (time-transform interaction) or coxph_tv (start-stop formulation).

Cox gives you HR with CI for each predictor — interpretable as the multiplicative effect on the hazard, adjusted for other covariates. It does not directly give you survival probabilities at specific times; for that, predict from the model or use parametric_surv.

When should I use Cox proportional hazards regression?

  • Time-to-event outcome with covariate-adjusted effect estimation.
  • Default modern model for survival data; rare to need anything else as a first pass.
  • Switch to fine_gray when there are competing risks.

What data does it need?

Time + event + one or more predictors.

What does it report?

HR + 95% CI + p per predictor, concordance (c-index), univariable + multivariable forest plot, Schoenfeld PH test in the diagnostics block.

What does it assume?

  • Proportional hazards (Schoenfeld test).
  • Independent observations.
  • No tied event times (or use Efron / exact handling — Efron is the default).
  • Linearity of log-hazard in continuous predictors (check with martingale residuals or splines).

Formula

h(t | X) = h₀(t) · exp(β'X); HR = exp(β)

How do I interpret the result?

HR = 1 ⇒ no effect; HR = 2 ⇒ doubled hazard. CIs that don't cross 1 are statistically significant at α = 0.05.

Concordance (c-index) ≈ AUC for survival data — 0.5 = no discrimination, 1 = perfect. > 0.7 is good for clinical models.

Schoenfeld test global p < 0.05 ⇒ PH violated for at least one covariate. Per-predictor p tells you which; respond with coxph_tt for the offending term or stratify on it.

See also

References

  • Cox (1972). Regression models and life-tables. JRSS B 34(2).