Survival models
In the previous part of the book, we introduced models for different response types, including binary responses, count responses, and even vector responses. A key property unifying all these response types is that we always get to observe the value of the response variable. However, there are many applications where that is not the case. Consider, for example, the length of time until a patient dies from a disease. For a particular patient, the hospital might not get to observe their time of death (e.g. the patient is still living at the time of the study, or the patient never visited the hospital again). What we have is incomplete information about the true outcome—often referred to as censored data. Survival analysis refers to the set of statistical methods we use to draw inferences from such data.
In 12 Cox regression we describe key quantities of interest in survival analysis and introduce the Cox regression model, which is the quintessential model for survival analysis. We demonstrate how to fit regularized Cox models with the glmnet package.
In 13 Stratified Cox models we introduce stratified Cox models and how to fit its sparse variant.
Cox models work not just with right-censored data (i.e. censoring at the ending time), but for a more general setting where each observation has both a “start” time and an “stop” time, with the “stop” time being possibly censored. Such data is called start-stop data. We describe the Cox model for start-stop data in 14 Cox regression for start-stop data, and illustrate how it can be used to fit Cox models with time-varying covariates.