Tutorials › Regression Analysis (Undergraduate) › Check Interaction Plots Against Observed Predictor Coverage

Quantitative Predictor Interactions · Tutorial 342 of 991

Check Interaction Plots Against Observed Predictor Coverage

Learn to read interaction plots alongside the observed predictor values, so you can see where slope differences are supported and where fitted lines extend beyond the data.

Intermediate 10 min read

What You'll Learn

  • Identify the predictor values represented by fitted interaction lines and observed points.
  • Check whether observations cover comparable ranges of the focal predictor at different values of the second predictor.
  • Recognize when a fitted slope difference depends on sparse observations or extrapolation.
  • Use representative slices, color, and small multiples to display continuous predictors responsibly.
  • Distinguish a fitted interaction pattern from the observed coverage available to assess it.

Why Fitted Lines Need Observed Data

An interaction plot can make a change in slope look clear: two fitted lines may diverge as the focal predictor increases. But a fitted line is a model summary, not a picture of how densely the data cover every part of the predictor range. If one line is supported by many observations across that range while another is supported only near one end, the apparent contrast over the full range may depend heavily on extrapolation.

Checking observed predictor coverage means displaying the observed data alongside the fitted interaction lines and asking where observations actually occur. This check does not replace estimating or testing an interaction. It helps you judge what parts of the plotted pattern are supported by the observed predictor combinations and where the model is being asked to extend beyond them.

The Model and What an Interaction Plot Shows

For two quantitative predictors \(x\) and \(z\), consider the linear interaction model

$$ Y_i=\beta_0+\beta_1x_i+\beta_2z_i+\beta_3x_iz_i+\varepsilon_i. $$

Here \(Y_i\) is the outcome for observation \(i\), \(x_i\) and \(z_i\) are its predictor values, and \(\varepsilon_i\) is the error. The model specifies a linear conditional mean in the included terms: \(E(Y_i\mid x_i,z_i)=\beta_0+\beta_1x_i+\beta_2z_i+\beta_3x_iz_i\). For interpreting fitted lines as descriptions of the mean, assume this form is adequate over the predictor region being discussed and that observations provide relevant support there. Usual regression inference also relies on conditions such as independent errors and an appropriate error-variance model; normal errors are often used for exact small-sample inference. A coverage plot alone cannot verify those assumptions.

At a fixed value \(z=z_0\), the conditional fitted line as \(x\) changes is

$$ \widehat{Y}=(\hat{\beta}_0+\hat{\beta}_2z_0)+(\hat{\beta}_1+\hat{\beta}_3z_0)x. $$

Thus, the fitted slope for \(x\) at \(z_0\) is \(\hat{\beta}_1+\hat{\beta}_3z_0\). An interaction plot typically draws this line for each of several selected \(z\) values. When \(z\) is continuous, however, an observed point has its own \(z\) value; it does not automatically belong to every plotted line. A useful display therefore shows the points' actual \(x\) and \(y\) values and communicates their \(z\) values—for example, through color, symbols, or small panels. If a line is drawn for \(z_0\), highlight observations with \(z\) near \(z_0\), rather than implying that distant \(z\) values lie on that slice.

Definition: Observed predictor coverage is the pattern and density of observed predictor values in the region being interpreted. For an interaction between \(x\) and \(z\), assess not only the range of \(x\) overall, but also which \(x\) values are observed at relevant values of \(z\), and whether those combinations are represented adequately.

A Short Justification for Checking Coverage

The model's slope contrast between two fixed values \(z_1\) and \(z_2\) follows directly from the conditional slopes:

$$ (\hat{\beta}_1+\hat{\beta}_3z_2)-(\hat{\beta}_1+\hat{\beta}_3z_1) =\hat{\beta}_3(z_2-z_1). $$

So the fitted lines differ in slope whenever \(\hat{\beta}_3\) and \(z_2-z_1\) are nonzero. This algebra describes the fitted model, not the distribution of observations. If few or no observations support the relevant combinations of \(x\) and \(z\), the lines can still be drawn there, but their plotted separation is not equally well anchored by observed data throughout the displayed range. The line equation alone cannot answer the coverage question; the observed predictor values must be inspected.

Worked Example: Broad Overlap Supports a Visual Comparison

