We are now going to learn to compare the means from several groups using the
one-way ANOVA in JASP.
For this example, we are going to create our dataset in
Excel, import those data into JASP, and learn some new JASP data skills along
the way. Here is the research story for our one-way ANOVA: Following a series of
complaints about wicked witches, The Wizard of Oz conducts a study to
determine if certain regions of Oz have more problems with wicked witches than
other regions. He randomly surveys five Munchkins from each of the four regions
and records the number of complaints that he receives about wicked witchiness
from each one. Is there a difference in which wickedness between regions?
Let's start by entering our data.
Let's begin by looking at the data in the CSV.
Notice that we have two columns: the first column (labeled "Region") is a series of
1, 2, 3, and 4, indicating each of the four regions. We would call this type
of variable a "Factor". We will attach labels to each of these regions in JASP
The second column (labeled "Complaints") contains the data from each
of the four regions, entered in order, within a single column. The first five
individual complaints were from the north region, which is . The second
five are from the south region, which is 2. The third five are from the east
region, which is 3, and the last five are from the west region which is 4.
The data have been saved as WickedWitch.csv, and we are ready to begin begin.
By placing the data set WickedWitch.csv on your computer Desktop, we open our
data set by clicking in the upper left corner on the main menu icon and then
selecting Open -> Computer -> Desktop -> WickedWitch.csv and then clicking Open.
Let's look at our data. The variables have imported, but we need to make some
changes. Region is a categorical (or nominal) variable. On the left edge of the
box, we can "click here to change column type." Set it to Nominal. Because this
nominal variable is a factor, we should add the names of the regions where the
witches live. Hover over the name of the variable, click here to "change labels".
For "Region", label 1 as North, 2 as South, 3 as East, and 4 as West.
For the Scale variable "Complaints", we can "Click here to change column type"... set it to
Scale. Those are all of the changes, so now we are ready to do the analysis.
You will conduct a one-way ANOVA by going to ANOVA -> ANOVA... that was easy, right?
Next, we will move our variables into place. Notice how JASP tells us what kinds of
variables should go in each box? Our dependent variable - the variable that
measures something - is the Scale variable: Number of complaints.
Our "Fixed Factor" is the categorical variable: the factor "Region".
JASP uses progressive disclosure, so as soon as our variables are in place,
we see the results of the ANOVA. It looks like our p is less than 0.05, in
fact, it is less than .001, meaning that our ANOVA is significant.
But before we do anything else, before we interpret the ANOVA, we should first
check the assumptions of the ANOVA test. Click on Assumptions Checks. As with the
independent samples t-test, one of our assumptions for a one-way ANOVA is that
we have equal variances in each of the four groups (or Regions). This is the
assumption of homogeneity of variance, and we check it with the box for
homogeneity tests. We immediately see the Levine's test, which is used to test the
assumption of homogeneity of variance. Because we would prefer that the groups
have equal variance - that the regions are not different in their variance - we would
prefer that the Levine's test be non- significant, indicating that there are no
significant differences in variability between the groups. We see here that the
Levine's test is not even close to significance: p = .918, which is
great. Because the Levine statistic is not-significant, the variability within
the groups is NOT statistically significantly different. This is what we
want. This matches our assumption that the groups have equal (or homogeneous)
variance. If, however, the assumption of homogeneity of variances WAS violated...
if Levine's test was significant less than .01 (or better yet less than .001),
then we could correct for that using a homogeneity
correction. We would use either the Welch's ANOVA, or the Brown-Forsythe test,
and then interpret any significant findings using
the Games-Howell post-hoc. So how do you decide between Welch's and Brown-Forsythe?
I will need to make another video addressing those differences but
for now, the short answer is to just use the Welch's test in most cases; although,
in this particular case I would use the Brown-Forsythe, if the assumption of
homogeneity of variances was violated, only because the sample size is so small,
less than 6. However, we now know that the assumption of homogeneity of variances
has been met, so we do not need these Homogeneity Corrections and we do not
need Games-Howell. We will deselect them.
We can also check the Q-Q plot of the residuals. I cover the details about this
test in a different lecture, but for now, we just want to make sure that all of
the dots are on the line, or really close to the line...and they are! The dots almost
always get off of the line at the far ends, but all of the dots in the center
are very close to the line, so that assumption has been met, too. When we look
at the F-table - specifically the small p-value - we know that our one-way ANOVA
is statistically significant. Our p-value is less than .001.
You never report significance as P equals .000 because the
probability is not really zero. It may be really smal,l but it is never actually
zero. Instead, you would report p < .001. There are statistically
significant differences among the groups... the problem is we do not know which
groups are different, and for that we need a post hoc test. Click on post hoc
tests. Move over Regions to indicate that this is the Factor for which we need a
post hoc. By default we get Tukey for our
post-hoc. We could choose any of the other options, if we so desired. We're
going to stick with Tukey because each region has the same number of
participants (or Munchkins). Let's also get the confidence intervals, to help with
our interpretation, later. This is where we would select the Games-Howell post-hoc
if the assumptions had been violated. And remember that you only need a post-hoc
(or a follow-up test) when the ANOVA is significant. If it is not significant,
then there are no significant differences among the groups. No need for
a post-hoc: there are no differences to find. Let's get some other useful output.
Click on Descriptive Plots. Move Regions into the horizontal axis. Scroll down and
we will see a plot of the means. You can display error bars, if you like.
I always like to start by looking at the plots, but to make this easier to see,
let's stretch out this graph a little. Now we can read the words better,
We cab see that there are two lower groups (looks like North and South) and then
two higher groups (East and West). Okay, keep that in mind. Under Additional Options, we
will get the Descriptive Statistics and the estimates of Effect size. We will
report the eta-squared, which will always be exactly the same as the partial eta
squared in a one-way ANOVA. The partial eta squared will be smaller in a two way,
or a three way ANOVA. The Omega squared effect size will always be smaller than
either eta or partial eta. For our purposes, we only need the eta value for
effect size. Finally, if we had an ordinal dependent variable,
or if the data violated one of the test assumptions so badly that they were not
suitable for a parametric test, we could employ the nonparametric alternative
Kruskal-Wallis test. In many cases, however, you would still use the Welch's
Test instead of Kruskal-Wallis test when the assumptions were violated. Let's take a
look at these results. The significant ANOVA tells us that at
least one region is different from one other region. We need a post-hoc to find
out which one. In this table of post hoc results, each region is compared to the
other three regions. You can see the mean difference, the standard error of the
mean, and the confidence intervals. Any confidence interval that crosses zero...
if one is positive and the other is negative... is non-significant. Those groups
do not differ. As we saw with the plot, we can see that the North Region is not
different than the South Region, but both of them are different than both the
East and West Regions. This box contains the descriptive statistics. These are broken
down by each Region. Here we can see the mean, the standard deviation, and the
sample size for each group. Essentially, we have two subsets: North and South are
in the same subset of low complaints; East and West are in the same subsets
high complaints. The North and South group is statistically significantly
different than the East and West group, but the Regions within those subsets are
not different from each other. Here is how we would write up our results in APA
style: for a full write-up I would mention the test assumptions that were
checked, Levine's test was non significant indicating that the
assumption of homogeneity of variance was not violated, normality was checked
with a Q-Q plot: no deviations were noted, and then I would go on to the full ANOVA
write-up. To interpret and report this ANOVA, we would report the name of the
test "F", followed by the degrees of freedom, between and within, "3, 16" and
then the F value of 10.49. I report the p-value, the partial eta squared,
which is the same as the eta squared for a one-way ANOVA, and you will see that I
listed the means and standard deviations for each group. The last statement about
the meaning of the findings would go in your discussion section if you were
writing this up for a paper.
And that is how you do a one-way ANOVA in JASP!