[SPSS] Moderated Moderation / 3-way interaction with PROCESS Macro

From Introduction to Mediation, Moderation, and Conditional Process Analysis, Third Edition: A Regression-Based Approach by Andrew F. Hayes. Copyright © 2022 The Guilford Press. (p. 622)

A moderated moderation model, or three-way interaction, is an interaction between x, w, and z. In this model, W is a primary moderator, and Z is a secondary moderator. Simply speaking, this means that the size or direction of the interaction effect between X and W varies (= is moderated) depending on the level of Z. The formula for the moderated moderation model is as follows, and the index of moderated moderation is B7 (the coefficient of XWZ). The coefficients B4, B5, and B6 are the conditional effects.

This model could be easily tested using PROCESS Macro in SPSS or R. The syntax is as follows. You do not need to add seed= in the syntax since it does not include the mediating effect and does not require the bootstrapig.

process y=y_var/x=indep_var/w=moderator1/z=moderator2/cov=cov1 cov2 cov3.../model=3/jn=1/plot=1.

In the output, you need to check the following statistics.

Product terms key: 
 Int_1    :        X    x        W
 Int_2    :        X    x        Z
 Int_3    :        W    x        X
 Int_4    :        X    x        W    x        Z
Likelihood ratio test(s) of highest order 
unconditional interactions(s): 
          Chi-sq         df          p 
X*W*Z     5.3034     1.0000      .0213

The results will return the four interaction terms. As mentioned above in the formula, the interaction terms 1~3 are the conditional effects. The moderated moderation effect can be found in the line starting with Test(s) of highest order unconditional interaction(s): or Likelihood ratio test(s) of highest order unconditional interactions(s): (in the case of logistic regressions). You can find the the X*W*Z interaction is significant with the p-value less than 0.5.

Plotting binary moderator * continuous moderator

Let’s try to plot this moderated moderation result with two moderators – the primary moderator for the continuous variable and the secondary moderator as the binary variable.

  • y_var: dependent variable
  • x_var: independent variable
  • moderator1: continuous moderator
  • moderator2: binary moderator

The command plot=1 will return the results to create the dataset for plotting in SPSS. Run these commands.

If it has created the new dataset, you can graph the moderated moderation by using GRAPH the command. The default commands PROCESS Macro (GRAPH/SCATTERPLOT=) provide the scatterplot graph, but we need the line graph for the publication-quality figure.

Here is the command for the line graph for the created dataset. In essence, the moderation effect for the binary or categorical moderator (in total, a 3-way interaction) can be visualized by drawing a moderation effect (BY indep_var BY moderator1) figure for each category. Here, we specify COLVAR=moderator2 for this purpose.

  /LINE(MULTIPLE)=MEAN(y_var) BY indep_var BY moderator1

Unfortunately, SPSS does not allow you to change the line color and marker shape in the syntax for GRAPH command. You need to change the style of the graph by clicking some settings.

If you would love to change the style/look of the lines, you need to click the lines and then go to the variables tab and then change under the setting for interpolation line in the properties panel. You need to put the setting column panel (1) to have two figures by the binary moderator. If not, it will be combined into one figure.

After done with editing the graph style, close the editing window and then click the export button. I always recommend saving in pdf format for all visualization files so that you can change some text if needed and also have a high-resolution figure.

Here is the sample figure that I created by following the same steps. The PROCESS Macro automatically conduct logistic regressions for the binary outcome (y) variable, so I used the probability for the outcome variable here.


Graphing Interactions using the PROCESS Macro in SPSS

▶️ Link to download slides

▶️ ResearchGate: How to plot the three-way interaction?

▶️ How can I understand a 3-way continuous interaction? (Stata 12) – OARC Stats

▶️ PROCESS templates to graph conditional effects

  • May 5, 2023