SPSS tutorials website header logo SPSS TUTORIALS BASICS DATA ANALYSIS REGRESSION ANOVA T-TESTS

SPSS ANOVA – Levene’s Test “Significant”

An assumption required for ANOVA is homogeneity of variances. We often run Levene’s test to check if this holds. But what if it doesn't? This tutorial walks you through.

Example Data

All analyses in this tutorial use staff.sav, part of which is shown below. We encourage you to download these data and replicate our analyses.

SPSS Staff Data View

Our data contain some details on a sample of N = 179 employees. The research question for today is: is salary associated with region? We'll try to support this claim by rejecting the null hypothesis that all regions have equal mean population salaries. A likely analysis for this is an ANOVA but this requires a couple of assumptions.

ANOVA Assumptions

An ANOVA requires 3 assumptions:

  1. independent observations;
  2. normality: the dependent variable must follow a normal distribution within each subpopulation.
  3. homogeneity: the variance of the dependent variable must be equal over all subpopulations.

With regard to our data, independent observations seem plausible: each record represents a distinct person and people didn't interact in any way that's likely to affect their answers.

Second, normality is only needed for small sample sizes of, say, N < 25 per subgroup. We'll inspect if our data meet this requirement in a minute.

Last, homogeneity is only needed if sample sizes are sharply unequal. If so, we usually run Levene's test. This procedure tests if 2+ population variances are all likely to be equal.

Quick Data Check

Before running our ANOVA, let's first see if the reported salaries are even plausible. The best way to do so is inspecting a histogram which we'll create by running the syntax below.

*Run basic histogram on salary.

frequencies salary
/format notable
/histogram.

Result

SPSS Histogram Staff Salary

Let's now proceed to the actual ANOVA.

SPSS ANOVA Dialogs I

After opening our data in SPSS, let's first navigate to Analyze SPSS Menu Arrow General Linear Model SPSS Menu Arrow Univariate as shown below.

SPSS General Linear Model Univariate

Let's now fill in the dialog that opens as shown below.

SPSS ANOVA Homogeneity Test Dialogs

Completing these steps results in the syntax below. Let's run it.

*ANOVA with descriptive statistics, Levene's test and effect size: (partial) eta squared.

UNIANOVA salary BY region
/METHOD=SSTYPE(3)
/INTERCEPT=INCLUDE
/PRINT ETASQ DESCRIPTIVE HOMOGENEITY
/CRITERIA=ALPHA(.05)
/DESIGN=region.

Results I - Levene’s Test “Significant”

The very first thing we inspect are the sample sizes used for our ANOVA and Levene’s test as shown below.

SPSS ANOVA Levenes Test Significant Output

The combination of these last 2 points implies that we can not interpret or report the F-test shown in the table below.

SPSS ANOVA F Test Effect Size

As discussed, we can't rely on this p-value for the usual F-test.

However, we can still interpret eta squared (often written as η2). This is a descriptive statistic that neither requires normality nor homogeneity. η2 = 0.046 implies a small to medium effect size for our ANOVA.

Now, if we can't interpret our F-test, then how can we know if our mean salaries differ? Two good alternatives are:

Let's start off with the Welch statistic.

SPSS ANOVA Dialogs II

For inspecting the Welch statistic, first navigate to Analyze SPSS Menu Arrow Compare Means SPSS Menu Arrow One-Way ANOVA as shown below.

SPSS Analyze Compare Means One Way ANOVA

Next, we'll fill out the dialogs that open as shown below.

SPSS Oneway ANOVA Dialogs

This results in the syntax below. Again, let's run it.

*ANOVA with Welch statistic and Games-Howell post hoc tests.

ONEWAY salary BY region
/STATISTICS HOMOGENEITY WELCH
/MISSING ANALYSIS
/POSTHOC=GH ALPHA(0.05).

Results II - Welch and Games-Howell Tests

As shown below, the Welch test rejects the null hypothesis of equal population means.

SPSS ANOVA Welch Statistic Output

This table is labelled “Robust Tests...” because it's robust to a violation of the homogeneity assumption as indicated by Levene’s test. So we now conclude that mean salaries are not equal over all regions.

But precisely which regions differ with regard to mean salaries? This is answered by inspecting post hoc tests. And if the homogeneity assumption is violated, we usually prefer Games-Howell as shown below.

SPSS ANOVA Games Howell Post Hoc Tests Output

Note that each comparison is shown twice in this table. The only regions whose mean salaries differ “significantly” are North and Top 4 City.

Plan B - Kruskal-Wallis Test

So far, we overlooked one issue: some regions have sample sizes of n = 15 or n = 16. This implies that the normality assumption should be met as well. A terrible idea here is to run

for each region separately. Neither test rejects the null hypothesis of a normally distributed dependent variable but this is merely due to insufficient sample sizes.

A much better idea is running a Kruskal-Wallis test. You could do so with the syntax below.

*Kruskal-Wallis test from Analyze - Nonparametric Tests - Legacy Dialogs - K Independent Samples.

NPAR TESTS
/K-W=salary BY region(1 5)
/STATISTICS DESCRIPTIVES
/MISSING ANALYSIS.

Result

SPSS Kruskal Wallis Test Output

Sadly, our Kruskal-Wallis test doesn't detect any difference between mean salary ranks over regions, H(4) = 6.58, p = 0.16.

In short, our analyses come up with inconclusive outcomes and it's unclear precisely why. If you've any suggestions, please throw us a comment below. Other than that,

Thanks for reading!

Tell us what you think!

*Required field. Your comment will show up after approval from a moderator.

THIS TUTORIAL HAS 2 COMMENTS: