Presentation is loading. Please wait.

Presentation is loading. Please wait.

Factorial ANOVA 2 or More IVs. Questions (1)  What are main effects in ANOVA?  What are interactions in ANOVA? How do you know you have an interaction?

Similar presentations


Presentation on theme: "Factorial ANOVA 2 or More IVs. Questions (1)  What are main effects in ANOVA?  What are interactions in ANOVA? How do you know you have an interaction?"— Presentation transcript:

1 Factorial ANOVA 2 or More IVs

2 Questions (1)  What are main effects in ANOVA?  What are interactions in ANOVA? How do you know you have an interaction?  What does it mean for a design to be completely crossed? Balanced? Orthogonal?  Describe each term in a linear model like this one:

3 Questions (2)  Correctly interpret ANOVA summary tables. Identify mistakes in such tables. What’s the matter with this one? SourceSSDfMSF A5122 (J-1)128 B1081 (K-1)10854 AxB962 (J-1)(K-1)4824 Error125 N-JK2

4 Questions (3)  Find correct critical values of F from a table for a given design.  How does post hoc testing for factorial ANOVA differ from post hoc testing in one-way ANOVA?  Describe a concrete example of a two-factor experiment. Why is it interesting and/or important to consider both factors in one experiment?

5 2-way ANOVA So far, 1-Way ANOVA, but can have 2 or more IVs. IVs aka Factors. Example: Study aids for exam –IV 1: workbook or not –IV 2: 1 cup of coffee or not Workbook (Factor A) Caffeine (Factor B) NoYes Caffeine onlyBoth NoNeither (Control) Workbook only

6 Main Effects (R & C means) N=30 per cell Workbook (Factor A)Row Means Caffeine (Factor B) NoYes Caff =80 SD=5 Both =85 SD=5 82.5 NoControl =75 SD=5 Book =80 SD=5 77.5 Col Means77.582.580

7 Main Effects and Interactions Main effects seen by row and column means; Slopes and breaks. Interactions seen by lack of parallel lines. Interactions are a main reason to use multiple IVs

8 Single Main Effect for B (Coffee only)

9 Single Main Effect for A (Workbook only)

10 Two Main Effects; Both A & B Both workbook and coffee

11 Interaction (1) Interactions take many forms; all show lack of parallel lines. Coffee has no effect without the workbook.

12 Interaction (2) People with workbook do better without coffee; people without workbook do better with coffee.

13 Interaction (3) Coffee always helps, but it helps more if you use workbook.

14 Labeling Factorial Designs Levels – each IV is referred to by its number of levels, e.g., 2X2, 3X2, 4X3 designs. Two by two factorial ANOVA. Cell – treatment combination. Completely Crossed designs –each level of each factor appears at all levels of other factors (vs. nested designs or confounded designs). Balanced – each cell has same n. Orthogonal design – random sampling and assignment to balanced cells in completely crossed design.

15 Review  What are main effects in ANOVA?  What are interactions in ANOVA? How do you know you have an interaction?  What does it mean for a design to be completely crossed? Balanced? Orthogonal?

16 Population Effects for 2-way Population main effect associated with the treatment A j (first factor): Population main effect associated with treatment B k (second factor): The interaction is defined as, so the linear model is: The interaction is a residual: Each person’s score is a deviation from a cell mean (error). The cell means vary for 3 reasons.

17 Expected Mean Squares E(MS error) = (Factor A has J levels; factor B has K levels; there are n people per cell.) E(MS A) = E(MS B) = E(MS Interaction) = Note how all terms estimate error.

18 F Tests For orthogonal designs, F tests for the main effects and the interaction are simple. For each, find the F ratio by dividing the MS for the effect of interest by MS error. EffectFdf AJ-1, N-JK BK-1, N-JK AxB Interaction (J-1)(K-1), N-JK

19 Example Factorial Design (1) Effects of fatigue and alcohol consumption on driving performance. Fatigue –Rested (8 hrs sleep then awake 4 hrs) –Fatigued (24 hrs no sleep) Alcohol consumption –None (control) –2 beers –Blood alcohol.08 % DV - performance errors on closed driving course rated by driving instructor.

20 Cells of the Design Alcohol (Factor A) Orthogonal design; n=2 Fatigue (Factor B) None (J=1) 2 beers (J=2).08 % (J=3) Tired (K=1) Cell 1 2, 4 M=3 Cell 2 16, 18 M=17 Cell 3 18, 20 M=19 Rested (K=2) Cell 4 0, 2 M=1 Cell 5 2, 4 M=3 Cell 6 16, 18 M=17 M=2M=10M=18 M=13 M=7 M=10

21 Factorial Example Results Main Effects? Interactions? Both main effects and the interaction appear significant. Let’s look.