Suppose a hypothetical analysis relates task-performance points \(Y\) to practice hours \(x\) and a centered preparation score \(z\). The fitted equation is \(\widehat{Y}=10+2x+z+0.5xz\). To illustrate two slices, compare \(z=-1\) and \(z=1\). The observed practice-hour ranges for observations near these slices are 0–10 hours in both cases, with points spread across each range.

At \(z=-1\), the fitted line is

$$ \widehat{Y}=(10-1)+(2-0.5)x=9+1.5x. $$

Its predictions at the ends of the observed range are \(9+1.5(0)=9\) points and \(9+1.5(10)=24\) points. At \(z=1\), the line is

$$ \widehat{Y}=(10+1)+(2+0.5)x=11+2.5x, $$

giving \(11+2.5(0)=11\) points and \(11+2.5(10)=36\) points. The estimated slopes are 1.5 and 2.5 points per practice hour, respectively. Because observations near both \(z\) values cover the same broad \(x\) range, a plot can compare the fitted slopes across that range without one line relying on a much longer unsupported extension than the other. The points still matter: a wide range with only a few observations at one end would be weaker support than a similarly wide, well-populated range.

The overlapping coverage makes the comparison more grounded in the observed predictor combinations; it does not prove that the model is correct or that the slope difference is statistically significant. Those are separate questions.

How to Read the Overlay

1
Choose the plotted slices.
Use \(z\) values that are meaningful for the question and lie within the observed range. Record which observations are near each slice.
2
Show the observations and fitted lines together.
Display the actual \(x\) and \(Y\) values. Use color or panels to show the observations' \(z\) values; do not treat all points as though they came from one fixed-\(z\) line.
3
Compare coverage, not just line length.
For each slice, check how far observations extend in \(x\), how densely they cover that range, and whether the slices have comparable coverage.
4
Mark unsupported regions clearly.
If a fitted line extends past the observed \(x\) values for its slice, describe that portion as extrapolation or weakly supported rather than presenting it as equally evidenced.

For continuous \(z\), there may not be many observations with exactly the selected value. A practical display can use narrow, clearly described bands around representative \(z\) values, or small panels showing ranges of \(z\). Bands should not be so broad that they mix substantially different fitted slopes, especially when the interaction is large. Alternatively, color points by their actual \(z\) values and draw selected conditional lines, while making clear that the line represents a fixed \(z\) slice. In every case, keep the observed pairs \((x,z)\) visible or otherwise summarize their distribution.

Worked Example: A Long Fitted Line With Sparse Support

Consider a hypothetical model for crop yield \(Y\), with fertilizer amount \(x\) in kilograms per hectare and a centered soil index \(z\): \(\widehat{Y}=40+x+0.8xz\). The fitted lines are to be compared at \(z=0\) and \(z=2\). In the hypothetical data, observations near \(z=0\) span \(x=0\) to \(10\), while those near \(z=2\) occur only between \(x=8.8\) and \(10\), with just a few observations in that narrow band.

At \(z=0\), the fitted line is \(\widehat{Y}=40+x\), with slope 1 yield unit per kilogram per hectare. Its fitted values at \(x=0\) and \(x=10\) are 40 and 50 yield units. At \(z=2\),

$$ \widehat{Y}=40+(1+0.8(2))x=40+2.6x. $$

The second fitted slope is 2.6 yield units per kilogram per hectare. The model predicts \(40+2.6(8.8)=62.88\) yield units at \(x=8.8\) and \(40+2.6(10)=66\) at \(x=10\). But it has no observations near \(z=2\) at \(x=0\), or across most of the plotted range from 0 to 8.8. Drawing the \(z=2\) line from 0 to 10 may make the slope contrast seem supported across the full range, even though its observed coverage is concentrated near the upper end.

The correct reading is not that the interaction must be false. Rather, the plot shows that the \(z=2\) slope is estimated from a narrow and sparse range, so its extension across the full \(x\) range is weakly supported. A reader should be cautious about broad claims comparing yields at high and low fertilizer amounts for \(z=2\). The observed coverage also signals that a small number of points could have substantial influence on that part of the fitted pattern.

Joint Coverage and Predictor Association

