Risk Modelling and Survival Analysis · Estimation procedures for lifetime distributions
Cox Proportional Hazards Model Estimation Explained
Updated 11 October 2026 · Fact-checked
The Cox model writes the hazard for a life with covariates z as h(t; z) = h₀(t) exp(β'z), leaving the baseline h₀(t) unspecified. You estimate β by maximising the partial likelihood, which multiplies, over each death time, the dying life's exp(β'z) divided by the sum of exp(β'z) over everyone still at risk.
Understand Cox Proportional Hazards Model Estimation
Survival data often come with covariates: age, sex, smoker status, policy type. You want to know how these change the force of mortality or the hazard of an event. The Cox model does this without assuming a shape for time itself.
The model says the hazard for a life with covariate vector z is h(t; z) = h₀(t) × exp(β'z). Here h₀(t) is the baseline hazard, the hazard when every covariate equals zero. It can be any non-negative function of time. The part exp(β'z) does not depend on time. That is why the model is called semi-parametric: the covariate effect is parametric, the baseline is not.
The proportional hazards assumption follows from this form. For two lives with covariates z₁ and z₂, the ratio h(t; z₁) ÷ h(t; z₂) = exp(β'(z₁ − z₂)). The baseline cancels, so the ratio is the same at every time t. If one group has 1.5 times the hazard of another at age 60, it has 1.5 times the hazard at every other time too.
Because h₀(t) is unknown, the ordinary likelihood cannot be maximised for β. Cox's idea is the partial likelihood. At each observed death time, you ask: given that one death happens now among the lives at risk, what is the probability it is the life that actually died? That probability depends only on β, because h₀(t) cancels. Multiply these probabilities over all death times and maximise over β.
Once you have β̂, each coefficient is read as a log hazard ratio. exp(β̂ᵢ) is the multiplicative change in hazard when covariate i rises by one unit, with the other covariates held fixed. A positive coefficient means higher hazard, a negative one means lower hazard.
Key rules to remember
- Cox model
- h(t; z) = h₀(t) × exp(β₁z₁ + β₂z₂ + ... + βₚzₚ) = h₀(t) exp(β'z)
- h₀(t) is the baseline hazard for z = 0. There is no separate intercept term, as it would be absorbed into h₀(t).
- Proportional hazards
- h(t; z₁) ÷ h(t; z₂) = exp(β'(z₁ − z₂))
- Independent of t. This is the assumption you must be able to state and test.
- Partial likelihood (no tied deaths)
- L(β) = Π over death times tᵢ of [ exp(β'zᵢ) ÷ Σ over j in R(tᵢ) of exp(β'zⱼ) ]
- zᵢ is the covariate vector of the life that dies at tᵢ. R(tᵢ) is the risk set: all lives still under observation just before tᵢ, including the one who dies. Censored lives contribute only through the risk sets.
- Log partial likelihood
- l(β) = Σ over death times of [ β'zᵢ − ln( Σ over j in R(tᵢ) of exp(β'zⱼ) ) ]
- Differentiate this and set equal to zero to find β̂. Usually solved numerically.
- Hazard ratio
- Hazard ratio for a one-unit rise in covariate i = exp(βᵢ)
- Other covariates fixed. For a rise of k units, use exp(kβᵢ).
- Survival function under the model
- S(t; z) = [S₀(t)]^exp(β'z)
- S₀(t) is the baseline survival function. This follows because the cumulative hazard is multiplied by exp(β'z).
How to solve Cox Proportional Hazards Model Estimation questions
Use this method for any question that asks you to set up, evaluate or interpret a Cox model.
- 1Write the model: h(t; z) = h₀(t) exp(β'z). Define each covariate clearly, for example z = 1 for smoker and 0 for non-smoker, and state what the baseline life is.
- 2List the distinct death times in order. Note any ties and any censored times.
- 3For each death time, write down the risk set: everyone with an observation time at or beyond that time. Remember that lives censored before the death time are out, and the life who dies is in.
- 4For each death time, write the factor exp(β'z of the dying life) ÷ Σ exp(β'z) over the risk set. Multiply the factors to get L(β).
- 5Take logs to get l(β). If asked for β̂, differentiate and solve the score equation, or evaluate l(β) or its derivative at the given values of β.
- 6Interpret the result: compute exp(β̂) as the hazard ratio, and state the covariate change and that other covariates are held fixed.
- 7If asked about survival or hazard for a particular life, apply h(t; z) = h₀(t) exp(β'z) or S(t; z) = S₀(t)^exp(β'z) with the given baseline.
- 8If asked about the assumption, state that hazard ratios are constant over time, then describe a check or a consequence.
Quickest way: Risk-set table for the partial likelihood
When to use it: Use when you are given a small data set and asked for the partial likelihood or the log-likelihood at a given β.
- Make a table with one row per death time, in order.
- In each row, write the covariate value of the life who dies and the list of lives in the risk set.
- Write the numerator as e^(β z) for the dying life. Write the denominator as the sum of e^(β z) over the risk set. For a 0/1 covariate, the denominator is (number with z = 0) + (number with z = 1) × e^β.
- Multiply the rows. If β is given, substitute it straight away.
- At β = 0 every exp term is 1, so each factor is simply 1 ÷ (size of the risk set). This is a useful check.
Common mistakes in Cox Proportional Hazards Model Estimation
Leaving the dying life out of its own risk set, or leaving in lives who were censored earlier.
Students think of the risk set as 'the others'. In fact it is everyone under observation just before the death time.
Fix: Define R(tᵢ) as all lives with observed time ≥ tᵢ. The life who dies at tᵢ is always in it. A life censored before tᵢ is never in it.
Including a factor in the partial likelihood for each censored life.
In the ordinary likelihood, censored lives contribute a survival term, so students expect a term here too.
Fix: Only death times give factors. Censored lives appear only in the denominators of the earlier death times where they were still at risk.
Reading exp(β) as a change in probability or as an additive change in the hazard.
The word 'coefficient' suggests a linear effect.
Fix: exp(β) multiplies the hazard. If exp(β) = 1.5 the hazard is 50% higher, at every time, for each one-unit increase, with other covariates fixed.
Adding an intercept to β'z.
Copying ordinary regression models.
Fix: The baseline hazard h₀(t) plays the role of the intercept. A constant in β'z would cancel in the partial likelihood and could not be estimated.
Saying the proportional hazards assumption means the hazard itself is constant over time.
Confusing 'proportional' with 'constant'.
Fix: The hazards for each life can change with t in any way. Only the ratio between two lives with fixed covariates stays constant.
Thinking the Cox model needs a distribution for the baseline, or that the baseline must be estimated before β.
Parametric survival models have both parts tied together.
Fix: In the Cox model, β is estimated from the partial likelihood without knowing h₀(t). The baseline can be estimated afterwards if needed.
Worked examples
Example 1
Four lives are observed. Covariate z = 1 for treatment and 0 for control. Life A (z = 1) dies at time 2. Life B (z = 0) dies at time 3. Life C (z = 1) dies at time 5. Life D (z = 0) is censored at time 6. Assume a Cox model h(t; z) = h₀(t) e^(βz). (a) Write down the partial likelihood. (b) Evaluate it at β = 0. (c) Find the derivative of the log partial likelihood at β = 0 and say what it tells you.
Show the solution
- Death at time 2: the risk set is A, B, C, D. Covariates are 1, 0, 1, 0, so the denominator is 2e^β + 2. The dying life is A with z = 1, so the factor is e^β ÷ (2e^β + 2).
- Death at time 3: the risk set is B, C, D, with z = 0, 1, 0. The denominator is e^β + 2. B dies with z = 0, so the factor is 1 ÷ (e^β + 2).
- Death at time 5: the risk set is C, D, with z = 1, 0. The denominator is e^β + 1. C dies with z = 1, so the factor is e^β ÷ (e^β + 1).
- (a) L(β) = e^(2β) ÷ [ (2e^β + 2)(e^β + 2)(e^β + 1) ].
- (b) At β = 0: L(0) = 1 ÷ (4 × 3 × 2) = 1/24.
- (c) l(β) = 2β − ln(2e^β + 2) − ln(e^β + 2) − ln(e^β + 1). So l'(β) = 2 − 2e^β ÷ (2e^β + 2) − e^β ÷ (e^β + 2) − e^β ÷ (e^β + 1).
- At β = 0: l'(0) = 2 − 2/4 − 1/3 − 1/2 = 2 − 0.5 − 0.3333 − 0.5 = 2/3.
- The derivative is positive, so the log partial likelihood is increasing at β = 0. The maximum is at a value of β above 0, which fits the data: both treated lives died, and the control life D survived the longest.
Answer: (a) L(β) = e^(2β) ÷ [(2e^β + 2)(e^β + 2)(e^β + 1)]. (b) L(0) = 1/24. (c) l'(0) = 2/3 > 0, so β̂ > 0.
Example 2
A Cox model for mortality has covariates z₁ = 1 for smokers (0 for non-smokers) and z₂ = age in years minus 50. The fitted coefficients are β̂₁ = ln 1.5 and β̂₂ = 0.03. (a) Interpret exp(β̂₁). (b) Find the hazard ratio for a life 10 years older than another, same smoking status. (c) The baseline survival to time 10 is S₀(10) = 0.90. Find the survival probability to time 10 for a smoker aged 50.
Show the solution
- (a) exp(β̂₁) = exp(ln 1.5) = 1.5. At any time, a smoker has 1.5 times the hazard of a non-smoker of the same age, which is a 50% higher hazard.
- (b) A 10-year age difference gives exp(10 × 0.03) = exp(0.3) = 1.350 (to 3 decimal places). The older life has about 35% higher hazard.
- (c) A smoker aged 50 has z₁ = 1 and z₂ = 0, so exp(β'z) = 1.5.
- S(10; z) = S₀(10)^1.5 = 0.90^1.5 = 0.90 × √0.90.
- √0.90 = 0.94868, so S(10; z) = 0.90 × 0.94868 = 0.8538.
Answer: (a) Smokers have 1.5 times the hazard of non-smokers, other things equal. (b) Hazard ratio = e^0.3 ≈ 1.350. (c) S(10) ≈ 0.854.
Exam tips
- Know the two-line proof of proportional hazards: divide two Cox hazards and the baseline cancels. Examiners ask for this directly.
- When asked to write the partial likelihood, show the risk set at each death time explicitly. Marks are given for correct risk sets even if the algebra later goes wrong.
- Always finish an interpretation with the phrase 'other covariates held fixed' and say whether the hazard is multiplied or the survival probability is raised to a power.
- For 'comment on the assumption' questions, give a reason why it might fail (for example, an effect that fades with age) and a check: plot log cumulative hazard against time for each group and see whether the curves are roughly parallel.
- In computer-based questions, state the model formula, the covariates and their coding, and the fitted coefficients. Then interpret exp(coefficient) in one sentence in the context of the question.
Practice questions from Estimation procedures for lifetime distributions
- In a Cox model fitted by partial likelihood, which statement about the baseline hazard h0(t) is correct?
- A pension scheme includes only members who were alive and aged at least 60 when it began in 2015, and follows them until death or 2024. Memb…
- Using the Nelson-Aalen estimator, the cumulative hazard just after time 6 is 0.30 and the estimated variance is based on the sum of d/n². At…
- In the Kaplan-Meier estimator, a life censored at time t, where a death also occurs at the same time t, is normally treated in which way?
- When maximising the Cox partial likelihood in the presence of tied death times, which statement is correct about the methods of handling tie…
Cox Proportional Hazards Model Estimation: frequently asked questions
What is the partial likelihood in the Cox model?
It is a product over death times. Each factor is the probability that the life who actually died was the one to die, given that someone from the risk set dies at that moment. The baseline hazard cancels from each factor, so the product depends only on β.
How do I test the proportional hazards assumption?
A simple check is to plot the log of the cumulative hazard against time for each group or category. If the assumption holds, the curves are roughly parallel. You can also fit a model where a covariate effect changes with time and see whether that improves the fit.
What does a negative coefficient mean in a Cox model?
It means exp(β) is below 1, so a higher value of that covariate lowers the hazard. For example, β = −0.2 gives a hazard ratio of about 0.82 per unit increase, other covariates fixed.
Why is the Cox model called semi-parametric?
The effect of covariates is given a fixed form, exp(β'z), with parameters to estimate. The baseline hazard is left completely unspecified, so there is no parametric assumption about the shape of the hazard over time.