1 / 58

More than one Factor?

More than one Factor?. Factorial ANOVA!. Factors. 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…

cleta
Télécharger la présentation

More than one Factor?

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. More than one Factor? Factorial ANOVA!

  2. Factors • 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. Levels • 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. Simple example 1 • 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. Simple example 2 • 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. Science is not always simple • 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. Things to note • Our factors and levels are INDEPENDENT. • # conditions = (# levels in factor 1) x…x (# levels in last factor). • Each of these conditions are independent.

  8. Start out simple • 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. Full Example 1: 2x2 • 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. What does a 2-Factor ANOVA test? • 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. The 2 Factor ANOVA tests: • 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. What do these F-ratios look like? • 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. Main Effects: Tests of each Factor • 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. Null and Alternative Hypotheses for Main Effects • For Factor A (Surgery) • Ho: µA1 = µA2 OR µstroke = µsham • Ha: µ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. Null and Alternative Hypotheses for Main Effects • For Factor A (Injection) • Ho: µB1 = µB2 OR µmeth = µsaline • Ha: µ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. Interactions • 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. More than main effects

  18. Null and Alternative Hypotheses for Interactions • Ho: There is no interaction between mood and task. All mean differences are explained by the main effects of mood and task. • Ha: 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. Interactions… • 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. Basics about computing a 2-Factor ANOVA • We are going to calculate SSt and SSw/e and SSB the same way! • Now, we are going to break up SSb into • SSfor factor A • SSfor factor B • And Ssinteraction • We are going to require data now…

  21. (Stroke v. Sham) X (Meth v Saline) Actual research participant.

  22. The Data • Stroke and Meth (1): • Sum (X1)= 49; mean1 = 4.08; Sum (X12) = 215; n1 = 12 • Stroke and Saline(2): • Sum (X2)= 94; mean2 = 7.83; Sum (X22) = 750; n2 = 12 • Sham and Meth (3): • Sum (X3)= 46; mean3 = 3.83; Sum (X32) = 190; n3 = 12 • Sham and Saline (4): • Sum (X4)= 40; mean4 = 3.33; Sum (X42) = 142; n4 = 12 • Overall values (across groups): • Sum (Xoverall )= 229; Grand mean = 4.77; Sum (Xoverall2) = 1297; N = 48; k = ??

  23. 1) Find the total variability • …then break it into two components just like before: • SSTOTAL = • = (1297-[2292/48]) = 204.479 • SStotal = SSbetween + SSwithin • Again, dftotal = N – 1 = 48– 1 = 47.

  24. 2) Find the within group variability • Again, SSwithin = SSerror = • (215 – [492]/12)+(750– [942]/12)+(190– [462]/12)+(142– [402]/12) = 50.917 • Again, dfwithin/error = N – k = 48 – 4 = 44 • OK, so, SSb = 204.479 – 50.917 = 153.562

  25. 3) Find the between-group variability • Again, SSbetween/group = • ([492]/12)+([942]/12)+([462]/12)+([402]/12)-([2292]/48) = 153.562!!! • Again, dfbetween/group = k-1 =4-1 = 3 • OK, so, NOW we need to do something NEW!! • Break up SSb =into its constituent parts.

  26. 4) Find the between-group variability for Factor A (Surgery). • SSfactor A (Surgery) = • ([49+94]2/24)+([46+40]2/42)-([2292]/48) = 67.687 • df factor A (Surgery) = (Levels in factor A) – 1 = 1

  27. 5) Find the between-group variability for Factor B (Injection). • SSfactor B (Injection) = • ([49+46]2/24)+([94+40]2/42)-([2292]/48) = 31.687 • df factor B (Injection) = (Levels in factor B) – 1 = 1

  28. 6) Find the between-group variability for the Interaction. • SSinteraction = SSB–(SSfactor A + SSfactor B )= 54.188 • ([49+40]2/24)+([46+94]2/42)-([2292]/48) = 54.18 • Similarly, dfA x B interaction = dfbetween - dffactor A - dffactor B • dfA x B interaction = 3 – 1 – 1 = 1

  29. 7&8) Find the MS for your 2 main effects, interaction, and MSw. • MSfactor A = SSfactor A/ dffactor A= 67.687 • MSfactor B = SSfactor B/ dffactor B = 31.687 • MSA x B interaction = SSA x B interaction / dfA x B interaction= 54.188 • MSwithin = SSwithin / dfwithin = 50.917/447 =1.157

  30. 9) Compute Fs!!! • Ffactor A= MSfactor A/ MSwithin = • 67.687/1.157 = 58.493 • Ffactor B = MSfactor B/ MSwithin = • 31.687/1.157 = 27.383 • FA x B interaction = MSA x B interaction / MSwithin = 54.188/1.157 = 46.827 • Weeeeeeeee! • Let’s check out SPSS

  31. Looking at Contrasts: What are the Fs testing?

  32. OK, lets add a Factor…Gender!This also Applies to adding levels. • 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. What is the same? • Calculations of: • SStot, SSbetween/group, SSwithin/error are all the same. • What is different? • We must break up SSbetween/group into more parts. • What are they?

  34. Data broken up by Gender

  35. Breaking up SSbetween/group • Main effects • SSsurgery, SSinjection like before, but also… • Ssgender now because we have an additional factor. • Ok, that covers the Main effects. What else is there? • 2-way Interactions (involving just 2 factors). • SSsxi (as before), but also: SSgxs and SSgxi • New: 3-way interaction (all 3 factors) • SSgxsxi

  36. 1) Find the total variability • …then break it into two components just like before: • SSTOTAL = • = (1297-[2292/48]) = 204.479 • SStotal = SSbetween + SSwithin • Again, dftotal = N – 1 = 48– 1 = 47.

  37. 2) Find the within group variability • Again, SSwithin = SSerror = • But, now we have 8 (not 4) groups • (106– [242]/6)+(435– [512]/6)+(93– [232]/6)+(74– [202]/6)+ (109– [252]/6)+(315– [432]/6)+(97– [232]/6)+(68– [202]/6) = 45.5 • This is a different number than we had before; why? • Again, dfwithin/error = N – k = 48 – 8 = 40 • OK, so, SSb = 204.479 – 45.5 = 158.979

  38. 3) Find the between-group variability • Again, SSbetween/group = • Again, we have 8 groups now, so… • ([242]/6)+([512]/6)+([232]/6)+([212]/6)+([252]/6)+([432]/6)+([232]/6)+([202]/6)-([2292]/48) = 158.9799!!! • Again, dfbetween/group = k-1 =8-1 = 7 • OK, so, NOW we need to… • Break up SSb =into its constituent parts.

  39. 4) Find the between-group variability for Factor A (GENDER). • SSfactor A (Gender)= • ([24+51+23+20]2/24)+([25+43+23+20]2/24)-([2292]/48) = 1.021 • df factor A (gender) = (Levels in factor A) – 1 = 1

  40. 5) Find the between-group variability for Factor B (Surgery). • SSfactorB (Surgery) = • ([24+51+25+43]2/24)+([23+20+23+20]2/24)-([2292]/48) = 67.687 • df factor B (Surgery) = (Levels in factor B) – 1 = 1

  41. 6) Find the between-group variability for Factor C (Injection). • SSfactorC (Injection) = • ([24+23+25+23]2/24)+([51+20+43+20]2/42)-([2292]/48) = 31.687 • df factor C (Injection) = (Levels in factor C) – 1 = 1

  42. 7a) Find the between-group variability for the Interactions. • SSaxb = SSAB–(SSfactor A + SSfactor B ) • SSAB is looking at 4 groups collapsing across Injection. • SSAB = • ([24+51]2/12)+([23+20]2/12)+([25+43]2/12)+([23+20]2/12)-([2292]/48) = 69.72 • So, SSaxb = 69.72- (1.021+67.688) = 1.021 • dfA x B interaction = (dffactor A )( dffactor B) • dfA x B interaction = 1x1= 1

  43. 7b) Find the between-group variability for the Interactions. • SSaxc = SSAC–(SSfactor A + SSfactor C ) • SSAC is looking at 4 groups collapsing across Surgery. • SSAC = • dfA x C interaction = (dffactor A )( dffactor C) • dfA x C interaction = 1x1= 1

  44. 7c) Find the between-group variability for the Interactions. • SSbxc = SSBC–(SSfactor B + SSfactor C ) • SSBC is looking at 4 groups collapsing across Gender. • SSBC = • dfB x C interaction = (dffactor B )( dffactor C) • dfB x C interaction = 1x1= 1

  45. 8) Find the b-g variability for the 3-way Interaction. • SSaxbxc = SSBetween– (SSaxb+ SSaxc+ SSbxc+ SSfactor A + SSfactor B + SSfactor C ) • dfA x B x C interaction = • (dffactor A )(dffactor B )( dffactor C) • dfAxBxC interaction = 1x1x1= 1

  46. 9) Find the MSs • Main effects • MSfactor A = SSfactor A/ dffactor A • MSfactor B = SSfactor B/ dffactor B • MSfactor C = SSfactor C/ dffactor C • 2-way Interactions • MSA x B interaction = SSA x B interaction / dfA x B interaction • MSA x C interaction = SSA x C interaction / dfA x C interaction • MSB x C interaction = SSB x C interaction / dfB x C interaction • 3-way Interaction • MSAxBx C interaction = SSAxBx C interaction / dfAxBx C interaction • MSwithin = SSwithin / dfwithin

  47. 10) 7 Compute Fs!!! • F = MSb/MSw for each Main effect and interaction. • Let’s check out SPSS

  48. Waa hoo! We have Interactions • 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. Simple Effects Tests • 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 MSWE is in the denominator. • What does the equation look like? • Any F really. Let’s break down the SxI interaction…

  50. Simple Effect of Injection within Stroke Conditions. SSfactorC/Injection (stroke only) = ([24+25]2/12)+([51+43]2/12)-([1432]/24) = 200.08+736.33-852.04 = 84.375 dffactor C/Injection (stroke only) = (Levels in factor C) – 1 = 1 MSfactorC/Injection (stroke only) = SSfactorC/Injection (stroke only) /Dffactor C/Injection (stroke only) Ffactor C/Injection (stroke only)=MSfactorC/Injection (stroke only)/MSW/E = 84.375/1.137 = 74.176

More Related