0% found this document useful (0 votes)
58 views4 pages

Ho - ANOVA Example

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 4

Newsom

Psy 521/621 Univariate Quantitative Methods, Fall 2020 1

ANOVA Example

Below is the output for the SPSS ONEWAY procedure to compare the means of three school types in the
hypothetical teacher satisfaction example. 1 This is a pretty small sample size per group and such a
small sample is not necessarily recommended. It is certainly legitimate to do an ANOVA with this size
sample, but one should be particularly conscious of unequal variances.

Syntax

means tables=satisfaction by school.


oneway satisfaction by school
/statistics=welch.

Menus
Analyze—Compare Means—One-way ANOVA

Oneway

ANOVA
satisfaction

df Mean Square F Sig.


Between Groups 30.000 2 15.000 8.182 .006

Within Groups 22.000 12 1.833

Total 52.000 14

Robust Tests of Equality of Means


satisfaction

Statistic a df1 df2 Sig.


Welch 14.259 2 7.211 .003

a.

Unequal group sizes, very different variances, and small sample sizes can increase Type I error rates (or
sometimes increase Type II error rates; Clinch & Keselman, 1982; Tomarken & Serlin, 1986). If the ratio
of variances in different groups is less than 4 to 1 and the group sizes are over 5, there is generally a
very minor impact on Type I error rates. If data are very non-normal, variances are very unequal, and/or
the group sample sizes are small and unequal, the Welch's robust test is an alternative that will generally
have a more accurate Type I error rate.

1
It is also possible to do the same one-way ANOVA using several other procedures in SPSS, including the GLM through the menus or GLM,
ANOVA, or MANOVA (syntax only) commands. Use of the GLM procedure, glm satisfaction by school., will give the eta-squared
(shown as R-squared in output), but the Welch's test is not an option.
Newsom
Psy 521/621 Univariate Quantitative Methods, Fall 2020 2

Although the group sizes are equal, the small overall sample size and the relatively substantial
differences in the standard deviations (and therefore larger differences in the variances) suggest that it
may be wise to consider the Welch's test in this case (Welch, 1951). The statistical conclusion does not
differ from the standard F-test, however (this could be noted in a write-up, where either or both is
reported, if this comes up). With larger Ns, as in most of the applications you will encounter, the
correction would likely be unnecessary.

R
library(lessR)
#do this at the beginning of your run and always run it before you open a data set
rm(mydata)
library(haven)
mydata = read_sav("c:/jason/spsswin/uvclass/school anova.sav")

#note: you may need to add data=mydata after brief=TRUE


library(lessR)
ANOVA(satisfaction ~ school, brief=TRUE)
BACKGROUND

Response Variable: satisfaction


Factor Variable: school
Levels: 1 2 3
Number of cases (rows) of data: 15
Number of cases retained for analysis: 15

DESCRIPTIVE STATISTICS
n mean sd min max
1 5 6.00 2.00 4.00 8.00
2 5 9.00 1.00 8.00 10.00
3 5 6.00 0.71 5.00 7.00
Grand Mean: 7

BASIC ANALYSIS

Summary Table
df Sum Sq Mean Sq F-value p-value
school 2 30.00 15.00 8.18 0.0057
Residuals 12 22.00 1.83

Association and Effect Size


R Squared: 0.58
R Sq Adjusted: 0.51
Omega Squared: 0.49
Cohen's f: 0.98

Write-up
Teacher satisfaction differed significantly among the three groups, F(2,12) = 8.18, p = .006. Because of
the substantial differences in variances among groups and the small sample size, the Welch's test was
conducted. The results from the Welch's test also indicted a significant difference among the groups, FW
(2,12) = 14. 26, p = .003. 2 Teachers were most satisfied in charter schools (M = 9.00, SD = 1.00), and
less satisfied in public (M = 6.00, SD=2.00) and private schools (M = 6.00, SD = .71). Approximately 58%
of the variance in satisfaction was accounted for by school type, η2 = .58.

