Chapter 8: Factorial ANOVA **This chapter corresponds to chapter 13 of your book (Two Too Many Factors) What it is: Factorial ANOVA is used to test the influence of two (or more) factors on an outcome. It is a variant of the one way ANOVA you learned about in Chapter 7 and is based on the same mathematical principles (i.e. the partitioning of variance into different sources). A quick note on terminology: A factor is another word for an independent variable. Within a factor, there are levels or groupings. For example, gender is a single factor that has 2 levels (male, female). In a factorial ANOVA, you have two (or more factors) influencing a single outcome. Those factors can have any number of levels within each. When to use it: Per the flow chart on page 221 of Salkind (2008), you would use a factorial ANOVA when: (1) you are examining differences between groups (as opposed to examining the relationships between variables), (2) the participants in the study were only tested once (as opposed to repeatedly), (3) you are comparing more than two groups and (4) you are dealing with more than one factor. Questions asked by a factorial ANOVA: Factorial ANOVA is exciting because you can use it to ask three different questions in a single study using just this one analysis! When you use factorial ANOVA you have at least two different factors that you think might predict the outcome. For example, imagine you want to examine the influence of both gender and smoking status (smoker vs. non-smoker) on depression. Using a factorial ANOVA would allow you to ask the following three questions: 1. Does gender affect depression? 2. Does smoking status affect depression? These two effects are called main effects and refer to the effect of a single factor ignoring the levels of the other factor. 3. Do gender and smoking status interact to predict depression? You’ll learn more about interactions throughout the chapter, but an interaction occurs when the effect of one factor depends on the other factor. An example of an interaction we might see in this study would be if the effect of smoking status on depression depended on whether you were male or female. For example, maybe being a smoker makes women more depressed but makes males less depressed. Using SPSS to Calculate an independent t test (dataset: Chapter8 example1.sav) Imagine you want to compare the effectiveness of 2 different diets (low carb vs. low fat). You also want to assess whether people lose more weight on either diet if they are already overweight vs. normal weight. It’s also possible that the effectiveness of these two specific diets depends on whether or not participants are already at a normal weight or are overweight. To test your ideas, you recruit 40 (20 normal weight, 20 overweight) people to participate in a study. Within each weight group, you randomly assign half of the participants to eat a low carb diet for 2 months and the other half to eat a low fat diet for 2 months. That means you now have four different groups (or cells): normal weight on low carb diet, normal weight on low fat diet, overweight on low carb diet, and overweight on low fat diet. You collect data on how much each participant loses and enter the data in SPSS. Now follow the “Famous Eight Steps”: 1. Statement of the null and research hypotheses. For this factorial ANOVA, we actually have three different null hypotheses and three different research hypotheses – that is, we have a set of hypotheses for each of the three questions we’re asking. Question 1: Is there an effect of diet type on weight loss? Null H : µ = µ 0 Lowcarb LowFat The average amount of weight loss between a low carb and a low fat diet is equal. Research H : X ≠ X 1 LowCarb LowFat The average amount of weight loss between a low carb and a low fat diet is not equal. Question 2: Is there an effect of initial weight on weight loss? Null H : µ = µ 0 NormalWeight Overweight The average amount of weight loss between normal and overweight groups is equal. Research H : X ≠ X 1 NormalWeight Overweight The average amount of weight loss between normal and overweight groups is not equal. Question 3: Is there an interaction between diet type and current weight? Null H : µ = µ = µ = µ 0 Lowcarb.NormalWeight LowCarb.Overweight LowFat.NormalWeight LowFat.Overweight The average amount of weight loss is equal between all four groups. Research H : X ≠X ≠ X ≠X 1 Lowcarb.NormalWeight LowCarb.Overweight LowFat.NormalWeight LowFat.Overweight The average amount of weight loss is not equal between all four groups. 2. Set the level of risk at p < .05 3. Selection of the appropriate test statistic Again using the flowchart on page 221 of Salkind (2008) we see that a factorial ANOVA is the appropriate test statistic because we are comparing the means (of weight loss) of participants who are only tested once (each person has one weight loss score for the 2 months). We also have more than 2 groups (we have 4 groups) and we have more than one factor (we have two factors: diet type and current weight). Now open the data set “Chapter8Example1.sav”. Take a moment to familiarize yourself with the data. Note how data for this type of analysis should be entered. 1) Each participant has one row in the data 2) Two columns indicate which level of each factor each participant was in. a. One column indicates which group the participant was in on the diet factor. Here we’ve used 1’s to indicate the participant was in the low carb diet and 2’s to indicate the participant was in the low fat diet. b. One column indicates which group the participant was in on the weight factor. Here we’ve used 1’s to indicate the participant was normal weight and 2’s to indicate the participant was overweight. 3) Another column indicates each participant’s score on the outcome measure – here it’s how many pounds the person lost at the end of the study. The data should look like this in SPSS: 4. Computation of the test statistic. SPSS will calculate an obtained value (and find the associated p-value) for each of the three possible effects. To do this, click on the “Analyze” drop-down menu, highlight “General Linear Model”, and then click on “Univariate”, as pictured below. The following pop-up window will appear: Next, highlight the dependent variable (PoundsLost) and click it over to the “dependent variable box”. Then, one at a time, highlight each of your independent variables (DietType, Weight) and click them over to the fixed factor(s) box. Your screen should look like the picture below: Whenever you do a factorial ANOVA, also tell SPSS to produce the descriptive statistics for each group. This will help you interpret any significant effects you find. To do this, click on the box that says “options”. Click the box next to “Descriptive Statistics” in the display box. Your window should look like this: Click continue and then OK. Now navigate to the output window. Your output will look like this: This box tells you how many participants were in Between-Subjects Factors each group of each factor. For example, there were 10 people on the low carb diet and 10 people on te Value Label N low fat diet. DietType 1.00 Low Carb 10 Note that if you added these N’s together that would 2.00 Low Fat 10 equal double our actual sample size – this is because each person is counted twice (once for the diet group Weight 1.00 Normal Weight 10 they were in and once for the weight group). 2.00 Overweight 10 Descriptive Statistics This part of the output gives you all the Dependent Variable:PoundsLost means and standard deviations you need to interpret any significant effects you DietType Weight Mean Std. Deviation N find. If you have an interaction, you’ll Low Carb Normal Weight .6000 .65955 5 want to use the separate means for each of the four groups. Following, the output, Overweight 22.9200 4.06042 5 these means have been graphed in excel – Total 11.7600 12.07911 10 you can do the same or just do this on a piece of paper. Low Fat Normal Weight 6.8600 1.00648 5 Overweight 15.1200 .93648 5 Alternatively, if you have a main effect (or 2 main effects) you’ll want to use these Total 10.9900 4.44883 10 numbers. These give you the collapsed Total Normal Weight 3.7300 3.39544 10 means that are important for a main effect Overweight 19.0200 4.96159 10 (e.g, the average pounds lost for low carb dieters, regardless of weight). Total 11.3750 8.86815 20 Tests of Between-Subjects Effects Dependent Variable:PoundsLost Source Type III Sum of Squares df Mean Square F Sig. This box gives you Corrected Model 1418.989a 3 472.996 100.573 .000 the obtained Intercept 2587.813 1 2587.813 550.247 .000 values and p‐ values for each of DietType 2.964 1 2.964 .630 .439 the three possible Weight 1168.921 1 1168.921 248.548 .000 effects. DietType * Weight 247.104 1 247.104 52.542 .000 Error 75.248 16 4.703 Total 4082.050 20 Corrected Total 1494.237 19 a. R Squared = .950 (Adjusted R Squared = .940) The F and sig. columns give you the The Source Column The df column tells The Mean Square for each source exact obtained and p‐values for each identifies the you the degrees of is provided. Recall, the mean source. Just like in one‐way ANOVA, diffe rent sources of freedom. square is equal to the Sum of the F for each source is equal to the variance. Squares divided by the degrees of mean square of that source divided freedom. by the mean square for the error. Plot of means (from excel) If you have an interaction and would like to plot the means in excel, enter them as seen below, then use the “insert line graph” function. low carb low fat normal 0.6 6.86 over 22.92 15.12 25 20 15 Normal Weight 10 5 Overweight 0 Low Carb Low Fat Interpreting the Output The output for a factorial ANOVA has a lot of components. We want to know which of our three potential effects were significant (if any). To determine this, you look at the “Test of Between Subjects Effects” table. Identify the rows of the table that are associated with each of our three effects (the two main effects and the interaction). We see that there is a significant effect of weight AND a significant interaction. Looking at the graph above, we see: • The main effect of weight: people who are overweight lose more weight (regardless of diet type) than people who are normal weight. • The interaction effect between weight and diet type: overweight people lost more weight on a low carb diet, whereas normal weight people lost more weight on a low fat diet. o This means that the effect of diet type DEPENDS on your current weight – this is the telltale sign of an interaction. Now, back to the eight steps: 5. Determination of the value needed for rejection of the null hypothesis Factorial ANOVA is too complex for us to calculate it by hand – but the critical values are the same as the ones we would use in a one-way ANOVA and can be found in your book on pages 336-338. Recall that each effect has its own obtained value and also has its own numerator degrees of freedom (which can be found in the df column of the “between subject effects” table of your output). The denominator degrees of freedom stays the same for each effect and can be found in the df column of the table in the “error” row. These two numbers along with the table in your book give you the critical value for each effect. In this example, each of the three effects would have a critical value of 4.49 (i.e. the critical value of F for an effect with 1 and 16 degrees of freedom and an alpha of .05). 6. Comparison of the obtained value and the critical value is made Again SPSS has already found the p-value for you so all you have to do is see if the p- value is less than .05. But if we look at the table in our SPSS output we can confirm that the two effects (the main effect of weight and the interaction) with an obtained value bigger than our critical value are significant, whereas the one effect (the main effect of diet) with a smaller obtained value is not. Remember that as the obtained value gets bigger, the p-value gets smaller. 7/8. Making a Decision In factorial ANOVA we make a separate decision for each of the three effects. In our example, we would reject the null hypotheses related to the main effect of weight and the interaction between weight and diet type. We would fail to reject the null hypothesis regarding the main effect of diet type. Interpretation of the Findings Now we report our results. Here’s an example of how these results would be reported in a journal article: A factorial ANOVA revealed that there was no main effect of diet type on weight loss (F (1, = .63, p > .05). There was, however, a significant main effect of current weight on 16) weight loss (F = 248.55), suggesting that people who were overweight (M = 19.02, (1,16) SD = 3.40) lost more weight on average than people who were normal weight (M = 3.73, SD = 4.96). There was also a significant interaction between the two factors (F = (1,16) 54.54). The nature of this interaction suggested that, for overweight people, low carb dieting (M = 22.92, SD = 4.06) might be more effective than low fat dieting (M = 15.12, SD = .94) whereas for normal weight people, low fat dieting (M = 6.86, SD = 1.01) might be more effective than low carb dieting (M = .60, SD = .66). Note that you: • always report the F for all three effects and whether or not it was significant • interpret what any significant effect means in words (i.e. this group’s mean was higher than that groups). • report the relevant means and standard deviations for any significant effects. For someone unfamiliar with stats, you might say: People who are overweight lose more weight on any diet than people who are of normal weight. But, it’s also true that which diet is most effective depends on your current weight. Practice Problem #1 (SPSS) You conduct a taste test to answer the age old question: chocolate or vanilla? You suspect that the answer, however, may depend on what type of dessert it is. So you recruit 20 people and assign them to one of four conditions: chocolate cake, chocolate ice cream, vanilla cake, or vanilla ice cream. After each person tastes their assigned dessert they rate how much they like it on a scale of 1-7. Use SPSS and the following data set to determine if there is a main effect of flavor or dessert type and/or an interaction between the two. Flavor Dessert Liking chocolate ice cream 4 chocolate cake 5 chocolate ice cream 3 chocolate cake 6 chocolate ice cream 3 chocolate cake 7 chocolate ice cream 2 chocolate cake 5 chocolate ice cream 1 chocolate cake 6 vanilla ice cream 6 vanilla cake 5 vanilla ice cream 6 vanilla cake 2 vanilla ice cream 3 vanilla cake 3 vanilla ice cream 5 vanilla cake 2 vanilla ice cream 4 vanilla cake 3 A. What are the null and research hypotheses (in both words and statistical format)? B. What is the level of risk associated with the null hypothesis? C. What is the appropriate test statistic and WHY? D. What do you conclude about the effects of flavor and dessert type and their interaction? Write up your results as you would for a journal article. E. Write up your results as you would for an intelligent person who doesn’t know stats.
Description: