Concept Architecture
Concept
Theoretically, the Deviance Residual is a diagnostic measure used to assess the goodness-of-fit of survival and generalised linear models by quantifying the contribution of each observation to the model deviance. It is founded on likelihood theory and residual analysis and exists to identify observations that are poorly explained by the fitted model. In health economics, deviance residuals are used to evaluate survival models and regression models that provide inputs for decision-analytic and cost-effectiveness analyses.
Mathematically, the deviance residual is derived from the model likelihood and is a transformation of the Martingale residual designed to produce a more symmetric distribution around zero. Large positive or negative deviance residuals indicate observations that differ substantially from model predictions and may suggest influential observations or model misspecification.
In practice, deviance residuals are calculated after fitting Cox proportional hazards models and other regression models. They are examined graphically to detect outliers, assess model adequacy and compare alternative model specifications before survival estimates are incorporated into health economic evaluations.
Purpose
Used to assess model fit, identify outlying observations, detect model misspecification and validate survival and regression models used in health economic analyses.
Mathematical Formulae
Primary Formula
d? = sign(M?) ? �{?2[M? + �?ln(�? ? M?)]}
where:
- d? = deviance residual
- M? = Martingale residual
- �? = event indicator (1 = event, 0 = censored)
Supporting Formulae
Martingale residual:
M? = �? ? H?(t?)
Cumulative hazard:
H?(t) = ?ln(S?(t))
Related Mathematical Methods
- Martingale residuals
- Cox?Snell residuals
- Cox proportional hazards model
- Survival model diagnostics
- Maximum likelihood estimation
Example
Following estimation of a Cox proportional hazards model, one patient has a Martingale residual of ?1.85, resulting in a large negative deviance residual. Inspection of the patient's clinical data reveals unusually prolonged survival compared with the model prediction, indicating a potentially influential observation that warrants further investigation.
Excel Implementation
| Function | Example Formula | Health Economics Application |
|---|---|---|
| LN | =LN(B2) | Calculate logarithmic components required for deviance residuals. |
| SQRT | =SQRT(B2) | Calculate the magnitude of the deviance residual. |
| IF | =IF(A2>=0,1,-1) | Apply the sign of the Martingale residual when calculating the deviance residual. |
VBA (Optional)
Automate calculation of deviance residuals and generate diagnostic plots for validation of fitted survival models.
Sources
- Therneau TM, Grambsch PM. Modeling Survival Data: Extending the Cox Model. Springer.
- Collett D. Modelling Survival Data in Medical Research. CRC Press.
- Klein JP, Moeschberger ML. Survival Analysis: Techniques for Censored and Truncated Data. Springer.
- Cox DR. Regression Models and Life-Tables. Journal of the Royal Statistical Society: Series B. 1972;34(2):187?220.
- Briggs A, Claxton K, Sculpher M. Decision Modelling for Health Economic Evaluation. Oxford University Press.
Related Concepts (2)
Library
Publications
1
NICE DSU Technical Support Document 21: Flexible methods for survival analysis — Rutherford, Lambert, Sweeting, Pennington, Crowther, Abrams & Latimer, TSD 21 ed., 2020 (NICE Decision Support Unit (University of Sheffield))
Guidance extending standard survival analysis to flexible parametric methods — spline-based models, fractional polynomials, mixture and cure models, and relative-survival approaches — for capturing complex hazard functions in economic evaluation.
Frequently Asked Questions (6)
What is a deviance residual?
A model residual, used with generalised linear and survival models, constructed so its sum of squares equals the model's overall deviance statistic.
Source: McCullagh & Nelder 1989
What does a deviance residual measure for an individual?
A deviance residual measures how much a single observation contributes to the overall lack of fit of a survival or generalised linear model, scaled so the residuals are roughly symmetric around zero. A large positive or negative value flags a patient whose observed outcome the model predicts poorly, such as someone who survived far longer or died far sooner than expected. Plotting the residuals against covariates or time can reveal where the model systematically misfits. They localise poor fit to individuals. Collett (2015) describes them.
Source: Collett 2015
How are deviance residuals used?
Deviance residuals are used to assess a model's fit and to detect observations that the model fits poorly, by examining their size and pattern. Because their squared sum is the deviance, large deviance residuals mark observations contributing most to lack of fit. They are plotted against predicted values or covariates to check for systematic patterns indicating misspecification, and unusually large values flag potential outliers. In survival models, deviance residuals help diagnose fit and identify individuals whose survival departs from the model's expectation.
Source: McCullagh & Nelder 1989
How do deviance residuals differ from Cox-Snell residuals?
Deviance residuals and Cox-Snell residuals are both used to check survival model fit but differ in form and use. Cox-Snell residuals assess overall fit by checking whether they follow a standard exponential distribution, but they are skewed and less suited to identifying individual poorly fitted observations. Deviance residuals are a transformation making the residuals more symmetric and interpretable, better for spotting outliers and patterns for individual observations. So Cox-Snell residuals assess overall fit, while deviance residuals are more useful for examining individual observations.
Source: Cox & Snell 1968
Why are deviance residuals more symmetric?
Deviance residuals are constructed as a transformation that makes them more symmetric and closer to normally distributed than raw or Cox-Snell residuals, which are typically skewed. This symmetry makes them easier to interpret, since values can be judged against a roughly symmetric reference, and large positive or negative residuals more readily indicate observations poorly fitted above or below the prediction. The improved symmetry is why deviance residuals are preferred for identifying outliers and examining fit at the level of individual observations.
Source: McCullagh & Nelder 1989
What do patterns in deviance residuals indicate?
Patterns in deviance residuals indicate potential problems with a model: systematic trends when plotted against predicted values or covariates suggest misspecification, such as an incorrect functional form or omitted variable, while unusually large residuals mark observations poorly fitted, which may be outliers or influential points. A well-fitting model should show residuals scattered without pattern. By revealing such structure, deviance residuals guide diagnosis of how the model fails to fit, complementing overall fit measures with information about specific observations and departures.
Source: McCullagh & Nelder 1989
Trust Record
Verified by Dr Darrin Baines
British health economist
Professional identity: darrinbaines.org
Verification date: 20 Oct 2025
Content version: 1.0.0
Canonical Identity
- Persistent URI
- https://healtheconomics.wiki/concept/deviance-residual
- Term code
- HE-EM-SM-016
Stable URI · Machine-readable · Resolvable · CC BY 4.0