MerQuR+Statistics Glossary

Statistics Glossary → Cox model residuals (martingale, deviance, Cox-Snell, dfbeta)

Cox model residuals (martingale, deviance, Cox-Snell, dfbeta)concept

Types of residuals used to examine the fit of the Cox proportional hazards model, the functional form of covariates and the influence of individual observations on the results.

In survival data the usual 'observed minus predicted' residual cannot be defined because times may be censored, so several kinds of residual are used instead. The Cox-Snell residual is a person's estimated cumulative hazard at their own follow-up time; if the model is correct, these residuals (taking censoring into account) follow an exponential distribution with mean 1, and cumulative hazard plots fall close to the 45-degree line. The martingale residual is the event indicator minus the Cox-Snell residual (δ - Ĥ); it ranges from -∞ to 1, and plotted against a covariate not in the model it shows in which form (linear, log, threshold) that covariate should enter.

The deviance residual is a transformation of the martingale residual that is more symmetric around zero and is used to find people the model predicts poorly (outliers). dfbeta approximates how much each coefficient would change if an observation were dropped and identifies influential observations. Xb (the linear predictor) is a person's relative risk score. To check the proportional hazards assumption, Schoenfeld residuals, which are different from all of these, are used.

An everyday example

A hospital studies readmission among heart-failure patients with a Cox model. When the martingale residuals are plotted against kidney function, which is not in the model, they rise sharply beyond a certain threshold, suggesting kidney function should be added as a threshold variable. The dfbeta values show that the age coefficient changes noticeably when a single 98-year-old patient is removed.

In MerQur

In Cox regression, 'Additional outputs: Residual summaries and Save residuals to dataset' summarizes the martingale, deviance, Cox-Snell, Xb and dfbeta residuals, lists the 5 most influential rows and can add them to the dataset as columns; the 'Proportional hazards test (Schoenfeld)' uses scaled Schoenfeld residuals. In time-dependent Cox regression the martingale, deviance, Cox-Snell and Xb residuals, and in the cluster-robust Cox model and Survey-PHREG the martingale, deviance and dfbeta residuals, can be saved to the dataset.

Analyses where this concept appears

Cox Regression (Proportional Hazards Model)Time-dependent Cox RegressionSurvey-PHREG (Weighted Cox)Cluster-Robust Cox (Marginal and Frailty Models)

Related concepts

Proportional hazards assumptionInfluence diagnostics (Cook's distance, leverage, DFBETAS)