# How do I test for an interaction involving a continuous variable (moderation analysis)?

Occasionally you might want to test an interaction involving at least one continuous variable in a regression e.g. for looking at moderation effects. This involves obtaining the product of the continuous variable with any other terms in the interaction. This term may then be fitted in a regression also including lower order combinations of the variables involved in the interactions.

It is suggested (Aiken and West, 1991; Shieh, 2012; Field, 2013) that any continuous variables involved in an interaction are centred. One reason for centering a continous predictor (Shieh, 2012) is that centering can reduce the chance of multicollinearity caused by high correlations between predictors without changing the model. Multicollinearity can falsely inflate predictor effect standard errors and, in extreme cases, standard errors may not even be estimable. Secondly, centering can also aid the interpretation of an interaction e.g. by using a value, namely the predictor mean, which is actually taken by the (continuous) predictor variable, as a reference point. Zero is not always defined as a value for continuous predictors.

Centering is done by subtracting the variable's sample mean from each subject value. This ensures that the value 'zero' is meaningful for the continuous variable (covariate). When the covariate is zero the response is simply the covariate adjusted difference between the groups at the overall covariate mean so a zero value of the covariate has special importance in ANCOVA.

Perhaps the easiest way to fit a model containing an interaction involving a continuous variable in SPSS is to use the anova procedures available using the menu procedures under analyze>general linear model.

Although interactions involving continuous variables (covariates in SPSS) are not fitted by default in SPSS, you can create these product terms by clicking on the model button in the GLM univariate or repeated measures options.

Examples involving continuous variable interactions are available:

Two way interaction between one categorical and one continuous variable (any number of categories).

Two way interaction between one categorical and one continuous variable (2 categories)

Interaction between two continuous variables. The Aiken and West (1991) reference in this wikipedia article is available from the CBSU library. They suggest following Cohen and Cohen (1983, p.323) centering the moderator variable (Z) and comparing three regression lines of X on Y at Z values equal to -1, 0 and +1 which correspond to one sd below (the moderator variable) mean, the mean and one sd above the mean. This approach is also illustrated by O'Connor (1998).

There is also an on-line calculator which uses the method "Simple Intercepts, Simple Slopes, and Regions of Significance in MLR 2-Way Interactions" suggested by Aiken and West (1991) here and described in pdf format here and work by Preacher, Curran and Bauer (2006) here. A copy of their paper is also here. This latter website utilises R code via a web interface to produce results using the regression estimates, their variances and covariances which may be obtained from any standard linear regression output e.g. in SPSS. A region of significance looks at how the group difference varies with values of the covariate. Alternatively SPSS (and SAS) macros to compute regions of significance are given by Hayes and Matthews (2009).

The covariance involving intercepts, however, is not outputted directly in SPSS (see here).

Lee, Lei and Brody (2015) present multiple regression models looking at decomposing interactions of two variables (XZ) and present formulae for obtaining confidence intervals for the crossover point at which two lines each corresponding to two values of one of these variables (e.g. for X=0 and X=1) intersect.

References

Aiken, L.S. and West, S.G. (1991). Multiple regression: testing and interpreting interactions. Sage:Newbury Park. (In CBSU library).

Cohen, J. and Cohen, P. (1983). Applied multiple regression/correlation analysis for the behavioral sciences. Second edition. Lawrence Erlbaum: Hillsdale, NJ. (In CBSU library).

Field, A. (2013). Discovering statistics using IBM SPSS Statistics. Fourth Edition. Sage:London.

Hayes, A. and Matthews, J. (2009). Computational procedures for probing interactions in OLS and logistic regression: SPSS and SAS implementations. *Behavior Research Methods* **41** 924-936.

Howell, D.C. (2013). Statistical methods for psychology. 8th Edition. International Edition. Wadsworth:Belmont,CA. (Pages 551-556 illustrate moderation analysis).

Lee, S., Lei, M-K. and Brody, G. H. (2015). Confidence Intervals for Distinguishing Ordinal and Disordinal Interactions in Multiple Regression. *Psychological Methods* **20(2)** 245-258.

Ng, M. and Rand R. Wilcox, R. R. (2012). Bootstrap methods for comparing independent regression slopes *British Journal of Mathematical and Statistical Psychology* **65(2)** 282–301. This article motivates the use of two new ways of testing for an interaction with one group and one continuous variable (regression slopes) each using the bootstrap approach.

O'Connor, B. P. (1998). All-in-one programs for exploring interactions in moderated multiple regression. *Educational and Psychological Measurement* **58** 833-837.

Preacher, K. J., Curran, P. J., & Bauer, D. J. (2006). Computational tools for probing interaction effects in multiple linear regression, multilevel modeling, and latent curve analysis. *Journal of Educational and Behavioral Statistics*, **31**, 437-448.

Shieh, G. (2012). Clarifying the role of mean centering in multicollinearity of interaction effects. *British Journal of Mathematical and Statistical Psychology* **64(3)** 462-477.