Download presentation
Presentation is loading. Please wait.
Published bySharyl Martin Modified over 9 years ago
1
Factorial ANOVA!
2
We can (and often do) conduct experiments or investigations in which there is more than one factor (i.e., independent or quasi-independent variable). ◦ Recall, in a One-way ANOVA, we have… ◦ one Independent Variable (i.e., one manipulated by the experimenter) or ◦ one Quazi-Independent Variable (i.e., a variable that is accounted for by the experimenter, but is not actually manipulated). Now, with a Factorial ANOVA, we have ◦ 2 or more independent variables, ◦ 2 or more quasi-independent variables, or ◦ a combination of each.
3
Just line a one-way ANOVA, each factor can have 2 or more levels ◦ Gender: pre-existing group (quasi-independent variable) with 2 levels. ◦ Video-taped confession: might have 3 levels – focused on the confessor, focused on the interrogator, or focused on both. Because the experimenter can manipulate this, this is an independent variable. ◦ Message position: might have 2 levels – agreeable message vs. attitude inconsistent message. Because the experimenter can manipulate this, this is an independent variable.
4
We might want to investigate if participants will help more or less depending on their gender and whether or not they are alone. ◦ Gender is a quasi-independent variable with 2 levels. ◦ The experimenter can manipulate whether the participant is alone or in a group, so this is an independent variable with 2 levels. Simplest type of Factorial ANOVA is often called a 2x2 ANOVA. This is a 2x2.
5
We might want to investigate if participants will help more or less depending on their mood and whether or not the helping task is enjoyable. ◦ If mood is manipulated by the experimenter (e.g., have people watch a happy, sad, or neutral video clip), mood is an independent variable with 3 levels. ◦ The experimenter can manipulate whether the helping task is enjoyable (e.g., proofreading a funny article or a dull article), so this is an independent variable with 2 levels. This experiment has 2 factors, one with 2 levels and one with 3 levels. ◦ This is a 2x3 ANOVA
6
How many factors can we have? How many levels can we have? When does this become too much for our brain to handle? ◦ 3-4 factors is about as far as we can go before our brains hemorrhage, so be careful. Example of 3 factors, each with 2 levels. ◦ 2 (Social Status: control vs. excluded) x 2 (Emotion: H vs. S) x 2 (Task: F vs. B).
7
Our factors and levels are INDEPENDENT. # conditions = (# levels in factor 1) x…x (# levels in last factor). Each of these conditions are independent.
8
Simplest factorial ANOVA is a 2x2 (2 factors each with 2 levels). ◦ Actually, a 2-factor ANOVAs are all simple relative to 3+ factor ANOVAs. ◦ So, lets there.
9
Set up: Is methamphetamine neuro- protective following ischemic stroke when compared to no-stroke conditions? ◦ Neuro-protective is operationalized as low-normal activity (damage is indicated by more activity). Design: Rats get a surgery that induces stroke or not, then they receive an injection that contains methamphetamine or saline. ◦ 2 (Surgery: stroke v. sham) x 2 (Injection: meth v. saline)
10
A one-way ANOVA tests for one set of mean differences. ◦ Tests whether at least one mean differed from another when we had 1 factor with 2 or more levels The 2 Factor ANOVA tests 3 separate sets of mean differences. Recall: ◦ DV: Activity level ◦ Factor A: Surgery (stroke v. sham) ◦ Factor B: Injection (meth v. saline)
11
1) Mean differences in activity level between surgery (stroke v. sham) 2) Mean differences in activity level between injection (meth v. saline) 3) Mean differences in activity level that result from a combination of surgery and injection. So, 3 tests are combined into one analysis. We will have 3 f-ratios.
12
As usual, there will be variance attributable to differences between our groups (conditions) in the numerator of our F-ratio and variance attributable to chance in the denominator. The primary difference between our 3 f-ratios is what goes into the numerator… ◦ the variance due to our first factor, ◦ the variance due to our second factor, or ◦ the variance due to our the combination of our 2 factors.
13
The mean difference among levels of a factor is called a Main Effect. ◦ In determining whether there is a difference between stroke and sham groups on activity level, we are testing for a “main effect of surgery.” Regardless of the injection rats received, is there a difference among the levels in surgery? ◦ In determining whether there is a difference between meth and saline groups on activity level, we are testing for a “main effect of injection.” Regardless of the surgery rats received, is there a difference among the levels in injection?
14
For Factor A (Surgery) ◦ H o : µ A1 = µ A2 ORµ stroke = µ sham ◦ H a : µ A1 does not = µ A2 OR ◦ µ stroke does not = µ sham Conceptually: F = (the variance due to difference between the means for Surgery)/the variance due to chance
15
For Factor A (Injection) ◦ H o : µ B1 = µ B2 ORµ meth = µ saline ◦ H a : µ B1 does not = µ B2 OR ◦ µ meth does not = µ saline Conceptually: F = (the variance due to difference between the means for Injection)/the variance due to chance
16
We might have overall main effects of our factors, but we can also have variability due to the combination of our factors. ◦ That is, our 2 factors in combination can interact to produce effects beyond those we see just by looking at main effects. An interaction is defined as – mean differences between conditions that are different from what would be predicted from the overall main effects of the factors. In other words, observed differences beyond possible main effects.
17
strokesham meth354 saline856.5 5.55 strokesham meth385.5 saline835.5
18
H o : There is no interaction between mood and task. All mean differences are explained by the main effects of mood and task. H a : There is an interaction between mood and task. The mean differences between conditions is not what would be predicted from the overall main effects of mood and task. Conceptually: F = (the variance not explained by main effects)/ the variance due to chance
19
If the effect on the DV from one factor does not influence the effect on the DV from second factor, there will be no interaction. If the effect on the DV from one factor does influence the effect on the DV from second factor another, there is an interaction. If the effect of one factor on the DV depends on the levels of the other factor: INTERACTION.
20
We are going to calculate SS t and SS w/e and SSB the same way! Now, we are going to break up SS b into SS for factor A SS for factor B And Ss interaction We are going to require data now…
21
Actual research participant.
22
Stroke and Meth (1): Sum (X 1 )= 49; mean 1 = 4.08; Sum (X 1 2 ) = 215; n 1 = 12 Stroke and Saline(2): Sum (X 2 )= 94; mean 2 = 7.83; Sum (X 2 2 ) = 750; n 2 = 12 Sham and Meth (3): Sum (X 3 )= 46; mean 3 = 3.83; Sum (X 3 2 ) = 190; n 3 = 12 Sham and Saline (4): Sum (X 4 )= 40; mean 4 = 3.33; Sum (X 4 2 ) = 142; n 4 = 12 Overall values (across groups): Sum (X overall )= 229; Grand mean = 4.77; Sum (X overall 2 ) = 1297; N = 48; k = ??
23
…then break it into two components just like before: SS TOTAL = = (1297-[229 2 /48]) = 204.479 SS total = SS between + SS within Again, df total = N – 1 = 48– 1 = 47.
24
Again, SS within = SS error = (215 – [49 2 ]/12)+(750– [94 2 ]/12)+(190– [46 2 ]/12)+(142– [40 2 ]/12) = 50.917 Again, df within/error = N – k = 48 – 4 = 44 OK, so, SS b = 204.479 – 50.917 = 153.562
25
Again, SS between/group = ([49 2 ]/12)+([94 2 ]/12)+([46 2 ]/12)+([40 2 ]/12)- ([229 2 ]/48) = 153.562!!! Again, df between/group = k-1 =4-1 = 3 OK, so, NOW we need to do something NEW!! ◦ Break up SS b =into its constituent parts.
26
SS factor A (Surgery) = ([49+94] 2 /24)+([46+40] 2 /42)-([229 2 ]/48) = 67.687 df factor A (Surgery) = (Levels in factor A) – 1 = 1
27
SS factor B (Injection) = ([49+46] 2 /24)+([94+40] 2 /42)-([229 2 ]/48) = 31.687 df factor B (Injection) = (Levels in factor B) – 1 = 1
28
SS interaction = SS B –(SS factor A + SS factor B )= 54.188 ([49+40] 2 /24)+([46+94] 2 /42)-([229 2 ]/48) = 54.18 Similarly, df A x B interaction = df between - df factor A - df factor B ◦ df A x B interaction = 3 – 1 – 1 = 1
29
MS factor A = SS factor A / df factor A = 67.687 MS factor B = SS factor B / df factor B = 31.687 MS A x B interaction = SS A x B interaction / df A x B interaction = 54.188 MS within = SS within / df within = 50.917/447 =1.157
30
F factor A = MS factor A / MS within = 67.687/1.157 = 58.493 F factor B = MS factor B / MS within = 31.687/1.157 = 27.383 F A x B interaction = MS A x B interaction / MS within = 54.188/1.157 = 46.827 Weeeeeeeee! Let’s check out SPSS
31
ConditionMain Effect of Surgery Main Effect of Injection Interaction SurgeryInjection 1StrokeMeth1 2StrokeSaline111 3ShamMeth 1 4ShamSaline1
32
This is the same experiment, same data, same everything. But, I have recorded Gerbil gender as a quazi-independent variable. What is our design now? 2x2x2 = gender x surgery x injection 3 factors: ◦ A = Gender ◦ B = Surgery ◦ C = Injection
33
Calculations of: ◦ SS tot, SS between/group, SS within/error are all the same. What is different? ◦ We must break up SS between/group into more parts. ◦ What are they?
34
FemaleX1X1 X12X12 MeannMaleX1X1 X12X12 Meann Stroke Meth (1) 2410646Stroke Meth (5) 251094.176 Stroke Saline (2) 514358.56Stroke Saline (6) 433157.176 Sham Meth (3) 23933.836Sham Meth (7) 23973.836 Sham Saline (4) 20743.336Sham Saline (8) 20683.336
35
Main effects ◦ SS surgery, SS injection like before, but also… ◦ Ss gender now because we have an additional factor. ◦ Ok, that covers the Main effects. What else is there? 2-way Interactions (involving just 2 factors). ◦ SS sxi (as before), but also: SS gxs and SS gxi New: 3-way interaction (all 3 factors) SS gxsxi
36
…then break it into two components just like before: SS TOTAL = = (1297-[229 2 /48]) = 204.479 SS total = SS between + SS within Again, df total = N – 1 = 48– 1 = 47.
37
Again, SS within = SS error = But, now we have 8 (not 4) groups ◦ (106– [24 2 ]/6)+(435– [51 2 ]/6)+(93– [23 2 ]/6)+(74– [20 2 ]/6)+ (109– [25 2 ]/6)+(315– [43 2 ]/6)+(97– [23 2 ]/6)+(68– [20 2 ]/6) = 45.5 ◦ This is a different number than we had before; why? Again, df within/error = N – k = 48 – 8 = 40 OK, so, SS b = 204.479 – 45.5 = 158.979
38
Again, SS between/group = Again, we have 8 groups now, so… ◦ ([24 2 ]/6)+([51 2 ]/6)+([23 2 ]/6)+([21 2 ]/6)+([25 2 ]/6)+([ 43 2 ]/6)+([23 2 ]/6)+([20 2 ]/6)-([229 2 ]/48) = 158.9799!!! Again, df between/group = k-1 =8-1 = 7 OK, so, NOW we need to… ◦ Break up SS b =into its constituent parts.
39
SS factor A (Gender) = ([24+51+23+20] 2 /24)+([25+43+23+20] 2 /2 4)-([229 2 ]/48) = 1.021 df factor A (gender) = (Levels in factor A) – 1 = 1
40
SS factor B (Surgery) = ([24+51+25+43] 2 /24)+([23+20+23+20] 2 /2 4)-([229 2 ]/48) = 67.687 df factor B (Surgery) = (Levels in factor B) – 1 = 1
41
SS factor C (Injection) = ([24+23+25+23] 2 /24)+([51+20+43+20] 2 /4 2)-([229 2 ]/48) = 31.687 df factor C (Injection) = (Levels in factor C) – 1 = 1
42
SS axb = SS AB –(SS factor A + SS factor B ) ◦ SS AB is looking at 4 groups collapsing across Injection. SS AB = ([24+51] 2 /12)+([23+20] 2 /12)+([25+43] 2 /12)+([2 3+20] 2 /12)-([229 2 ]/48) = 69.72 ◦ So, SS axb = 69.72- (1.021+67.688) = 1.021 df A x B interaction = (df factor A )( df factor B ) ◦ df A x B interaction = 1x1= 1
43
SS axc = SS AC –(SS factor A + SS factor C ) SS AC is looking at 4 groups collapsing across Surgery. SS AC = df A x C interaction = (df factor A )( df factor C ) ◦ df A x C interaction = 1x1= 1
44
SS bxc = SS BC –(SS factor B + SS factor C ) SS BC is looking at 4 groups collapsing across Gender. SS BC = df B x C interaction = (df factor B )( df factor C ) ◦ df B x C interaction = 1x1= 1
45
SS axbxc = SS Between – (SS axb + SS axc + SS bxc + SS factor A + SS factor B + SS factor C ) df A x B x C interaction = (df factor A )(df factor B )( df factor C ) ◦ df AxBxC interaction = 1x1x1= 1
46
Main effects ◦ MS factor A = SS factor A / df factor A ◦ MS factor B = SS factor B / df factor B ◦ MS factor C = SS factor C / df factor C 2-way Interactions ◦ MS A x B interaction = SS A x B interaction / df A x B interaction ◦ MS A x C interaction = SS A x C interaction / df A x C interaction ◦ MS B x C interaction = SS B x C interaction / df B x C interaction 3-way Interaction MS AxBx C interaction = SS AxBx C interaction / df AxBx C interaction MS within = SS within / df within
47
F = MSb/MSw for each Main effect and interaction. Let’s check out SPSS
48
The Surgery x Injection interaction is significant. Sweet. Now what? We can “decompose this interaction in several ways to determine which means are different from which within that interaction. Post-hoc tests: like Tukey and Sheffe, etc. ◦ Generally, these are ok for exploratory purposes. Simple effects tests Planned Comparisons/contrasts
49
One way to do this is by doing a “Simple Effect” test. This looks at the main effect of one factor at each level of the other factor. ◦ These are nice because they help control Type 1 error. ◦ Because the overall MS WE is in the denominator. What does the equation look like? Any F really. Let’s break down the SxI interaction…
50
SS factor C/Injection (stroke only) = ([24+25] 2 /12)+([51+43] 2 /12)-([143 2 ]/24) = 200.08+736.33-852.04 = 84.375 df factor C/Injection (stroke only) = (Levels in factor C) – 1 = 1 MS factor C/Injection (stroke only) = SS factor C/Injection (stroke only) /Df factor C/Injection (stroke only) F factor C/Injection (stroke only) =MS factor C/Injection (stroke only) /MS W/E = 84.375/1.137 = 74.176
51
The factorial ANOVA is not necessarily testing the interaction patterns you are predicting. You can test for specific, predicted, interaction patterns even if the ANOVA says an interaction is not significant. What is it testing (at least with a 2x2x2)?
52
Cond (F) ME Gen ME Surg ME Inj GxS Int GxI Int SxI Int GxSxI Int SurgInj 1StrMeth111 2StrSal1111111 3ShMeth1 11 4ShSal11 1 Cond (M) ME Gen ME Surg ME Inj GxS Int GxI Int SxI Int GxSxI Int SurgInj 1StrMeth1 1 1 2StrSal11 1 3ShMeth 111 4ShSal 11 1
53
Each contrast gives us a t-value testing for a main effect or an interaction. ◦ Each t 2 corresponds to an F testing for that same thing. The if we sum all the and divide by 7 (i.e., take an average), we get the omnibus F-value testing for an overall difference among all the conditions. That is, we get the F for MS between /MS within/error Check it!
54
The omnibus interaction is testing for two opposite crossover interactions. What if you predicted something different? 1 crossover and 1 no interaction 1 fan and one opposite fan Etc.
56
Cond (F) SurgInj 1StrMeth0 2StrSal101 3ShMeth10 4ShSal10 Cond (M) SurgInj 1StrMeth00 2StrSal010 3ShMeth00 4ShSal001
57
We can use d or g in comparing two means. ◦ Mean difference/Grand SD For interactions, we can use partial eta squared or Omega squared.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.