22 Data PersonDVCellA alcB rest 12111 24111 316221 418221 5 331 620331 70412 82412 92522 104522 1116632 1218632 Mean10

23 Total Sum of Squares PersonDVMeanDD*D 1210 -864 2410 -636 31610 636 41810 864 51810 864 62010 100 7010 -10100 8210 -864 9210 -864 104 -636 111610 636 121810 864 Total728

24 SS Within Cells PersonDVCellMeanD*D 121 31 241 31 3162 171 4182 171 5183 191 6203 191 704 11 824 11 925 31 1045 31 11166 171 12186 171 Total12

25 SS A – Effects of Alcohol PersonMLevel (A) Mean (A) D*D 1101 264 2101 264 3102 0 4 2 0 5 3 1864 6103 1864 7101 264 8101 264 9102 0 2 0 11103 1864 12103 1864 Total512

26 SS B – Effects of Fatigue PersonMLevel (B) Mean (B) D*D 1101 139 2101 139 3101 139 4101 139 5101 139 6101 139 7102 79 8 2 79 9 2 79 2 79 11102 79 12102 79 Total108

27 SS Cells – Total Between PersonMCellMean (Cell) D*D 1101 349 2101 349 3102 1749 4102 1749 5103 1981 6103 1981 7104 181 8104 181 9105 349 10 5 349 11106 1749 12106 1749 Total716

28 Summary Table SourceSS Total728 Between716 A512 B108 Within12 Check: Total=Within+Between 728 = 716+12  Interaction = Between – (A+B). Interaction = 716-(512+108) = 96. SourceSSdfMSF A5122 (J-1)256128 B1081(K-1)10854 AxB962 (J-1)(K-1)4824 Error126 (N-JK)2

29 Interactions Choose the factor with more levels for X, the horizontal axis. Plot the means. Join the means by lines representing the other factor. The size of the interaction SS is proportional to the lack of parallel lines. If interactions exist, the main effects must be qualified for the interactions. Here, effect of alcohol depends on the amount of rest of the participant.

30 Review  Correctly interpret ANOVA summary tables. Identify mistakes in such tables. What’s the matter with this one? SourceSSDfMSF A5122 (J-1)128 B1081 (K-1)10854 AxB962 (J-1)(K-1)4824 Error125 N-JK2

31 Proportions of Variance We can compute R-squared for magnitude of effect, but it’s biased, so the convention is to use omega-squared.

32 Planned Comparisons CellMeanC1C2 1 A1B13-1/31/2 2 A2B117-1/3-1/4 3 A3B119-1/3-1/4 4 A1B211/31/2 5 A2B231/3-1/4 6 A3B2171/3-1/4 -6-12 B1 v B2No alc v others

33 Planned Comparisons (2) The first comparison (B1 v B2) has a value of –6. For any comparison, Note this is the same as SS for B in the ANOVA. Note 7.348 squared is 54, which is our value of F from the ANOVA. (critical t has df e )

34 Planned Comparisons (3) We can substitute planned comparisons for tests of main effects; they are equivalent (if you choose the relevant means). We can also do the same for interactions. In general, there are a total of (Cells-1) independent comparisons we can make (6-1 or 5 in our example). Our second test compared no alcohol to all other conditions. This looks to be the largest comparison with these data.

35 Post Hoc Tests For post hoc tests about levels of a factor, we pool cells. The only real difference for Tukey HSD and Newman – Keuls is accounting for this difference. For interactions, we are back to comparing cells. Don’t test unless F for the effect is significant. For comparing cells in the presence of an interaction:

36 Post Hoc (2) In our example A has 3 levels, B has 2. Both were significant. No post hoc for B (2 levels). For A, the column means were 2, 10, and 18. Are they different? A: Yes, all are different because the differences are larger than 3.07. But because of the interaction, the interpretation of differences in A or B are tricky.

37 Post Hoc (3) For the rested folks, is the difference between no alcohol and 2 beers significant for driving errors? The means are 1 and 3. A: They are not significantly different because 2 is less than 5.63. Note: data are fictitious. Do not drink and drive.

38 Review Describe each term in a linear model like this one:  How does post hoc testing for factorial ANOVA differ from post hoc testing in one- way ANOVA?  Describe a concrete example of a two-factor experiment. Why is it interesting and/or important to consider both factors in one experiment?

39 Higher Order Factorials If you can do ANOVA with 2 factors, you can do it with as many as you like. For 3 factors, you have one 3-way interaction and three 2-way interactions. Computations are simple but tedious. For orthogonal, between-subject designs, all F tests have same denominator. We generally don’t do designs with more than 3 factors. Complex & expensive.


Download ppt "Factorial ANOVA 2 or More IVs. Questions (1)  What are main effects in ANOVA?  What are interactions in ANOVA? How do you know you have an interaction?"

Similar presentations


Ads by Google