Interpreting interaction effects

This web page contains various Excel worksheets which help interpret two-way and three-way interaction effects. They use procedures by Aiken and West (1991), Dawson (2013) and Dawson and Richter (2006) to plot the interaction effects, and in the case of three way interactions test for significant differences between the slopes. You can either use the Excel worksheets directly from this page, or download them to your computer by right-clicking on the relevant links.

A note about standardisation of variables. Standardised variables are those that are both centred around zero and are scaled so that they have a standard deviation of 1. Personally, I prefer to use these when testing interactions because the intepretation of coefficients can be slightly simpler. Some authors, such as Aiken and West (1991), recommend that variables are centred (but not standardised). The results obtained should be identical whichever method you use. If you prefer to analyse centred (but not standardised) variables, you can use the "unstandardised" versions of the Excel worksheets, and enter the mean of the variables as zero.

Two-way interactions

To test for two-way interactions (often thought of as a relationship between an independent variable (IV) and dependent variable (DV), moderated by a third variable), first run a regression analysis, including both independent variables (referred to hence as the IV and moderator) and their interaction (product) term. It is recommended that the independent variable and moderator are standardised before calculation of the product term, although this is not essential. The product term should be significant in the regression equation in order for the interaction to be interpretable.

If you have two unstandardised variables, you can plot your interaction effect by entering the unstandardised regression coefficients (including intercept/constant) and means & standard deviations of the IV and moderator in the following worksheet. If you have control variables in your regression, the values of the dependent variable displayed on the plot will be inaccurate unless you standardise (or centre) all control variables first (although the pattern, and therefore the interpretation, will be correct). 2-way_unstandardised.xls

If you have two standardised variables, you can plot your interaction effect by entering the just unstandardised regression coefficients (including intercept/constant) in the following worksheet. If you have control variables in your regression, the values of the dependent variable displayed on the plot will be inaccurate unless you also standardise (or centre) all control variables first (although the pattern, and therefore the interpretation, will be correct). Note that the interaction term should not be standardised after calculation, but should be based on the standardised values of the IV & moderator. 2-way_standardised.xls

If you have a binary moderator, you can plot your interaction more usefully by entering the unstandardised regression coefficients (including intercept/constant) and mean & standard deviation of your IV in the following worksheet. Again, if you have control variables in your regression, the values of the dependent variable displayed on the plot will be inaccurate unless you also standardise (or centre) all control variables first (although the pattern, and therefore the interpretation, will be correct). The binary variable should have possible values of 0 and 1, and should not be standardised. 2-way_with_binary_moderator.xls

If you want to test simple slopes, you can use the following worksheet. Again, control variables should be centered or standardised before the analysis. However, note that simple slope tests are only useful for testing significance at specific values of the moderator. Where possible, meaningful values should be chosen, rather than just one standard deviation above and below the mean. You will also need to request the coefficient covariance matrix as part of the regression output. If you are using SPSS, this can be done by selecting "Covariance matrix" in the "Regression Coefficients" section of the "Statistics" dialog box. Note that the variance of a coefficient is the covariance of that coefficient with itself - i.e. can be found on the diagonal of the coefficient covariance matrix.  2-way_unstandardised_with_simple_slopes.xls

Other forms of two-way interaction plots that may be helpful for experienced users:

  • Quadratic_two-way_interactions.xls - for plotting curvilinear interactions between a quadratic main effect and a moderator (see below)
  • 2-way_logistic_interactions.xls - for plotting interactions from binary logistic regression
  • 2-way_poisson_interactions.xls - for plotting interactions from generalised linear models with a Poisson outcome. Also works for any other outcome using a log link
  • 2-way_with_all_options.xls - a generalised version of the main worksheets, allowing any combination of continous/binary IV and moderator, and including a simple slope test (see earlier warning about this). Also allows slopes to be plotted at values of the moderator chosen by the user.


Three-way interactions

To test for three-way interactions (often thought of as a relationship between a variable X and dependent variable Y, moderated by variables Z and W), run a regression analysis, including all three independent variables, all three pairs of two-way interaction terms, and the three-way interaction term. It is recommended that all the independent variable are standardised before calculation of the product terms, although this is not essential. As with two-way interactions, the interaction terms themselves should not be standardised after calculation. The three-way interaction term should be significant in the regression equation in order for the interaction to be interpretable.

If you wish to use the Dawson & Richter (2006) test for differences between slopes, you should request the coefficient covariance matrix as part of the regression output. If you are using SPSS, this can be done by selecting "Covariance matrix" in the "Regression Coefficients" section of the "Statistics" dialog box. Note that the variance of a coefficient is the covariance of that coefficient with itself - i.e. can be found on the diagonal of the coefficient covariance matrix.