References
Welch, B. L. (1951). On the comparison of several mean values: An alternative approach. Biometrika, 38, 330-336.

2
The Welch test sometimes may be referred to as W. It is not technically and F, but the F distribution is used as the referent distribution when
determining significance.
Newsom
Psy 521/621 Univariate Quantitative Methods, Fall 2020 3

Post Hoc Examples

The results from the one-way ANOVA do not indicate which of the three groups differ from one another,
so, in many cases, it is of interest to follow the analysis with a post hoc test or a planned comparison
among particular means. If several comparisons between pairs of means are made, it is a good idea to
use a test, such as the Tukey, that controls for alpha inflation.

For the present example, there are not too many possible comparisons to make (just 3), so alpha
inflation will not be a tremendous issue. Also, in the case of this artificial example, two of the means are
exactly equal and should not require a statistical test. Nevertheless, to illustrate the use of the Tukey
post hoc approach. I’ve also included the Games-Howell test in SPSS, because very small sample sizes
may be particularly sensitive to the homogeneity of variance assumption.

SPSS

Menus
Analyze -> Compare Means -> One-way ANOVA then choose the dependent variable and factor, click
Post Hoc and then check Tukey and Games-Howell.

Syntax
To obtain the post hoc tests with syntax, the POST HOC subcommand is added.

oneway satisfaction by school


/posthoc=tukey gh.

Post Hoc Tests


Multiple Comparisons
Dependent Variable: satisfaction teacher satisfaction

Mean
Difference 95% Confidence Interval
(I) school school type (J) school school type (I-J) Std. Error Sig. Lower Bound Upper Bound
Tukey HSD 1.000 public 2.000 charter -3.00000* .85635 .011 -5.2846 -.7154
3.000 private .00000 .85635 1.000 -2.2846 2.2846
2.000 charter 1.000 public 3.00000* .85635 .011 .7154 5.2846
3.000 private 3.00000* .85635 .011 .7154 5.2846
3.000 private 1.000 public .00000 .85635 1.000 -2.2846 2.2846
2.000 charter -3.00000* .85635 .011 -5.2846 -.7154
Games-Howell 1.000 public 2.000 charter -3.00000 1.00000 .056 -6.0861 .0861
3.000 private .00000 .94868 1.000 -3.0903 3.0903
2.000 charter 1.000 public 3.00000 1.00000 .056 -.0861 6.0861
3.000 private 3.00000* .54772 .002 1.3978 4.6022
3.000 private 1.000 public .00000 .94868 1.000 -3.0903 3.0903
2.000 charter -3.00000* .54772 .002 -4.6022 -1.3978
*. The mean difference is significant at the .05 level.

Homogeneous Subsets
satisfaction teacher satisfaction

Subset for alpha = .05


school school type N 1 2
Tukey HSDa 1.000 public 5 6.0000
3.000 private 5 6.0000
2.000 charter 5 9.0000
Sig. 1.000 1.000
Means for groups in homogeneous subsets are displayed.
a. Uses Harmonic Mean Sample Size = 5.000.

R
#using the full ANOVA command gives the Tukey follow-up tests
ANOVA(satisfaction ~ school)

TUKEY MULTIPLE COMPARISONS OF MEANS


Newsom
Psy 521/621 Univariate Quantitative Methods, Fall 2020 4

Family-wise Confidence Level: 0.95


-----------------------------
diff lwr upr p adj
2-1 3.00 0.72 5.28 0.01
3-1 0.00 -2.28 2.28 1.00
3-2 -3.00 -5.28 -0.72 0.01

Write-up
The Tukey post hoc tests indicated that teacher satisfaction in the charter schools differed significantly
from teacher satisfaction in public, p = .01, and private schools, p = .01. The Games-Howell test,
however, suggested that the difference between public and charter schools was only marginally
significant, p = .056.

You might also like