Even when both predictors individually span wide ranges, the observed combinations of \(x\) and \(z\) may be limited. For example, if low \(x\) values occur almost exclusively with low \(z\) values and high \(x\) values almost exclusively with high \(z\) values, the data may contain little information about comparisons that hold one predictor fixed while changing the other. This is why inspecting the joint predictor coverage matters: a plot of the outcome against \(x\) alone can hide which \(z\) values accompany each part of the \(x\) range.

The fitted model still supplies conditional lines for any chosen \(z\), but a line at \(z=z_0\) is well supported only where observations near that \(z_0\) also cover the relevant \(x\) values. Empty regions in the observed \((x,z)\) combinations are not filled in by drawing more of the fitted line. If the predictors are associated, describe that pattern and distinguish observed combinations from model-based extensions.

Worked Example: Wide Marginal Ranges but Little Joint Overlap

Suppose a hypothetical model relates a greenhouse growth measure \(Y\) to light exposure \(x\) in hours and a centered nutrient index \(z\): \(\widehat{Y}=20+0.5x+3z+0.4xz\). The observed predictor pairs lie approximately along a diagonal: \((0,-2),(2,-1),(4,0),(6,1),(8,2)\), with additional observations clustered near those pairs. Thus, \(x\) ranges from 0 to 8 and \(z\) ranges from -2 to 2, but observations at low \(x\) tend to have low \(z\), and observations at high \(x\) tend to have high \(z\).

The conditional slope for \(x\) at \(z=-2\) is \(0.5+0.4(-2)=-0.3\) growth units per light hour. The line at that \(z\) is

$$ \widehat{Y}=20+3(-2)+(0.5+0.4(-2))x=14-0.3x. $$

It predicts 14 at \(x=0\) and \(14-0.3(8)=11.6\) at \(x=8\). At \(z=2\), the slope is \(0.5+0.4(2)=1.3\) growth units per light hour, and the fitted line is

$$ \widehat{Y}=20+3(2)+(0.5+0.4(2))x=26+1.3x. $$

This line predicts 26 at \(x=0\) and \(26+1.3(8)=36.4\) at \(x=8\). Yet the observed pairs put \(z=-2\) near \(x=0\) and \(z=2\) near \(x=8\); they do not show observations near \(z=2,x=0\) or \(z=-2,x=8\). Therefore the two lines' predictions at the opposite ends of the range rely on combinations far from the observed cloud. The plot should make that limitation visible. The fact that each predictor has a wide marginal range does not mean the conditional slopes are equally supported over all \(x\) values.

Common Mistake: Treating Every Line Segment as Equally Evidenced

  • Wrong reasoning: “The fitted lines are drawn from \(x=0\) to \(x=10\), so the slope difference is supported throughout that interval.”
  • Correction: A line can be drawn anywhere the model equation can be evaluated. Check whether observations at the relevant \(z\) values actually cover each part of the \(x\) interval.
  • Wrong reasoning: “Both predictors have a wide range, so all predictor combinations are represented.”
  • Correction: Inspect their joint coverage. Strong association between predictors can leave large parts of the \((x,z)\) plane empty.
  • Wrong reasoning: “A sparse region proves the interaction is absent.”
  • Correction: Sparse coverage limits how confidently the plotted pattern can be interpreted in that region; it does not establish that the interaction is zero.
Key takeaway: Read a fitted interaction line together with the observed predictor coverage. A slope contrast is a feature of the fitted equation, while the range and density of observations determine where that contrast is directly supported by the data.

Check Your Understanding

Use the fitted lines and observed predictor patterns to answer these questions.

  1. For the model \(\widehat{Y}=5+2x+z+0.3xz\), what is the fitted slope for \(x\) at \(z=2\)? State the units if \(Y\) is measured in points and \(x\) in hours.
  2. In a plot, one selected \(z\) slice has observations across the full \(x\) range, while another has observations only near its upper end. Which portion of the second fitted line should be treated cautiously, and why?
  3. Why does displaying observations against \(x\) without showing or summarizing their \(z\) values provide an incomplete coverage check for an interaction?
  4. Suppose each predictor has a broad range, but observed pairs lie close to a diagonal in the \((x,z)\) plane. What does this suggest about predictions at combinations far from that diagonal?
  5. Does a region with few observed points prove that the interaction is absent? Explain what the coverage plot does and does not establish.