If you have used unstandardised variables, you can plot your interaction effect by entering the unstandardised regression coefficients (including intercept/constant) and means & standard deviations of the three independent variables (X, Z and W) in the following worksheet. If you have control variables in your regression, the values of the dependent variable displayed on the plot will be inaccurate unless you standardise all control variables first (although the pattern, and therefore the interpretation, will be correct). To use the test of slope differences, you should also enter the covariances of the XZ, XW and XZW coefficients from the coefficient covariance matrix, and the total number of cases and number of control variables in your regression. 3-way_unstandardised.xls

If you have used standardised variables, you can plot your interaction effect by entering the just unstandardised regression coefficients (including intercept/constant) in the following worksheet. If you have control variables in your regression, the values of the dependent variable displayed on the plot will be inaccurate unless you also standardise all control variables first (although the pattern, and therefore the interpretation, will be correct). To use the test of slope differences, you should also enter the covariances of the XZ, XW and XZW coefficients from the coefficient covariance matrix, and the total number of cases and number of control variables in your regression. 3-way_standardised.xls

Other forms of three-way interaction plots that may be helpful for experienced users:

  • Quadratic_three-way_interactions.xls - for plotting curvilinear interactions between a quadratic main effect and two moderators (see below)
  • 3-way_logistic_interactions.xls - for plotting three-way interactions from binary logistic regression
  • 3-way_with_all_options.xls - a generalised version of the main worksheets, allowing any combination of continous/binary IV and moderators, including a simple slope test (see earlier warning about this) as well as the slope difference tests. Also allows slopes to be plotted at specific values of the moderators chosen by the user.

Please note: a previous version of the "3 way with all options" sheet included an error in the slope difference test: apologies for any inconvenience caused. This has now been corrected.


Quadratic Effects

If you wish to plot a quadratic (curvilinear) effect, you can use one of the following Excel worksheets. In each case, you test the quadratic effect by including the main effect (the IV) along with its squared term (i.e. the IV*IV) in the regression. In the case of a simple (unmoderated) relationship, the significance of the squared term determines whether there is a quadratic effect. If you are testing a moderated quadratic relationship, it is the significance of the interaction between the squared term and the moderator(s) that determines whether there is a moderated effect. Note that despite this, all lower order terms need to be included in the regression: so, if you have an independent variable A and moderators B and C, then to test whether there is a three-way interaction you would need to enter all the following terms: A, A*A, B, C, A*B, A*C, A*A*B, A*A*C, B*C, A*B*C, A*A*B*C. It is only the last, however, that determines the significance of the three-way quadratic interaction.


Troubleshooting

There are a number of common problems encountered when trying to plot these effects. If you are having problems, consider the following:

  • If the graph does not appear, it may be because it is off the scale. You can change the scale of the dependent variable by right-clicking on the axis and choosing "Format Axis"

  • Make sure you enter the unstandardised regression coefficients, whether or not you are using standardised variables

  • If you use standardised variables, ensure that you calculate the interaction (product) terms from the standardised variables, but do not standardise the interaction terms themselves

  • When performing simple slopes or slope difference tests, it is easy to enter the wrong figures for variances & covariances of coefficients! SPSS is prone to printing the covariances in a different order from the regression coefficients themselves, which can be confusing. Also, SPSS automatically prints a correlation matrix of the coefficients above the variance-covariance matrix: ensure that you do not enter these in error. Note that the variances of the coefficients are along the diagonal of this matrix: e.g. the variance of the Var1*Var2 coefficient is the covariance of this coefficient with itself.

 

If you think there are any errors in these sheets, please contact me, Jeremy Dawson.

 

References

Aiken, L. S., & West, S. G. (1991). Multiple regression: Testing and interpreting interactions. Newbury Park, London, Sage.

Dawson, J. F. (2014). Moderation in management research: What, why, when and how. Journal of Business and Psychology, 29, 1-19.
(This article includes information about most of the tests included on this page, as well as much more! Click here for this article.)

Dawson, J. F., & Richter, A. W. (2006). Probing three-way interactions in moderated multiple regression: Development and application of a slope difference test. Journal of Applied Psychology, 91, 917-926.

 

Other online resources

Kristopher Preacher's web site contains templates for testing simple slopes, and findings regions of significance, for both 2-way and 3-way interactions. It also includes options for hierarchical linear modelling (HLM) and latent curve analysis.

Yung-jui Yang's web site contains SAS macros to plot interaction effects and run the slope difference tests for three-way interactions