Member-only story
Survival Analysis: Optimize the Partial Likelihood of the Cox Model
Finding the coefficients that maximize the log-partial likelihood in Python
Table of contents
- Introduction
- The Cox proportional hazard model
- Optimization problem
- Implementation
- Conclusions
- References
1. Introduction
Survival analysis encompasses a collection of statistical methods for describing time to event data.
In this post, we introduce a popular survival analysis algorithm, the Cox proportional hazards model¹. Then, we define its log-partial likelihood and the gradient, and optimize it to find the best set of model parameters through a practical Python example.
2. The Cox proportional hazard model
We define the survival rate as the percentage of patients who have not experienced the adverse event (e.g. death) after a certain period of time.
The Cox proportional hazards model can assess the association between variables and survival rate. Given a set of covariates x
, it defines the hazard function as: