HealthEconomics.wiki — Knowledge infrastructure for health economics Draft v0.1.0 · for editorial review

HealthEconomics.wiki interactive explorer · Survival modelling

Cox Proportional Hazards Explorer

The Cox model estimates how treatment and patient characteristics multiply the event rate, without ever saying what the underlying rate looks like over time. Scale a hazard, fit a hazard ratio from four patients by hand, then see exactly where the model stops being able to tell you anything.

h(t | x) = h0(t) · exp(β1x1 + … + βpxp)

Three steps from model to economic evaluation

The Cox model is semi-parametric: the covariate part has a fixed algebraic form, while the baseline hazard h0(t) is left free. Work through the steps in order.

Content source: Cox Proportional Hazards — HealthEconomics.wiki (concept version 1.0.1, term code HE-EM-SM-008). All numbers in this tool are illustrative and teach mechanics only.

1 · How covariates scale an unspecified baseline hazard

For two people who differ by one unit in a covariate, the baseline hazard cancels and the hazard ratio is exp(β) at every time point. That constancy is the proportional hazards assumption. Change the baseline shape and β, then let the effect drift with time to see the assumption break.

Hazard scaling explorerConstant baseline, β = −0.50

Illustrative baseline hazard h0(t)

The Cox model never estimates this shape. It is drawn only so you can see the scaling.

Covariate effect
−1.501.5

Hazard ratio exp(β) = 0.61

Vertical axis

The published concept page reports Bradburn and colleagues' ovarian cancer example: β = −0.466 with a log-time interaction of 0.233, giving hazard ratios of about 0.74 at 2 years and 0.91 at 5 years.

Hazard over time for the reference group and the comparison group Hazard ratio over time

2 · Estimate β from risk sets with the partial likelihood

At each event time, ask how likely it was that the person who had the event, rather than anyone else still at risk, was the one to have it. Multiply those probabilities and choose the β that makes the observed order most likely. The baseline hazard appears in every numerator and denominator and cancels.

L(β) = ∏i=1…D   exp(xiβ) ⁄ Σj ∈ R(ti) exp(xjβ)

Partial likelihood workbenchPublished four-patient example

Trial patients (time in months; x = 1 for the new treatment, x = 0 for the comparator)
PatientArmTime (months)Status

Edit any cell. Try changing times without changing their order: the estimate does not move. Give two deaths the same time to see how tie-handling methods differ.

Treatment coefficient
−403

Risk score of a treated patient r = exp(β) = 1.000; a comparator patient's score is 1.

Handling tied event times

No tied event times: both methods agree.

Log partial likelihood plotted against β
Partial likelihood L(β)—
log L(β)—
Hazard ratio exp(β)—
Estimate β̂ (HR)—
Risk sets at each event time, evaluated at the current β
Event timeAt risk just beforeEvent(s)Event risk score(s)Summed risk scoresContribution

3 · From a fitted Cox model to survival — within follow-up only

The baseline cumulative hazard is built from the same risk sets: at each event time the increment is the number of events divided by the summed risk scores of those at risk. Comparator survival is exp(−H0(t)); treated survival is that value raised to the power r. These curves use the data and β from step 2.

S(t | x) = S0(t)exp(xᵀβ)

Estimated survival curvesEvaluated at β = …

Estimated step survival curves for each arm
Baseline cumulative hazard and survival at each event time
Event time (months)IncrementCumulative hazard H0(t)Comparator survivalTreatment survival
Where the Cox model sits among neighbouring survival methods (from the concept page)
MethodAssumption about the time patternMain outputTypical role in economic evaluation
Kaplan-Meier estimatorNone, and no covariatesStep survival curve within follow-upDescribing observed data and judging model fit
Cox modelBaseline hazard left unspecifiedHazard ratios and step survival curves within follow-upRelative treatment effects and covariate adjustment
Parametric proportional hazards modelBaseline hazard of a chosen form, such as exponential, Weibull or GompertzHazard ratios and smooth curvesExtrapolation of survival
Accelerated failure time modelDistribution of survival time specifiedAcceleration factor (time ratio)Extrapolation when proportional hazards is doubtful
Royston-Parmar modelBaseline modelled with splinesSmooth curves, time-varying effects possibleComplex hazards

