# Binary logistic regression interaction term

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 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.

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.

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. 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. Note that the variance of a coefficient is the covariance of that coefficient with itself - i. Other forms of two-way interaction plots that may be helpful for experienced users: 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 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.

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. Other forms of three-way interaction plots that may be helpful for experienced users: This has now been corrected.

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. 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: It is only the last, however, that determines the significance of the three-way quadratic interaction. 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.

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. 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.

Other forms of three-way interaction plots that may be helpful for experienced users: This has now been corrected. 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. 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: It is only the last, however, that determines the significance of the three-way quadratic interaction. 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.

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: Note that the variances of the coefficients are along the diagonal of this matrix: If you think there are any errors in these sheets, please contact me, Jeremy Dawson.

Testing and interpreting interactions. Newbury Park, London, Sage. Moderation in management research: What, why, when and how. Journal of Business and Psychology, 29, This article includes information about most of the tests included on this page, as well as much more!

Click here for this article. Probing three-way interactions in moderated multiple regression: Development and application of a slope difference test. Journal of Applied Psychology, 91, 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. Cameron Brick's web site contains instructions on how to plot a three-way interaction and test for differences between slopes in Stata. Interpreting interaction effects This web page contains various Excel worksheets which help interpret two-way and three-way interaction effects.