Top of page
Skip to main content

When the slope of X varies with W

When a regression includes X × W, the coefficient on X gives its slope at W = 0. If zero falls outside the sample, calculate slopes at values of W the data can speak to. Friedrich’s published example shows how both the estimated slope and its standard error change with the value you choose.

Start reading

Where does the coefficient on X apply?

Write the fitted value in a linear regression as Ŷ = b0 + bXX + bWW + bXWXW. Hold W at some value w. The coefficient multiplying X is now bX + wbXW. This conditional slope gives the predicted change in Y for a one-unit increase in X at the chosen value of W (Friedrich, 1982, pp. 804–809).

At W = 0, the slope reduces to bX. The interaction coefficient bXW tells you how much that slope changes for a one-unit increase in W. A positive interaction coefficient means that the slope rises as W increases. To see whether the slope is positive or negative at a particular value, plug that value into the expression.

Read slopes within the observed range

In Friedrich’s example, Y is income equality, X is the natural log of energy consumption and W is a measure of democratic performance. The interaction model in Table 2 gives bX = −2.1191 and bXW = 0.1068. The first number looks deceptively simple until you check the reference point. In this sample, W ranges from 18 to 90, so the slope at W = 0 is an extrapolation (Friedrich, 1982, Table 2 and p. 809).

At W = 18, the calculation is −2.1191 + 18 × 0.1068 = −0.1967. The same fitted model gives 7.4929 at W = 90. Those estimates describe the slopes at the ends of the observed range. Their signs alone cannot establish a result about statistical significance.

How the slope varies with WPredicted change in income equality for a one-unit increase in log energy consumption.
The slope rises with W over its observed range of 18 to 90.024681836547290
Slope 3.6481Standard error 1.4571

Calculated from Friedrich (1982), Tables 2 and 4 and Equation 6.

With your own data, look at the distribution of W before choosing where to evaluate the slope. Even a point inside the observed range may have few observations nearby. Pick values that make sense for the research question, then check how well the sample represents them.

The standard error changes with W

The conditional slope combines two estimates from the same model. Its uncertainty depends on how much each estimate varies and how the two estimates vary together. Save the variance–covariance matrix of the estimated coefficients. You need the diagonal entries for bX and bXW and the off-diagonal entry that connects them (Friedrich, 1982, Equation 6 and Table 4).

SE at w = √[Var(bX) + w²Var(bXW) + 2wCov(bX, bXW)].

At W = 18, the three terms under the square root are 19.3882, 18² × 0.003744 and 2 × 18 × (−0.260950). The negative covariance reduces the total variance at this point. Adding just the first two terms gives the wrong standard error for the slope you intend to report.

Slope estimates and standard errors from the published coefficients
Value of WSlope of XStandard error
18−0.19673.3477
543.64811.4571
907.49291.6564

Friedrich reports the two endpoints (pp. 809, 814, 817). The row at W = 54 is a recalculation at the midpoint of the observed range, using Tables 2 and 4 and Equation 6.

Move the reference point to a value worth reporting

To read the slope directly at c, define Wc = W − c and rebuild the product XWc. Keep the same sample and fit the same linear model with an intercept, X, Wc and their product. The fitted values stay the same. The new coefficient on X is bX + cbXW, which is the slope at W = c because that point is now Wc = 0 (Friedrich, 1982, pp. 822–823).

Friedrich subtracts 20 from W. Table 6 reports a new coefficient on X of 0.0171 with SE = 3.2323. Those numbers refer to W = 20 on the original scale. Calculating the slope at 20 from the rounded numbers in Table 2 gives approximately 0.0169. The small difference is within the precision of the printed coefficients. When comparing two codings, put both estimates back at the same value of W before comparing slopes and standard errors.

In your results table, name the value on the original scale and explain why you chose it. Report the slope and its uncertainty. The next article uses these quantities to interpret an interaction plot.

References

  1. Friedrich, R. J. (1982). In defense of multiplicative terms in multiple regression equations. American Journal of Political Science, 26(4), 797–833. https://doi.org/10.2307/2110973