Check your reading of Cox output

Most errors with Cox output come from treating a relative, within-trial summary as an absolute or long-term one. Decide whether the concept page supports each statement.

The core idea

A Cox hazard ratio is a relative effect, conditional on the covariates in the model, estimated from the order of events within observed follow-up. Lifetime mean survival and QALYs need a model that can extrapolate.

Assumptions, safeguards and limitations

The model rests on three assumptions: proportional hazards, a log-linear effect of each covariate, and independent censoring. A censored person stays in each risk set until leaving observation, which is valid only when censoring is unrelated to the event process given the covariates.

  • Test proportionality. The NICE manual (PMG36, section 4.6.22) states the assumption should always be assessed. Tests based on scaled Schoenfeld residuals were among the most powerful in a simulation study cited by Bradburn and colleagues. A non-significant test with few events is not proof.
  • When it fails. PMG36 section 4.6.24 points to NICE DSU TSD21: flexible parametric methods using splines or fractional polynomials, cure and mixture models, and piecewise approaches. A time-varying covariate, whose value changes during follow-up, is a different idea from a time-varying effect.
  • Stratification. A stratified Cox model fits a separate baseline hazard per stratum; the stratifying covariate must be categorical and receives no estimated effect.
  • Number of events. Simulation work cited by Bradburn and colleagues suggests at least 10 events per covariate; fewer gives biased coefficients. The four-patient example here has three events and shows mechanics only.
  • Clustering. For patients grouped within centres, a sandwich variance or a frailty model can be used.
  • Interpretation. Adjusted and unadjusted hazard ratios are different quantities, so report the adjustment set. In observational data a causal reading also requires confounding to be addressed.
  • Economic models. NICE DSU TSD14 notes that a Cox model bases inferences only on observed data, so mean survival is inaccurate unless data are almost complete. When a proportional hazards model is used, only the hazard ratio from the chosen parametric model should be applied to that model's control-arm curve; TSD14 calls applying a Cox hazard ratio theoretically incorrect.

This explorer illustrates mechanics with fictional data and a single binary covariate. It does not fit real trials, compute standard errors or confidence intervals, implement the exact partial likelihood for ties, or assess proportionality. It is an educational tool, not clinical or methodological advice.

Sources cited by the concept page
  • Bradburn MJ, Clark TG, Love SB, Altman DG. Survival analysis part II: multivariate data analysis, an introduction to concepts and methods. Br J Cancer. 2003;89(3):431-436. https://doi.org/10.1038/sj.bjc.6601119
  • Bradburn MJ, Clark TG, Love SB, Altman DG. Survival analysis part III: multivariate data analysis, choosing a model and assessing its adequacy and fit. Br J Cancer. 2003;89(4):605-611. https://doi.org/10.1038/sj.bjc.6601120
  • Cox DR. Regression models and life-tables. J R Stat Soc Series B. 1972;34(2):187-202. https://doi.org/10.1111/j.2517-6161.1972.tb00899.x
  • Latimer NR. NICE DSU Technical Support Document 14: Survival analysis for economic evaluations alongside clinical trials, extrapolation with patient-level data. Sheffield: Decision Support Unit; 2011 (updated March 2013).
  • National Institute for Health and Care Excellence. NICE technology appraisal and highly specialised technologies guidance: the manual (PMG36), section 4.6. London: NICE; 2022 (updated 31 March 2026).
  • Rutherford MJ, Lambert PC, Sweeting MJ, et al. NICE DSU Technical Support Document 21: Flexible methods for survival analysis. Sheffield: Decision Support Unit; 2020.
  • Therneau TM. coxph: Fit proportional hazards regression model. survival R package documentation.
  • Therneau TM. Software validation. Vignette for the R survival package; updated December 2022.
Read the full concept page