15 minutes ago6 min read
Two-Way ANOVA in SPSS: A Step-by-Step SOP for Interaction Plots and Simple Effects
15 minutes ago
6 min read

A two-way ANOVA in SPSS takes one menu and five dialogs, and three of their defaults can quietly mislead you. The Post Hoc button compares the wrong means once an interaction is involved. The right comparisons are uncorrected unless you change a dropdown. And the post hoc tests built for unequal variances never run in a two-factor model.
This SOP runs the analysis correctly in IBM SPSS Statistics, from data entry to a reportable result, and flags each default where it matters.
What this SOP covers
Ordinary two-way ANOVA: two categorical factors (such as genotype and treatment), one continuous outcome, and one measurement per animal. The point-and-click route needs SPSS Statistics 28 or later. On version 27 or earlier, use the syntax in Step 11. If you measured the same animals more than once, use a repeated-measures model instead.
Why the interaction comes first
The interaction asks whether the effect of one factor depends on the other: whether the drug works differently in wild-type and knockout mice. It is the only test of that question. A drug that reaches p < 0.05 in one genotype and misses it in the other has not been shown to differ between them, yet that inference turns up in about half the papers that need an interaction test. Read the interaction before anything else in the output.
Before you start
SPSS Statistics 28 or later, or any version plus the syntax in Step 11.
Data in long format: one row per animal, one column per factor, one column for the outcome.
At least two biological replicates per group. Without them SPSS cannot estimate the interaction. Replicates must be independent animals or cultures, never repeat readings of one technical sample.
Setting up the data
Step 1. In Variable View, create three variables: genotype, treatment and tumor_volume.
Step 2. Code each factor with numbers and give the codes value labels (1 = WT, 2 = KO; 1 = Vehicle, 2 = Drug), so the output reads in words.
Step 3. In Data View, enter one row per animal.
Running a two-way ANOVA in SPSS
Step 4. Choose Analyze > General Linear Model > Univariate.
Step 5. Move tumor_volume to Dependent Variable, and genotype and treatment to Fixed Factor(s).
Step 6. Click Model and leave the defaults: Full factorial, Type III sum of squares. Type III keeps the tests valid if your groups end up unequal in size.
Step 7. Click Plots. Put treatment on the horizontal axis and genotype in separate lines, then click Add. Nothing is plotted until the plot appears in the Plots list.
Step 8. Click EM Means. Move genotype*treatment into Display Means for, tick Compare simple main effects, and set Confidence interval adjustment to Sidak.
Caution: The adjustment starts at LSD, which applies no correction at all. Change it. Caution: Do not use the Post Hoc button to follow up an interaction. Its tests work on each factor averaged across the other, which is exactly the comparison an interaction makes misleading.
Step 9. Click Options and tick Descriptive statistics, Estimates of effect size, Homogeneity tests and Residual plot.
Step 10. Click Save, tick Unstandardized under Residuals, then click OK.
Tip: Click Paste instead of OK to keep the syntax, so the analysis can be rerun exactly.
Step 11 (SPSS 27 or earlier only). "Compare simple main effects" does not exist before version 28. Open File > New > Syntax and run:
UNIANOVA tumor_volume BY genotype treatment
/METHOD=SSTYPE(3)
/PLOT=PROFILE(treatment*genotype)
/EMMEANS=TABLES(genotype*treatment) COMPARE(treatment) ADJ(SIDAK)
/PRINT=DESCRIPTIVE ETASQ HOMOGENEITY
/SAVE=RESID
/DESIGN=genotype treatment genotype*treatment.Checking the assumptions
Step 12. Read Levene's Test of Equality of Error Variances. A significance value above .05 means the equal-variance assumption holds.
Caution: If Levene's test fails, do not reach for Games-Howell or Tamhane's T2. SPSS does not produce them when the model has more than one factor. Log-transform the outcome and rerun instead; the non-normal data guide covers what to do when that is not enough.
Step 13. Choose Analyze > Descriptive Statistics > Explore, move the saved residual (RES_1) into the Dependent List, click Plots, and tick Normality plots with tests. A Shapiro–Wilk significance above .05 means the residuals are acceptably normal.
Reading the result
Step 14. In Tests of Between-Subjects Effects, read the genotype * treatment row before either main effect.
Step 15. Open the profile plot and decide what you may interpret:
Interaction not significant: read the main effects. The treatment row is the drug's average effect across genotypes.
Interaction significant, lines do not cross: the main effect is real but incomplete. Lead with the simple effects.
Interaction significant, lines cross: ignore the main effects and report only the simple effects.
Step 16. If you need them, read the simple effects in Univariate Tests and Pairwise Comparisons: the drug effect within each genotype, with its confidence interval.
Caution: One genotype significant and the other not is still not evidence that they differ. Only the interaction row in Step 14 can say that.
Worked example
Illustrative data. Tumor volume at day 14, six mice per group:
Genotype | Vehicle (mean ± SD, mm³) | Drug (mean ± SD, mm³) |
WT | 520 ± 78 | 400 ± 72 |
KO | 500 ± 76 | 440 ± 81 |
Levene's test: Sig. = .999. Shapiro–Wilk on the residuals: Sig. = .306. Both assumptions hold.
Source | F (1, 20) | Sig. | Partial η² |
genotype * treatment | 0.92 | .350 | .044 |
treatment | 8.26 | .009 | .292 |
genotype | 0.10 | .753 | .005 |
The interaction is not significant, so Step 15 sends you to the main effect: the drug reduced tumor volume across both genotypes (F(1, 20) = 8.26, p = .009).
The simple effects tell the tempting story: the drug effect in wild-type is significant (−120 mm³, F(1, 20) = 7.34, Sig. = .014) and in the knockout it is not (−60 mm³, Sig. = .191). Read on their own, those two lines suggest the knockout blocks the drug. The interaction row says this experiment cannot tell.
Reporting the result
Report the interaction first: "the genotype × treatment interaction was not significant, F(1, 20) = 0.92, p = .350, partial η² = .044." Then report the effect that answers your question as a difference with its confidence interval. Partial η² is the share of variance an effect explains once the other effects are set aside; the effect size guide covers when to prefer a standardized difference instead.
Troubleshooting
Symptom | Cause | Fix |
"Compare simple main effects" is greyed out | No interaction term in Display Means for | Move genotype*treatment across |
No "Compare simple main effects" option at all | SPSS 27 or earlier | Use the Step 11 syntax |
Games-Howell selected, nothing in the output | Not produced with two factors | Transform and rerun |
Pairwise p-values look uncorrected | Adjustment left at LSD | Set it to Sidak |
Post hoc results ignore the interaction | Post Hoc compares factor averages | Use EM Means simple effects |
No interaction row in the output | One value per group | Add biological replicates |
Two-way ANOVA in SPSS comes down to three settings you change yourself
SPSS computes the right test by default: Type III sums of squares, full factorial model, interaction included. What it will not do is choose your follow-up comparisons, correct them, or warn you that an unequal-variance test was skipped. Set EM Means, set the adjustment, and read the interaction row before anything else.
Your ANOVA is only as good as the experiment behind it. Find the bench protocol for your assay in the CLYTE SOP library.
Frequently asked questions
How do I run simple main effects in SPSS? On version 28 or later: Univariate > EM Means, move the interaction term into Display Means for, tick Compare simple main effects, and set the adjustment. On version 27 or earlier, use /EMMEANS=TABLES(A*B) COMPARE(A) ADJ(SIDAK) in syntax.
Should I use the Post Hoc button after a significant interaction? No. Post Hoc compares each factor averaged across the other, which ignores the interaction. Use EM Means simple effects instead.
Why doesn't Games-Howell appear in my two-way ANOVA? SPSS does not produce Games-Howell, Tamhane's T2, Dunnett's T3 or Dunnett's C when the model contains more than one factor. Transform the outcome instead.
What does partial eta squared mean in SPSS output? The proportion of variance an effect explains, after removing the variance explained by the other effects in the model.
References
IBM. IBM SPSS Statistics Base 31: GLM Univariate Analysis, GLM Model, GLM Profile Plots, GLM Post Hoc Comparisons, GLM Save, GLM Estimated Marginal Means, GLM Options; Explore.
IBM. IBM SPSS Statistics Base 27 and IBM SPSS Statistics Base 28: GLM Estimated Marginal Means (version history of "Compare simple main effects").
UCLA Office of Advanced Research Computing. How can I do tests of simple main effects in SPSS?
Nieuwenhuis S, Forstmann BU, Wagenmakers EJ. Erroneous analyses of interactions in neuroscience: a problem of significance. Nature Neuroscience, 2011;14(9):1105–1107.





