Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 27

Maximizing Partial Likelihood for Cox Model Parameters

Recommended resources

Introduction

In our last lesson, we established the structure of the Cox Proportional Hazards model and learned how to interpret its coefficients and the corresponding hazard ratios. We saw that the model elegantly separates the time-dependent baseline hazard from the effect of individual covariates. However, we left a crucial question unanswered: how do we actually estimate the regression coefficients from the data?

This lesson dives into the ingenious method Sir David Cox proposed for this task: partial likelihood. Your goal is to understand how this likelihood function is constructed and maximized to find the model parameters. This is a core theoretical component of the CS2 syllabus and a beautiful piece of statistical reasoning. We will see how it allows us to estimate the covariate effects without ever needing to specify or estimate the baseline hazard function .


The Logic of Partial Likelihood

The central challenge in estimating is the presence of the unknown nuisance function, . A standard full likelihood approach would require us to specify a form for , turning it into a parametric model and losing the flexibility we desire.

Partial likelihood sidesteps this by focusing only on the information contained in the ordering of events. The logic unfolds sequentially through time. At each time an event (e.g., a death) occurs, we consider the set of all individuals who were still at risk of the event just before that moment. We then ask: given that one event happened at this time, what is the probability that it happened to the specific individual we observed it happening to?

This approach cleverly transforms the problem into a series of conditional probability statements. The video below, from Stanford Online, provides an excellent high-level introduction to this idea.

Statistical Learning: 11.3 Estimation of Cox Model with Examples

This video from the "Statistical Learning" course introduces Cox's idea of partial likelihood.

Watch the first two sections of the video to grasp the core concept: The introduction, which frames the problem of estimating \beta without specifying the baseline hazard. The explanation of how the relative risk is constructed. Pay close attention to how the baseline hazard, h_0(t), cancels out of the ratio, which is the key insight.

As the video explains, for an event occurring at time to individual , the conditional probability that individual was the one to have the event, out of everyone in the risk set , is:

Substituting the Cox model formula, , gives:

The baseline hazard has vanished. The partial likelihood function, , is simply the product of these conditional probabilities over all observed event times. For a dataset with distinct event times , assuming no ties for now:

Here, is the covariate vector for the individual who had an event at time , and the sum in the denominator is over all individuals in the risk set at that time.

The following reading provides the formal definition of the partial likelihood and walks through its construction.

[PDF] Modeling of Survival Data

This document provides a clear derivation of the partial likelihood function and a simple example.

Please read the sections titled "Likelihood Estimation for the PH Model" and "A simple example". Focus on how the likelihood is constructed as a product of terms, as shown in the section defining partial likelihood. Work through the simple example to see how each term in the product is calculated from the data at each failure time. This is a practical application of the formula.


Maximizing the Partial Likelihood

Now that we have the function , we need to find the value of that maximizes it. This value, , is our maximum partial likelihood estimate.

Due to the product form and the summation in the denominators, there is no analytical closed-form solution for . Instead, we must use numerical optimization algorithms. As is standard in maximum likelihood estimation, we work with the log-partial likelihood, , which converts the product into a more manageable sum:

The optimization algorithm's task is to find the peak of this log-likelihood surface (or, equivalently, the minimum of the negative log-likelihood surface).

This is a visualization of a negative log-partial likelihood surface for a Cox model with two parameters, \(\beta_1\) and \(\beta_2\). The numerical optimization algorithm is effectively searching for the coordinates of the lowest point (the red dot) on this surface, which correspond to the maximum likelihood estimates \(\hat{\beta}_1\) and \(\hat{\beta}_2\).

The most common algorithm used is the Newton-Raphson method. Given your statistics background, you'll recognize this as an iterative procedure that uses the first and second derivatives (the score vector and the information matrix) of the log-likelihood function to find its maximum. The reading below details this process and provides a worked example of the iterative steps.

[PDF] Chapter 3 The Cox Proportional Hazards Model - CDN

This chapter excerpt from a survival analysis course provides a clear, step-by-step guide to the Newton-Raphson method as applied to the Cox model.

Please read the section titled "Estimating the parameters numerically". First, understand the general Newton-Raphson algorithm presented, which involves the score function U(\theta) and the information matrix I(\theta). Then, carefully follow the worked example with the body mass index data. See how the first and second derivatives are calculated at each step (\beta^{(0)}, \beta^{(1)}, etc.) to iteratively approach the maximum likelihood estimate.


Handling Tied Event Times

Our derivation so far has assumed that all event times are unique. In practice, especially with data recorded in discrete units (like days or months), multiple individuals can be recorded as having an event at the same time. These are called ties. The simple partial likelihood formula needs to be modified to account for them.

Several approximations have been developed. The CS2 exam expects you to be aware of the most common ones:

  1. Breslow's Method (1974): This is the simplest and fastest method. It is the default in many older software packages. However, it is an approximation that can be biased if the number of ties is large relative to the size of the risk set.
  2. Efron's Method (1977): This method provides a closer approximation to the true likelihood than Breslow's, with little additional computational cost. It is often the default in modern software (like R).
  3. Exact Method: This method, developed by Kalbfleisch and Prentice, calculates the exact probability of observing the specific set of individuals who failed out of the risk set. It is the most accurate but can be computationally very intensive if there are many ties.

The following reading defines the likelihood contributions for each of these methods.

[PDF] Chapter 3 The Cox Proportional Hazards Model - CDN

This section of the same PDF provides the mathematical formulas for handling ties.

Read the section titled "Partial likelihood for repeated failure times". Focus on understanding the conceptual difference between the Breslow, Efron, and Exact methods. You don't need to memorize the complex formulas, but you should recognize their names and the trade-off they represent between accuracy and computational speed. Note the example provided which clarifies how each method constructs its contribution to the likelihood.

For most actuarial applications, the difference between Efron's and the exact method is negligible. Breslow's method is important to know as it's historically significant and often explicitly mentioned in exam questions.


Conclusion

In this lesson, we have demystified the "engine room" of the Cox model. You have learned how the coefficients, which quantify the effects of risk factors, are estimated.

Key Takeaways:

  • The parameters of the Cox model are estimated by maximizing the partial likelihood function.
  • Partial likelihood is ingeniously constructed as a product of conditional probabilities at each event time, which causes the unknown baseline hazard to cancel out.
  • Since there is no closed-form solution, the log-partial likelihood is maximized numerically, typically using an iterative procedure like the Newton-Raphson method.
  • When multiple events occur at the same time (ties), the likelihood must be adjusted. Common methods include the Breslow, Efron, and Exact methods, offering a trade-off between computational efficiency and accuracy.

We now understand how to obtain the point estimate . However, a point estimate alone is incomplete. To perform statistical inference, we need to quantify its uncertainty. The Newton-Raphson algorithm conveniently provides the variance-covariance matrix of the estimates as a by-product. In our next lesson, we will use this to construct confidence intervals for our hazard ratios and perform hypothesis tests, enabling a full and robust interpretation of the model's results.