Two-way ANOVA, II 9.07 4/29/2004 Post-hoc comparisons & two-way analysis of variance • obt • procedure equal • This is just like post-hoc testing for the one-way ANOVA Post-hoc testing As before, you can perform post-hoc tests whenever there’s a significant F– But don’t bother if it’s a main effect and has only two levels – you already know the answer We’ll just talk about the Tukey’s HSD – Requires that the n’s in all levels of a factor are Post-hoc testing for main effects 1just like what we did for one-way ANOVA n MS qHSD wnαα = α αq statistic based on alpha, dfWk, the number of levels wnMS Is the mean square within groups. n I.E. how many numbers did you average to get each mean you are comparing? • • • No The workbook helps. • Post-hoc testing for main effects is is the Type I error rate (.05). Is a value from a table of the studentized range , and in the factor you are testing Is the number of people in each group. Our example from last time What effect do a workbook and coffee consumption have on exam performance? Both main effects and the interaction were significant Factor A (the workbook) had only two levels. post-hoc testing required. Factor B (the coffee) had three levels. We need to do post-hoc testing. Numbers from our example last time wn = 205.56 •qk dfwn and k wn = 12 – k = 3.77 for αΣnB3 = 6 ΣnB2 = 6 ΣnB1 = 6 90, 85, 7530, 40, 202 Cups of coffee (Factor B) 40, 60, 6545, 50, 851 20, 45, 5510, 30, 200 k sqrt(MSwn/n) • • m3= 56.7m2= 57.5m1=30 Level 3: 2 cups Level 2: 1 cup Level 1: 0 cups 27.5 0.9 26.7 •MS•n = 6 is a function of –df–k = 3 So, from the table, q=0.05 x = 340 x = 345 x = 180 HSD for this example •HSD = q= 3.77 sqrt(205.56/6) = 22.07 Differences in means: 0 cups of coffee differ significantly from both 1 and 2 cups of coffee 2• • m =83.33m = 302 Cups of (Factor B) m = 55m = 601 m = 40m = 200 YesNo Workbook Confounded & unconfounded comparisons m =83.33m = 302 Cups of (Factor B) m = 55m = 601 m = 40m = 200 YesNo Workbook there’s a confound. Post-hoc testing for the interaction Involves comparing cell means But we don’t compare every possible pair of cell means… coffee (Factor A) coffee (Factor A) Confounded comparison, because the cells differ along more than one factor. If there’s a difference, what’s the explanation? Is it because of factor A or B? We can’t tell, because Confounded & unconfounded comparisons m =83.33m = 302 Cups of (Factor B) m = 55m = 601 m = 40m = 200 YesNo Workbook We can test these with post-hoc tests. (1) (2) • k sqrt(MSwn/n) – k wn and k, the number of compared – adjusted comparisons (as • coffee (Factor A) Unconfounded comparisons. The cells differ only in one factor. Tukey’s HSD for interactions 1. Compute HSD = qBefore, q was a function of dflevels in the factor of interest = # of means being For the interaction, we use an k to account for the actual number of unconfounded opposed to all comparisons of cell means, some of which are confounded) 2. Compare with unconfounded differences in means 3Table from the handout TABLE 14.8 - Values of Adjusted k Design of Number of Cell Adjusted Study Means in Study Value of k 2 x 2 4 3 2 x 3 6 5 2 x 4 8 6 3 x 3 9 7 3 x 4 12 8 4 x 4 16 10 4 x 5 20 12 Figure by MIT OCW. What’s going on here? • means you’d like to compare • 3 means -> 2+1 = 3 comparisons k is sort of short hand for the number of In one-way ANOVA or main effects analysis, e.g: 5 means -> 4+3+ 2+1 = 10 comparisons What’s going on here? • 2x2 -> 4 comparisons, k=3 is closest 2x3 -> 9 comparisons, k=5 is closest Note •Two-way interactions Not all stat books bother with this adjusted value of k – many just use k = # cell means 4Back to our example • of k = 5. dfwn = 12. So qk = 4.51 for α=0.05 wn = 205.56, n = # in each mean = 3, so HSD = 4.51 sqrt(205.56/3) = 37.33 • differences larger than 37.33? m =83.33m = 302 Cups of (Factor B) m = 55m = 601 m = 40m = 200 YesNo Workbook m =83.33m = 302 Cups of (Factor B) m = 55m = 601 m = 40m = 200 YesNo Workbook 20 15 53.33 40 30 10 15 28.33 43.33We had a 3x2 design, so the adjusted value •MSWhat unconfounded comparisons lead to coffee (Factor A) coffee (Factor A) m=59.44m=36.67 m=56.7 m=57.5 m=30 m =83.33m = 302 Cups of (Factor B) m = 55m = 601 m = 40m = 200 YesNo Workbook m=59.44m=36.67 m=56.7 m=57.5 m=30 m =83.33m = 302 Cups of (Factor B) m = 55m = 601 m = 40m = 200 YesNo Workbook coffee (Factor A) All significant effects shown (blue = interaction, green = main). What is the interpretation of these results? coffee (Factor A) Interpretation: 1. If the interaction is not significant, interpretation is easy – it’s just about what’s significant in the main effects. In this case, with no significant interaction, we could say that 1 or 2 cups of coffee are significantly better than 0 cups, and using the workbook is significantly better than not using it. 5m=59.44m=36.67 m=56.7 m=57.5 m=30 m =83.33m = 302 Cups of (Factor B) m = 55m = 601 m = 40m = 200 YesNo Workbook NO. m=59.44m=36.67 m=56.7 m=57.5 m=30 m =83.33m = 302 Cups of (Factor B) m = 55m = 601 m = 40m = 200 YesNo Workbook 1 cups, and with the workbook there’s an improvement in coffee (Factor A) Interpretation: 2. However, if there is a significant interaction, then the main interpretation of the experiment has to do with the interaction. Would we still say that 1 or 2 cups of coffee are better than 0? That using the workbook is better than not using it? It depends on the level of the other factor. coffee (Factor A) Interpretation: • Increasing coffee consumption improves exam scores, where without the workbook there’s an improvement going from 0 to going from 0 to 2 cups. • The workbook leads to significant improvement in exam scores, but only for students drinking 2 cups of coffee. Within-subjects (one-way) ANOVA • • instead have a bunch of people each try out Within-subjects experimental design Also known as “repeated-measures” Instead of having a bunch of people each try out one tennis racket, so you can compare two kinds of racket (between-subjects), you both rackets (within-subjects) 6Why within-subjects designs can be useful • • • jHow to do a within-subjects ANOVA (and why we didn’t cover it until now) • an awful lot like …
View Full Document