SPSS tutorials website header logo SPSS TUTORIALS VIDEO COURSE BASICS ANOVA REGRESSION FACTOR

How to Get (Partial) Eta Squared from SPSS?

SPSS Eta Squared One Way ANOVA Output

In ANOVA, we always report

We report these 3 numbers for each effect -possibly just one for one-way ANOVA. Now, p (“Sig.” in SPSS) tells us the likelihood of some effect being zero in our population. A zero effect means that all means are exactly equal for some factor such as gender or experimental group.

However, some effect just being not zero isn't too interesting, is it? What we really want to know is: how strong is the effect? We can't conclude that p = 0.05 indicates a stronger effect than p = 0.10 because both are affected by sample sizes and other factors. So how can we quantify how strong effects are for comparing them within or across analyses?
Well, there's several measures of effect size that tell us just that. One that's often used is (partial) eta squared, denoted as η2 (η is the Greek letter eta).

Partial Eta Squared - What Is It?

Partial η2 a proportion of variance accounted for by some effect. If you really really want to know: $$partial\;\eta^2 = \frac{SS_{effect}}{SS_{effect} + SS_{error}}$$
where SS is short for “sums of squares”, the amount of dispersion in our dependent variable. This means that partial η2 is the variance attributable to an effect divided by the variance that could have been attributable to this effect.
We can easily verify this -and many more calculations- by copy-pasting SPSS’ ANOVA output into this GoogleSheet as shown below.

SPSS Eta Squared Means Menu 720

Note that in one-way ANOVA, we only have one effect. So the variance in our dependent variable is either attributed to the effect or it is error. So for one-way ANOVA $$partial\;\eta^2 = \frac{SS_{effect}}{SS_{total}}$$
which is equal to (non partial) η2. Let's now go and get (partial) η2 from SPSS.

Example: Happiness Study

A scientist asked 120 people to rate their own happiness on a 100 point scale. Some other questions were employment status, marital status and health. The data thus collected are in happy.sav, part of which is shown below.

SPSS Partial Eta Squared Variable View

We're especially interested in the effect of employment on happiness: (how) are they associated and does the association depend on health or marital status too? Let's first just examine employment with a one-way ANOVA.

Eta Squared for One-Way ANOVA - Option 1

SPSS offers several options for running a one-way ANOVA and many students start off with Analyze SPSS Menu Arrow Compare Means SPSS Menu Arrow One-Way ANOVA but -oddly- η2 is completely absent from this dialog.
We'll therefore use MEANS instead as shown below.

SPSS Eta Squared Means Menu 720 SPSS Eta Squared One Way ANOVA Means Dialog

Clicking Paste results in the syntax below. Since it's way longer than necessary, I prefer just typing a short version that yields identical results. Let's run it.

SPSS Syntax for Eta Squared from MEANS

*Means command as pasted from menu.

MEANS TABLES=happy BY employed
/CELLS=MEAN COUNT STDDEV
/STATISTICS ANOVA.

*Short version (creates identical output).

means happy by employed
/statistics.

Result

SPSS Eta Squared One Way ANOVA Means Output

And there we have it: η2 = 0.166: some 17% of all variance in happiness is attributable to employment status. I'd say it's not an awful lot but certainly not negligible.
Note that SPSS mentions “Measures of Association” rather than “effect size”. It could be argued that these are interchangeable but it's somewhat inconsistent anyway.

Eta Squared for One-Way ANOVA - Option 2

Perhaps the best way to run ANOVA in SPSS is from the univariate GLM dialog. The screenshots below guide you through.

SPSS Partial Eta Squared Glm Univariate SPSS Eta Squared One Way ANOVA Glm Univariate Dialog

This results in the syntax shown below. Let's run it, see what happens.

SPSS Syntax for Eta Squared from UNIANOVA

*One-way ANOVA with eta squared as pasted from Analyze - General Linear Model - Univariate.

UNIANOVA happy BY employed
/METHOD=SSTYPE(3)
/INTERCEPT=INCLUDE
/PRINT=ETASQ
/CRITERIA=ALPHA(.05)
/DESIGN=employed.

Result

SPSS Eta Squared One Way ANOVA Output

We find partial η2 = 0.166. It was previously denoted as just η2 but these are identical for one-way ANOVA as already discussed.

Partial Eta Squared for Multiway ANOVA

For multiway ANOVA -involving more than 1 factor- we can get partial η2 from GLM univariate as shown below.

SPSS Partial Eta Squared Glm Univariate

As shown below, we now just add multiple independent variables (“fixed factors”). We then tick Estimates of effect size under Options and we're good to go.

SPSS Partial Eta Squared Two Way ANOVA Glm Univariate Dialog

Partial Eta Squared Syntax Example

*Two-way ANOVA with partial eta squared. Pasted from Analyze - General Linear Model - Univariate.

UNIANOVA happy BY employed healthy
/METHOD=SSTYPE(3)
/INTERCEPT=INCLUDE
/PRINT=ETASQ
/CRITERIA=ALPHA(.05)
/DESIGN=employed healthy employed*healthy.

Result

SPSS Partial Eta Squared 2 Way ANOVA Output

First off, both main effects (employment and health) and the interaction between them are statistically significant. The effect of employment (η2 = .095) is twice as strong as health (η2 = 0.048). And so on.
Note that you couldn't possibly conclude this from their p-values (p = 0.003 for employment and p = 0.018 for health). Although the effects are highly statistically significant, the effect sizes are moderate. We typically see this pattern with larger sample sizes.
Last, we shouldn't really interpret our main effects because the interaction effect is statistically significant: F(2,114) = 4.9, p = 0.009. As explained in SPSS Two Way ANOVA - Basics Tutorial, we'd better inspect simple effects instead of main effects.

Conclusion

We can get (partial) η2 for both one-way and multiway ANOVA from Analyze SPSS Menu Arrow General Linear Model SPSS Menu Arrow Univariate but it's restricted to one dependent variable at the time. Generally, I'd say this is the way to go for any ANOVA because it's the only option that gets us all the output we generally need -including post hoc tests and Levene's test.

We can run multiple one-way ANOVAs with η2 in one go with Analyze SPSS Menu Arrow Compare Means SPSS Menu Arrow Means but it lacks important options such as post hoc tests and Levene's test. These -but not η2 - are available from the One-Way ANOVA dialog. This renders both options rather inconvenient unless you need a very basic analysis.

Last, several authors prefer a different measure of effect size called ω2 (“Omega square”). Unfortunately, this seems completely absent from SPSS. For now at least, I guess η2 will have to do...

I hope you found this tutorial helpful. Thanks for reading!

Variance – What Is It?

The variance is a number that indicates how far a set of numbers lie apart. The variance is identical to the squared standard deviation and hence expresses “the same thing” (but more strongly).

Variance - Example

A study has 100 people perform a simple speed task during 80 trials. For each participant, 80 reaction times (in seconds) are thus recorded. Part of these data are shown below.

Variance - Raw Data View

In studies like these, we typically see that people get faster as they perform the speed task more often. That is, the average reaction time tends to decrease over trials.
Also, reaction times will typically vary less between different people insofar as they perform the task more often. Technically, we say that the variance decreases over trials. The table below illustrates this for trials 1,4,7 and 10.

Variance - SPSS MEANS Table

Variance and Histogram

A great way to visualize the data from our previous table is a histogram for each trial. Like so, the figure below illustrates that participants got faster over trials; from trial 1 to trial 10 the histogram bars move leftwards, towards 0 seconds.

Variance - Histograms Indicating Different Variances

A second finding is that the histograms become narrower (and therefore higher) as we move from trial 1 to trial 10; this illustrates that reaction times vary less and less between our participants as the experiment progresses. The variance decreases over trials.

Variance - Population Formula

A basic formula for calculating the variance is

$$S^2 = \frac{\sum(X - \overline{X})^2}{n}$$

We recommend you try to understand what this formula does because this helps a lot in understanding ANOVA (= analysis of variance). We'll therefore demonstrate it on a mere handful of data.

Variance - GoogleSheets

For the sake of simplicity, we'll cut down our data to the first trial for the first 5 participants. These 5 reaction times -and a manual calculation of their variance- are in this GoogleSheet.

Variance - Manual Calculation in GoogleSheet

Variance - Calculation Steps

The formulas in the GoogleSheet show precisely how to calculate a variance. The basic steps are

  1. calculate the mean reaction time (2.15);
  2. calculate deviation scores (reaction time minus mean reaction time);
  3. calculate squared deviation scores;
  4. add squared deviation scores. The result (0.49) is a sum of squares, the main building block of ANOVA;
  5. divide the sum of squares by the number of observations (5 reaction times).

Alternatively, calculate a variance by typing =VARP(B2:B6) in some cell (B2:B6 are the cells that hold our 5 reaction times). VARP is short for “variance population”. OpenOffice and MS Excel contain similar formulas.

Variance - Sample Formula

Similarly to the standard deviation, if our data are a simple random sample from a much larger population, the aforementioned formula will systematically underestimate the population variance. In this case we'll use a slightly different formula:

$$S^2 = \frac{\sum(X_i - \overline{X})^2}{n - 1}$$

Which formula to use thus depends on our data: do they contain the entire population we'd like to investigate or are they a mere sample from this population?
Since our 100 participants are clearly a sample, we'll use the sample formula. In GoogleSheets, typing =VAR(B2:B6) in some cell will return the sample variance.

Variance in SPSS

Insofar as we know, the formula for the population variance is completely absent from SPSS and we consider this a serious flaw. Instead, SPSS always uses the sample formula.This goes for the between subjects variance (discussed in this tutorial) as well as the within subjects variance. Relevant output is shown below.

Variance - SPSS Descriptives Table

Regarding this output table, also note that the variance is indeed the squared standard deviation (apart from rounding).

Regarding the variance, that's about it. We hope you found this tutorial helpful in understanding what a variance is.