ANALYSIS OF VARIANCE (ANOVA) One-way between-subjects ANOVA A one-way between-subjects ANOVA allows you to determine if there is a relationship between a categorical independent variable (IV) and a continuous dependent variable (DV), where each subject is only in one level of the IV. To determine whether there is a relationship between the IV and the DV, a one-way between-subjects ANOVA tests whether the means of all of the groups are the same. If there are any differences among the means, we know that the value of the DV depends on the value of the IV. The IV in an ANOVA is referred to as a factor, and the different groups composing the IV are referred to as the levels of the factor. A one-way ANOVA is also sometimes called a single factor ANOVA. A one-way ANOVA with two groups is analogous to an independent-samples t-test. The p- values of the two tests will be the same, and the F statistic from the ANOVA will be equal to the square of the t statistic from the t-test. To perform a one-way between-subjects ANOVA in SPSS
• Choose Analyze !!!! General Linear Model !!!! Univariate. • Move the DV to the Dependent Variable box. • Move the IV to the Fixed Factor(s) box. • Click the OK button.
The output from this analysis will contain the following sections.
• Between-Subjects Factors. Lists how many subjects are in each level of your factor. • Tests of Between-Subjects Effects. The row next to the name of your factor reports a
test of whether there is a significant relationship between your IV and the DV. A significant F statistic means that at least two group means are different from each other, indicating the presence of a relationship.
You can ask SPSS to provide you with the means within each level of your between-subjects factor by clicking the Options button in the variable selection window and moving your within- subjects variable to the Display Means For box. This will add a section to your output titled Estimated Marginal Means containing a table with a row for each level of your factor. The values within each row provide the mean, standard error of the mean, and the boundaries for a 95% confidence interval around the mean for observations within that cell. Post-hoc analyses for one-way between-subjects ANOVA. A significant F statistic tells you that at least two of your means are different from each other, but does not tell you where the differences may lie. Researchers commonly perform post-hoc analyses following a significant ANOVA to help them understand the nature of the relationship between the IV and the DV. The most commonly reported post-hoc tests are (in order from most to least liberal): LSD (Least Significant Difference test), SNK (Student-Newman-Keuls), Tukey, and Bonferroni. The more liberal a test is, the more likely it will find a significant difference between your means, but the more likely it is that this difference is actually just due to chance.
14
Although it is the most liberal, simulations have demonstrated that using LSD post-hoc analyses will not substantially increase your experimentwide error rate as long as you only perform the post-hoc analyses after you have already obtained a significant F statistic from an ANOVA. We therefore recommend this method since it is most likely to detect any differences among your groups. To perform post-hoc analyses in SPSS
• Repeat the steps necessary for a one-way ANOVA, but do not press the OK button at the end.
• Click the Post-Hoc button. • Move the IV to the Post-Hoc Tests for box. • Check the boxes next to the post-hoc tests you want to perform. • Click the Continue button. • Click the OK button.
Requesting a post-hoc test will add one or both of the following sections to your ANOVA output.
• Multiple Comparisons. This section is produced by LSD, Tukey, and Bonferroni tests. It reports the difference between every possible pair of factor levels and tests whether each is significant. It also includes the boundaries for a 95% confidence interval around the size of each difference.
• Homogenous Subsets. This section is produced by SNK and Tukey tests. It reports a number of different subsets of your different factor levels. The mean values for the factor levels within each subset are not significantly different from each other. This means that there is a significant difference between the mean of two factor levels only if they do not appear in any of the same subsets.
Multifactor between-subjects ANOVA Sometimes you want to examine more than one factor in the same experiment. Although you could analyze the effect of each factor separately, testing them together in the same analysis allows you to look at two additional things. First, it lets you determine the independent influence of each of the factors on the DV, controlling for the other IVs in the model. The test of each IV in a multifactor ANOVA is based solely on the part of the DV that it can predict that is not predicted by any of the other IVs. Second, including multiple IVs in the same model allows you to test for interactions among your factors. The presence of an interaction between two variables means that the effect of the first IV on the DV depends on the level of the second IV. An interaction between three variables means that the nature of the two-way interaction between the first two variables depends on the level of a third variable. It is possible to have an interaction between any number of variables. However, researchers rarely examine interactions containing more than three variables because they are difficult to interpret and require large sample sizes to detect. Note that to obtain a valid test of a given interaction effect your model must also include all lower-order main effects and interactions. This means that the model has to include terms representing all of the main effects of the IVs involved in the interaction, as well as all the
15
possible interactions between those IVs. So, if you want to test a 3-way interaction between variables A, B, and C, the model must include the main effects for those variables, as well as the AxB, AxC, and the BxC interactions. To perform a multifactor ANOVA in SPSS
• Choose Analyze !!!! General Linear Model !!!! Univariate. • Move the DV to the Dependent Variable box. • Move all of your IVs to the Fixed Factor(s) box. • By default SPSS will include all possible interactions between your categorical IVs. If
this is not the model you want then you will need to define it by hand by taking the following steps.
o Click the Model button. o Click the radio button next to Custom. o Add all of your main effects to the model by clicking all of the IVs in the box
labeled Factors and covariates, setting the pull-down menu to Main effects, and clicking the arrow button.
o Add each of the interaction terms to your model. You can do this one at a time by selecting the variables included in the interaction in the box labeled Factors and covariates, setting the pull-down menu to Interaction, and clicking the arrow button for each of your interactions. You can also use the setting on the pull- down menu to tell SPSS to add all possible 2-way, 3-way, 4-way, or 5-way interactions that can be made between the selected variables to your model.
o Click the Continue button. • Click the Options button and move each independent variable and all interaction terms to
the Display means for box. • Click the Continue button. • Click the OK button.
The output of this analysis will contain the following sections.
• Between-Subjects Factors. Lists how many subjects are in each level of each of your factors.
• Tests of Between-Subjects Effects. The row next to the name of each factor or interaction reports a test of whether there is a significant relationship between that effect and the DV, independent of the other effects in the model.
You can ask SPSS to provide you with the means within the levels of your main effects or your interactions by clicking the Options button in the variable selection window and moving the appropriate term to the Display Means For box. This will add a section to your output titled Estimated Marginal Means containing a table for each main effect or interaction in your model. The table will contain a row for each cell within the effect. The values within each row provide the mean, standard error of the mean, and the boundaries for a 95% confidence interval around the mean for observations within that cell. Graphing Interactions in an ANOVA. It is often useful to examine a plot of the means by condition when trying to interpret a significant interaction.
16
To get plot of means by condition from SPSS • Perform a multifactor ANOVA as described above, but do not click the OK button to
perform the analysis. • Click the Plots button. • Define all the plots you want to see.
o To plot a main effect, move the factor to the Horizontal Axis box and click the Add button.
o To plot a two-way interaction, move the first factor to the Horizontal Axis box, move the second factor to the Separate Lines box, and click the Add button.
o To plot a three-way interaction, move the first factor to the Horizontal Axis box, move the second factor to the Separate Lines box, move the third factor to the Separate Plots box, and click the Add button.
• Click the Continue button. • Click the OK button.
In addition to the standard ANOVA output, the plots you requested will appear in a section titled Profile Plots. Post-hoc comparisons for when you have two or more factors. Graphing the means from a two-way or three-way between-subject ANOVA shows you the basic form of the significant interaction. However, the analyst may also wish to perform post-hoc analyses to determine which means differ from one another. If you want to compare the levels of a single factor to one another, you can follow the post-hoc procedures described in the section on one-way ANOVA. Comparing the individual cells formed by the combination of two or more factors, however, is slightly more complicated. SPSS does provide options to directly make such comparisons. Fortunately, there is a very easy method that allows one to perform post-hocs comparing all cell means to one another within a between-subjects interaction. We will work with a specific example to illustrate how to perform this analysis in SPSS. Suppose that you wanted to compare all of the means within a 2x2x3 between-subjects factorial design. The basic idea is to create a new variable that has a different value for each cell in the above design, and then use the post-hoc procedures available in one-way ANOVA to perform your comparisons. The total number of cells in an interaction can be determined by multiplying together the number of levels in each factor composing the interaction. In our example, this would mean that our new variable would need to have 2*2*3=12 different levels, each corresponding to a unique combination of our three IVs. One way to create this variable would be to use the Recode function described above. However, there is an easier way to do this if your IVs all use numbers to code the different levels. In our example we will assume that the first factor (A) has two levels coded by the values 1 and 2, the second factor (B) has two levels again coded by the values 1 and 2, and that the third factor (C) has three levels coded by the values 1, 2, and 3. In this case, you can use the Compute function to calculate your new variable using the formula: newcode = (A*100) + (B*10) + C
17
In this example, newcode would always be a three-digit number. The first digit would be equal to the level on variable A, the second digit would be equal to the level on variable B, while the third digit would be equal to the level on variable C. There are two benefits to using this transformation. First, it can be completed in a single step, whereas assigning the groups manually would take several separate steps. Second, you can directly see the correspondence between the levels of the original factors and the level of the composite variable by looking at the digits of the composite variable. If you actually used the values of 1 through 12 to represent the different cells in your new variable, you would likely need to reference a table to know the relationships between the values of the composite and the values of the original variables. If you ever want to create a composite of a different number of factors (besides 3 factors, like in this example), you follow the same general principle, basically multiplying each factor by decreasing powers of 10, such as the following examples. newcode = (A*10) + B (for a two-way interaction) newcode = (A*1000) + (B*100) + (C*10) + D (for a four-way interaction) Regardless of which procedure you use to create the composite variable, you would perform the post-hoc in SPSS by taking the following steps.
• Choose Analyze !!!! General Linear Model !!!! Univariate. • Move the DV to the Dependent Variable box. • Move the composite variable to the Fixed Factor(s) box. • Click the Post-Hoc button. • Move the composite variable to the Post-Hoc Tests for box. • Check the boxes next to the post-hoc tests you want to perform. • Click the Continue button. • Click the OK button.
The post-hoc analyses will be reported in the Multiple Comparisons and Homogenous Subsets sections, as described above under one-way between-subjects ANOVA. One-way within-subjects ANOVA A one-way within-subjects ANOVA allows you to determine if there is a relationship between a categorical IV and a continuous DV, where each subject is measured at every level of the IV. Within-subject ANOVA should be used whenever want to compare 3 or more groups where the same subjects are in all of the groups. To perform a within-subject ANOVA in SPSS you must have your data set organized so that the subject is the unit of analysis and you have different variables containing the value of the DV at each level of your within-subjects factor. To perform a within-subject ANOVA in SPSS:
• Choose Analyze !!!! General linear model !!!! Repeated measures. • Type the name of the factor in the Within-Subjects Factor Name box. • Type the number of groups the factor represents in the Number of Levels box. • Click the Add button. • Click the Define button. • Move the variables representing the different levels of the within-subjects factor to the
Within-Subjects Variables box.