Why Plot Scales Matter
A residual plot displays calculated quantities, but the axes determine how those quantities look. A narrow vertical range can make modest residual differences seem dramatic; a very broad range can flatten visible structure. If an axis excludes data, the plot may conceal important observations altogether. Choosing scales is therefore part of responsible diagnostic work, not merely a formatting decision.
This tutorial concerns the scales used for residual-versus-fitted plots and plots of residuals against a predictor. The aim is to make the displayed values easy to read without changing their meaning. A scale cannot create or remove a residual pattern in the data, but it can make that pattern easier or harder to see.
Choosing the Axes
In a residual-versus-fitted plot, fitted values \(\hat{Y}_i\) go on the horizontal axis and residuals \(e_i\) go on the vertical axis. The horizontal axis should show the range of fitted values represented in the data, with enough space to read the end points. The vertical axis should include every residual and show the reference line \(e=0\). Since residuals may be positive or negative, a range centered at zero is usually the clearest choice.
For a residual-versus-predictor plot, put the predictor on the horizontal axis and the residual on the vertical axis. A continuous predictor should be shown over its observed range. For a categorical predictor, use clearly separated category positions and label them; numerical distances between category labels should not imply a meaningful order or spacing unless they actually have one. In both plot types, label axes with the variable names and units, and use tick marks that make approximate values easy to estimate.
A useful default for the residual axis is a symmetric range based on the largest absolute residual. It keeps zero in the center and gives positive and negative residuals equal visual room. A small margin beyond the most extreme point avoids placing a point directly on the plot boundary. This is a starting point, not a rule that overrides the data: if residuals are clipped, the limits must be expanded.
Worked Examples
Worked Example: Setting a Residual Scale Without Clipping
Suppose a hypothetical regression predicts completion time in minutes for five tasks. The fitted times are 20, 22, 24, 26, and 28 minutes. The observed times are 19, 22.5, 25, 25.5, and 28 minutes. Choose a useful vertical scale for the residual-versus-fitted plot.
Check the residual calculations. For each task, \(e_i=Y_i-\hat{Y}_i\), so the residuals are \(19-20=-1\), \(22.5-22=0.5\), \(25-24=1\), \(25.5-26=-0.5\), and \(28-28=0\) minutes. The fitted values are the horizontal coordinates, and these residuals are the vertical coordinates.
The absolute residuals are \(1, 0.5, 1, 0.5,\) and \(0\) minutes. Thus \(M=\max(1,0.5,1,0.5,0)=1\) minute. A range from \(-1.2\) to \(1.2\) minutes uses \(c=1.2\), because \(1.2M=1.2\). It includes all five residuals and leaves \(0.2\) minute of space beyond each extreme. Tick marks at \(-1,-0.5,0,0.5,1\) minutes make the scale readable, with a horizontal reference line at zero.
The horizontal axis should cover fitted times from 20 to 28 minutes, perhaps with a little padding. These axis choices show all the data and retain the residuals’ original units. They do not establish that the regression model’s assumptions are satisfied; the plot is still used to look for evidence about them.
Worked Example: Avoiding an Overly Narrow or Broad Scale
A hypothetical model predicts quiz scores from hours of study. For six students, hours of study are \(0,1,2,3,4,5\), and the residuals in score points are \(0.4,-0.3,0.2,-0.2,0.3,-0.4\). Compare two possible vertical scales for the residual-versus-predictor plot.
The largest absolute residual is \(M=\max(0.4,0.3,0.2,0.2,0.3,0.4)=0.4\) score points. A vertical range from \(-0.1\) to \(0.1\) score points would clip every observation: each residual has absolute value greater than \(0.1\). That range would not merely emphasize variation; it would fail to display the data.
A range from \(-5\) to \(5\) score points includes all observations, but it is very broad relative to them. The largest residual occupies only \(0.4/5=0.08\), or 8%, of the distance from zero to the top of the plot. The points would appear compressed near zero, making their differences difficult to judge.
A more informative starting range is \(-0.5\) to \(0.5\) score points: \(0.5\) is greater than \(M=0.4\), so no point is clipped and the positive and negative values have equal room. The horizontal axis can run from 0 to 5 hours, the observed predictor range. The scale makes residual sizes legible without implying that values beyond the observations were measured.
The plot’s scale does not tell us whether the assumed mean or variance is appropriate. Those are questions to assess from the residual pattern and other relevant information; the example only shows how scale choice affects what can be seen.
Worked Example: Comparing Two Fits on a Common Scale
Suppose two hypothetical models are fitted to the same five response measurements, in minutes: \(10,12,14,16,18\). Model A has fitted values \(11,11.5,13,16.5,18\), and Model B has fitted values \(10.5,11.75,13.5,16.25,18\). Compare their residual magnitudes using a consistent scale.
For Model A, subtract the fitted values from the observed values: \(10-11=-1\), \(12-11.5=0.5\), \(14-13=1\), \(16-16.5=-0.5\), and \(18-18=0\) minutes. Thus its residuals are \(-1,0.5,1,-0.5,0\), and its largest absolute residual is \(\max(1,0.5,1,0.5,0)=1\) minute.
For Model B, the residuals are \(10-10.5=-0.5\), \(12-11.75=0.25\), \(14-13.5=0.5\), \(16-16.25=-0.25\), and \(18-18=0\) minutes. Its largest absolute residual is \(\max(0.5,0.25,0.5,0.25,0)=0.5\) minute.
If each panel is independently scaled to put its largest residual near the edge, both plots can make their own largest residual look similarly large. Instead, use the same vertical limits for both panels, such as \(-1.2\) to \(1.2\) minutes. On that shared scale, Model A’s largest absolute residual is \(1/1.2\), or about 83.3% of the half-range; Model B’s is \(0.5/1.2\), or about 41.7%. The displayed magnitudes can then be compared directly because the response units and scale are the same.
This comparison concerns the observed residual sizes for these fits, not whether either model is adequate in every respect. Shared limits make the visual comparison fair; they do not replace consideration of context or the diagnostic patterns.
Why Symmetry and Consistency Help
The zero line is a meaningful reference: a residual of zero means the fitted value equals the observed response. If zero is placed close to one boundary, positive and negative residuals receive unequal visual space. A symmetric scale avoids that imbalance and makes distances above and below zero comparable. It is especially useful when residuals are plotted in separate panels or across predictor categories.
A short justification follows directly from the data range. Let \(M=\max_i |e_i|\). By the definition of maximum absolute value, every residual satisfies \(-M \leq e_i \leq M\). If \(M>0\) and \(c>1\), then \(-cM<-M\) and \(M<cM\), so every residual lies inside the symmetric limits \([-cM,cM]\), with some margin. If \(M=0\), all residuals are zero, so choose a nonzero, meaningful symmetric axis range around zero instead. Centering at zero places the reference value halfway between the limits. The margin helps keep extreme points from touching the frame; it does not justify leaving so much empty space that the points become unreadable.
The same principle applies when comparing plots: identical units should generally use identical limits if the goal is to compare visual magnitudes. Independent automatic scaling may be convenient for examining each panel’s internal detail, but it can hide differences in the amount of residual variation. State or show clearly when panels use different limits.
Common Scale Mistakes
- Truncating the residual range. A viewer may set limits around the central cluster and assume the few excluded points are unimportant. The correction is to include every residual, or explicitly disclose any omitted observations and why. A diagnostic plot that silently clips points is misleading.
- Using a narrow range to make a pattern look dramatic. Small vertical differences may occupy most of a tightly cropped plot. The correction is to choose limits that show the full data and preserve context, not to select limits to support a visual claim.
- Using an excessively broad range. A few extreme values can leave most points compressed against zero. The correction is to show all observations while selecting readable limits and ticks; do not hide extremes simply to enlarge the central cluster.
- Comparing independently scaled panels as if they shared a scale. Equal-looking point heights can represent different residual magnitudes. The correction is to use common limits for direct comparison, or label different limits prominently and avoid comparing apparent heights.
- Leaving units or tick spacing unclear. A residual of 0.5 is hard to interpret without knowing whether it means half a minute, half a score point, or something else. Label each axis with its variable and units, and use evenly spaced, legible ticks.
Check Your Understanding
Answer each question using the scale principles from this tutorial.
- A residual set has values \(-0.8, 0.2, 0.6,\) and \(0\). What is the largest absolute residual, and would limits from \(-0.7\) to \(0.7\) display every point?
- Why can a residual axis from \(-10\) to \(10\) make residuals ranging from \(-0.3\) to \(0.3\) difficult to inspect?
- Two residual plots use the same response units, but each panel has different vertical limits. What comparison could be misleading, and how could the plots be changed to support a direct comparison?
- For a residual-versus-predictor plot, what should the horizontal axis show when the predictor is continuous?
- Explain why a symmetric residual scale helps viewers compare positive and negative residuals around the zero line.