Uncertainty and models
Residual-versus-fitted plot
Displays residuals against fitted values to reveal structure, nonlinearity or unequal variance.
- Plot
- Model diagnostics
- Error structure
What it answers
Do model errors show a pattern against fitted values?
- Shape
- Residual points against fitted values
- What it shows
- Nonlinearity, unequal variance and outliers.
Example
The question
Does our demand model fit equally well across the range?
Residuals against fitted values, demand model (illustrative)
Illustrative data. It belongs to no company.
When to use it
Use it when
Regression diagnostics.
Avoid it when
Residuals from incompatible definitions or transformed scales without explanation.
How to read it
Read residual sign, spread and shape around zero.
Note
Specify residual type and standardisation.
The data you need
- Layout
- Long table
- Fields
- CaseID: text; Fitted: number; Residual: number
- One row is
- One fitted observation and its model residual. What is the grain?
- Rules
- State residual definition, such as Actual-Fitted, and any standardisation.
- Optional
- Alternative Actual,Fitted plus model-specific residual calculation.
- Preparation
- Fit/obtain model predictions and calculate the specified residual type without mismatching observations.
- Units
- Residual unit depends on raw, standardised or deviance residual definition. Fitted values retain the model's specified outcome scale.
Worked example
Fitted 10,15,20 with residuals 2,-1,3. Plot the pairs. Three points illustrate reading but cannot establish an error pattern.
| CaseID | Fitted | Residual |
|---|---|---|
| A | 10 | 2 |
| B | 15 | -1 |
| C | 20 | 3 |
