Concept Architecture
Concept
Theoretically, Residual is the difference between an observed value and the corresponding value predicted by a statistical model. Residuals quantify the unexplained variation remaining after model fitting and are fundamental to regression analysis, model diagnostics, and statistical inference. Examination of residuals provides insight into model adequacy, assumption violations, influential observations, heteroscedasticity, non-linearity, and overall goodness of fit.
Mathematically, a residual is calculated as the observed outcome minus the fitted value generated by the regression model. The collection of residuals forms the basis for estimating residual variance, constructing diagnostic statistics, and calculating goodness-of-fit measures such as the residual sum of squares. Standardised, studentised, Pearson, and deviance residuals extend the basic residual concept for specialised regression models and diagnostic purposes.
In practice, residuals are calculated after fitting regression, mixed-effects, generalised linear, survival, and other statistical models. In health economics they are routinely examined when modelling healthcare costs, quality-adjusted life years, healthcare utilisation, disease progression, and economic outcomes to evaluate model assumptions and identify potential model misspecification.
Purpose
Used to quantify unexplained variation, assess model fit, evaluate regression assumptions, identify influential observations, and support model diagnostics in health economic analyses.
Mathematical Formulae
Primary Formula
e? = y? ? ??
where:
- e? = residual
- y? = observed value
- ?? = predicted value
Supporting Formulae
Residual Sum of Squares:
RSS = ?(y? ? ??)�
Mean Squared Error:
MSE = RSS � (n ? p ? 1)
Standardised Residual:
r? = e? � (s�(1 ? h?))
where:
- s = residual standard error
- h? = leverage
Related Mathematical Methods
- Linear Regression
- Residual Analysis
- Ordinary Least Squares
- Mean Squared Error
- Residual Sum of Squares
- Standardised Residual
- Studentised Residual
- Cook's Distance
- Leverage Point
- Regression Diagnostics
Example
A regression model predicts annual healthcare costs.
Observed annual cost:
�10,400
Predicted annual cost:
�9,850
The residual is:
e = �10,400 ? �9,850
= �550
The positive residual indicates that the observed healthcare cost exceeds the model prediction by �550. Repeating this calculation for every observation allows assessment of model fit and calculation of the residual sum of squares.
Excel Implementation
| Function | Example Formula | Health Economics Application |
|---|---|---|
| Subtraction | =B2-C2 | Calculate the residual for each observation. |
| POWER | =POWER(B2-C2,2) | Calculate squared residuals for model diagnostics. |
| SUMXMY2 | =SUMXMY2(ObservedRange,PredictedRange) | Calculate the residual sum of squares. |
| AVERAGE | =AVERAGE(ResidualRange) | Verify that residuals have an average close to zero. |
| SQRT | =SQRT(RSS/(n-p-1)) | Calculate the residual standard error. |
VBA (Optional)
Automate calculation of residuals, diagnostic statistics, and residual plots for regression models used in health economic analyses.
Sources
- Draper NR, Smith H. Applied Regression Analysis.
- Kutner MH, Nachtsheim CJ, Neter J, Li W. Applied Linear Statistical Models.
- Weisberg S. Applied Linear Regression.
- Montgomery DC, Peck EA, Vining GG. Introduction to Linear Regression Analysis.
- Briggs A, Claxton K, Sculpher M. Decision Modelling for Health Economic Evaluation.
- Drummond MF, et al. Methods for the Economic Evaluation of Health Care Programmes.
- NICE Health Technology Evaluation Manual.
- ISPOR Good Practice Reports.
Related Concepts (2)
Library
Publications
1
Bayesian Methods in Health Economics — Gianluca Baio, 1st Edition ed., 2012 (Chapman & Hall / CRC Press)
An overview of Bayesian statistical methods for the analysis of health economic data, covering economic evaluation concepts, statistical cost-effectiveness analysis, Bayesian computation and MCMC, and applied health economic evaluation.
BookView source →
Frequently Asked Questions (6)
What is a residual?
The difference between an observed value and the value predicted for it by a fitted statistical model.
Source: Cook & Weisberg 1982
What does a residual measure about a fitted model?
A residual is the difference between an observed value and the value a fitted model predicted for it, measuring how far the model missed for that point. Examining the residuals reveals whether a model fits well: scattered randomly around zero, they suggest the model captures the pattern, while a systematic shape in them signals something the model has missed, such as a curved relationship or unequal spread. A residual differs from the true error in that it is measured against the fitted model rather than the unknown truth. The model's miss at each point is what it captures. Kirkwood and Sterne (2003) describe this.
Source: Kirkwood & Sterne 2003
How are residuals used?
Residuals are used to check the assumptions and adequacy of a fitted model: plotting residuals against fitted values or predictors can reveal non-linearity, non-constant variance, or other misspecification, and their distribution can be checked for normality; large residuals flag observations the model fits poorly. So residuals are used as diagnostics, since patterns in them indicate whether the model's assumptions hold and where it fits badly, which guides model checking and improvement, making residual analysis a standard step in evaluating a regression or other fitted model before relying on its results.
Source: Cook & Weisberg 1982
What do residual patterns indicate?
Residual patterns indicate potential problems with a model: a systematic trend in residuals against fitted values or a predictor suggests the relationship is misspecified, such as non-linearity; a funnel shape suggests non-constant variance; and departures from normality in the residuals can affect inference. So residual patterns reveal violations of model assumptions, with structure in the residuals signalling that the model does not adequately capture the data, which is why residual plots are examined, since an ideal model leaves residuals that appear random and patternless, and any systematic pattern points to a shortcoming to be addressed.
Source: Cook & Weisberg 1982
What is the difference between a residual and an error?
A residual is the observed difference between an actual value and the value predicted by the fitted model, computable from the data, while an error, or disturbance, is the unobservable difference between the actual value and the true underlying relationship, which is not known. The residual is an estimate of the error based on the fitted model. So a residual and an error differ in that the residual is observable and derived from the fitted model, while the error is a theoretical quantity relative to the true model, which is why residuals are used in practice to assess the model, standing in for the unobservable errors.
Source: Cook & Weisberg 1982
Why is examining residuals important?
Examining residuals is important because it reveals whether a model's assumptions are met and how well it fits, allowing problems such as non-linearity, non-constant variance, correlated errors, and influential or poorly fitted observations to be detected. So examining residuals matters for validating a model before relying on it, since a model that fits poorly or violates its assumptions can give biased estimates or invalid inference, and residual analysis is the primary means of checking these, which is why it is a routine and important part of regression and model diagnostics.
Source: Cook & Weisberg 1982
Trust Record
Verified by Dr Darrin Baines
British health economist
Professional identity: darrinbaines.org
Verification date: 24 Dec 2025
Content version: 1.0.0
Canonical Identity
- Persistent URI
- https://healtheconomics.wiki/concept/residual
- Term code
- HE-ES-SA-182
Stable URI · Machine-readable · Resolvable · CC BY 4.0