Plot Interaction Effects of Categorical Variables in SPSS

This tutorial shows how you can plot interactions of categorical variables in SPSS. That is, the 2 independent variables (IVs) are categorical variables and the dependent variable is numerical.

Since both of the IVs (City and Brand, see the figure below) are categorical variables, we are going to use bar charts to plot the interaction effect. For this tutorial, you can download the dataset of categorical independent variables from this GitHub link to practice.

SPSS - Data View - Data Example for plot - Plot Interaction Effects of Categorical Variables

1. Steps of Plotting Interaction Effects of Categorical Variables

The following demonstrates the 8 steps of plotting the interaction effect of two categorical indedependent variables (the DV of sales is a continuous variable) in SPSS.

  1. Click Graphs
    SPSS Plot Interaction Effects of Categorical Variables – Steps 1 and 2
  2. Click Chart Builder
  3. Select Bar
    SPSS Plot Interaction Effects of Categorical Variables – Steps 3 and 4
  4. Double Click “Clustered Bar.” After the double click, the framework of bar chart will pop up, see below. Note that, all the Y-axis, X-axis and “Cluster on X: set color” are empty and we need to drag corresponding variables into thoese boxes (see the next steps).
    SPSS Plot Interaction Effects of Categorical Variables – Result of Step 4
  5. Drag the dependent variable (i.e., DV of sales) on the y-axis box
    SPSS Plot Interaction Effects of Categorical Variables – Steps 5, 6, 7 and 8
  6. Drag one categorical IV (e.g., City) into the x-axis box
  7. Drag the other categorical IV (e.g., Brand) into the “Cluster on X set color.” The following figure shows labels for conceptual names: DV: Sales, IV1: City, and IV2: Brand.
    Plot Interaction effects of Categorical Variables in SPSS (step 2)
  8. Finally, click OK.

2. Final Plot Figure and Interpretation

Then, we can see the final plot shown below. We can see that IV1 City is on the x-axis, whereas IV2 Brand is the legend, which uses two different colors (Blue and Green) to indicate two brands. The y-axis is the dependent variable of sales.

SPSS Plot Interaction Effects of Categorical Variables – Final Bart Chart Figure


One way to interpret the interaction plot (or, interaction effect) is based on mean differences. We can calculate the means of 4 cells to understand the meaning of the interaction. We can use the following table to better summarize the results.

In particular, for Brand 1, the sales difference between City 1 and City 2 is 41.1. For Brand 2, the difference is 0.2. Therefore, a significant interaction means that 0.2 and 41.1 are statistically significant.

Brand 1Brand 2
City 148.06.8
City 27.06.6
Difference between City 1 and City 248.0-7.0=41.06.8-6.6=0.2
Interpret Interaction Effects in Linear Regression Models, for 2 Categorical Variables