Two_way_ANOVA

Two_way_ANOVA - Two-way ANOVA Two-way Chapter 11 Two-way...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Two-way ANOVA Two-way Chapter 11 Two-way ANOVA Two-way Two Two independent variables are manipulated simultaneously simultaneously Remember the memory study (presented for ch. Remember 10)? What if we manipulated the presentation condition & the age of the participants? Factorial Design 3 x2 3 levels of A (presentation condition) 2 levels of B (age) a=3; b=2 PRESENTATION COND (A) Incomplete Outline Outline Detail Young AGE (B) Old A1B1 17 A1B2 10 A2B1 13 A2B2 10 A3B1 12 A3B2 15 Sources of Variation: Sources Factor A: Presentation Condition Factor B: Age Interaction of A x B Presentation (A) Incomp Outline Detail (A1) (A2) (A3) Young (B1) Age (B) Old (B2) 17 10 13.5 (A1) 13 10 11.5 (A2) 12 15 13.5 (A3) 14.0 (B1) 11.7 (B2) Interaction of A x B Interaction 18 16 14 12 10 8 6 4 2 0 items recalled Young Old I ncomplete Outline Presentation Detail Simplest Factorial Design Simplest 2 x 2: 2 levels of A and 2 levels of B Factor A A1 A2 A1B1 A1B2 A2B1 A2B2 B1 Factor B B2 Cells or treatment condition A=2 = levels of Factor A B=2 = levels of Factor B Two-way example Two-way Experimenter Experimenter wants to study the effects of diet and environment on intellectual development development Factor A: Diet Factor Carbohydrates Balanced (A1) (A2) Factor B: Environment Simple (B1) Enriched (B2) DIET Carb (A1) Bal (A2) ENVIRONMENT Simple (B1) 97 90 80 107 80 68 87 92 80 84 70 87 81 95 90 114 96 127 110 115 Enriched (B2) General Notation General Xijk i = subject # in treatment condition or cell j = level of (A) k = level of (B) nab = # of subjects in each cell Factor A A1 B1 X111 X211 X311 X411 X511 A2 X121 X221 X321 X421 X521 X122 X222 X322 X422 X B2 X112 X212 X312 X412 X ANOVA: An analysis of mean differences. differences. Diet Carbo (A1) Simple (B1) Environment Enriched(B2) Balanced(A2) 90.8 XA1B1 82.2 XA1B2 84.6 XA2B1 112.4 XA2B2 ANOVA: An analysis of mean differences. Diet Carbo (A1) Simple (B1) Environment Enriched(B2) Main effect A: Main effect Balanced(A2) B 84.6 XA2B1 112.4 XA2B2 XA2 = 98.5 XB1 = 87.7 XB2 = 97.3 Grand mean 90.8 XA1B1 82.2 XA1B2 XA1 = 86.5 92.5 What is a Main Effect? What Main effect means Look Look at the performance on one level of IV ignoring the second IV classification ignoring In this study, we have 2 main effects What was the effect of diet on IQ? What was the effect of environment on IQ? ANOVA: An analysis of mean differences differences Diet Carbo (A1) Simple (B1) Environment Enriched(B2) Main effect Balanced(A2) B 84.6 XA2B1 112.4 XA2B2 XA2 = 98.5 XB1 = 87.7 XB2 = 97.3 Grand mean 90.8 XA1B1 82.2 XA1B2 Main effect A: XA1 = 86.5 92.5 ANOVA: An analysis of mean differences differences Diet Carbo (A1) Simple (B1) Environment Enriched(B2) Main effect A: Main effect Balanced(A2) B 84.6 XA2B1 112.4 XA2B2 XA2 = 98.5 XB1 = 87.7 XB2 = 97.3 Grand mean 90.8 XA1B1 82.2 XA1B2 XA1 = 86.5 92.5 Interaction of Independent Variables Interaction Is there a difference, in the effect of one IV at levels of the Is other IV? other 115 110 105 100 95 90 85 80 75 70 Carbo Diet Balanced Simple Enriched IQ Two-way between subjects ANOVA Two-way A mechanism for testing hypotheses about mechanism differences between means differences Need to partition total variance of each Need score into unique parts score Factor Factor A B AxB MSA MSB MSAxB MSError Interaction Error Variation ANOVA Hypothesis Testing ANOVA Factor A Factor F-test MSA MS MSError MSB MSError MSAxB MSError Factor B Interaction AxB Obtaining MS Obtaining MSA MSB MSAxB MSError = SSA SS dfA df = SSB SS dfB df = SSAxB SS dfAxB df = SSError SS dfError df Partitioning Formula Partitioning (Xijk– XG) = (XA–XG) + (XB–XG) +(XAB–XA– XB+XG) +(Xijk–XAB) (X SS = SSA + SSB + SSAxB + SSError Sums of Squares: Sums Interaction Term SSAxB = (XAB–XG ) – SSA – SSB SS = (XAB–XG ) - (XAB–XG ) - (XAB–XG ) (X (X (X = (XAB–XG ) - XA + XG – XB + XG (X = XAB - XA – XB + XG Partitioning one score Partitioning X412 = 80 XG XA1 XB2 (X412– XG) = (XA1–XG) + (XB2–XG) +(XA1B2–XA1– XB2+XG) +(X412–XA1B2) (X (80-92.5) = (80-92.5) (86.5-92.5)+(97.3-92.5)+(82.2-86.5-97.3+92.5)+(80-82.2) (86.5-92.5)+(97.3-92.5)+(82.2-86.5-97.3+92.5)+(80-82.2) -12.5 = (-6) +(4.8) + (-9.1) + (-2.2) = 92.5 = 86.5 = 97.3 XA1B2 = 82.2 Actually obtaining SS Actually 1. 2. 3. Partition each score Square the deviation components Sum up the squared deviation Sum components components SEE PAGES 284 & 285 for examples!!!!! Sum the squared deviations Sum a b na SSTotal = ∑ ∑ ∑ (Xijk – XG)2 j=1 k=1 i=1 SSA SSB = ∑ ∑ ∑ (XA - XG)2 = ∑ ∑ ∑ (XB - XG)2 SSAxB = ∑ ∑ ∑ (XAB - XA - XB + XG)2 AB SSError = ∑ ∑ ∑ (Xiijk - XAB)2 jk SS and dfs are Additive! SS SS SSTotal = Total dfTotal = Total dfA = SSA + SSB + SSAxB + SSError SS dfs dfA + dfB + dfAxB + dfError df a-1 [a = # of levels of (A)] [a dfB = b-1 [b = # of levels of (B)] b-1 dfAxB = (a-1)(b-1) (a-1)(b-1) AxB dfError = ab(nab -1) [nab = # of subjects in each cell] ab(n Error dfTotal = N-1 [N = total # of subjects in N-1 Total experiments] experiments] ANOVA Summary Table ANOVA Source Factor A Factor B df a-1 b-1 SS ∑∑∑ (XA - XG)2 ∑∑∑ (XB - XG)2 MS SSA dfA SSB dfB SSAxB dfAxB SSError dfError MSA F MSError MSB MSError MSAxB MSError Interaction (a-1)(b-1) ∑∑∑ (XAB - XA XB + XG)2 AxB Error ab(nab -1) ∑∑∑ (Xijk - XAB)2 2 ANOVA Summary Table for Example (see pgs.284-5 for calculations of SSs) (see α =.05, Fcrit (1, 16) = 4.49 Source Diet (A) Environ ment (B) Interaction AxB df 1 1 1 16 19 SS 720.0 460.8 1656.2 1730.0 4567.0 MS 720.0 460.8 1656.2 108.12 F 6.66 4.26 15.32 Error Total Fcrit Fcrit Not Not always the same for main effects of A & B, and the interaction B, Depends on number of levels of A & B Examples (with nab=10) Examples Source Factor A Factor B Int. AxB Error Total df formula df 2x3 Fcrit a-1 b-1 (a-1)(b-1) ab(nab-1 ) N-1 1 2 2 54 59 (1,54) (2,54) (2,54) Examples (with nab=10) Examples Source Factor A Factor B Int. AxB Error Total df formula df 2x3 Fcrit df 3x5 Fcrit a-1 b-1 (a-1)(b-1) ab(nab-1 ) N-1 1 2 2 54 59 (1,54) (2,54) (2,54) 2 4 8 135 149 (2, 135) (4,135) (8,135) Calculate the dfs for a 4x6, nab=10 Calculate Source Factor A Factor B Int. AxB Error Total df formula df 2x3 Fcrit a-1 b-1 (a-1)(b-1) ab(nab-1 ) N-1 Calculate the dfs for a 4x6, nab=10 Calculate Source Factor A Factor B Int. AxB Error Total df formula df 2x3 Fcrit a-1 b-1 (a-1)(b-1) ab(nab-1 ) N-1 3 5 15 216 239 (3,216) (5,316) (15,216) Factors Affecting MS if H0 is True Factors Effect A B AxB H0 H0: μA1 = μA2 H0: μB1 = μB2 H0: All (μAB-μA-μB+μG =0) Factors Sampling Error Sampling Error Sampling Error Factors Affecting MS if H1 is True Factors Effect A B AxB H1 H1: The μAs =are not equal H1: The μBs =are not equal H1: not all (μAB-μA-μB+μG =0) Factors Treatment A + Sampling Error Treatment B + Sampling Error Treatment interaction + Sampling Error Statistical Decision Making Statistical If H0 is true and H1 is false F = Sampling Error ≈1.0 Sampling MSError If H0 is false and H1 is true F = Treatment Effect & Sampling Error Treatment MSError MS F > 1.0 1.0 Fobs> Fcrit: Reject H0, accept H1 Fobs> Testing for Significant Differences: Main Effects Main Necessary Necessary if 3 or more levels of IV or Use Tukey HSD, but formula changes to Use reflect number of scores in means reflect CD = q MSError CD MS nA nA Or CD = q MSError CD MS nB Testing Main Effects for Example Testing Not necessary if we have only 2 levels Computation of Tukey HSD if 3 or more Computation levels of A were used in Experiment. levels CD = q MSError CD MS nA nA q=3.65, nA = 10, MSError = 108.12 q=3.65, MSError 108.12 Testing Interactions… Testing In In our study, we had a main effect for diet & our interaction was statistically significant. interaction Can we say that having a balanced diet is Can associated with higher IQs? Not necessarily – thus, the interaction may Not reveal that it depends on what kind of environment they were in!!! If we have an interaction, we start with the If interaction… interaction… Testing Interactions… Testing Because Because the effect of one IV depends on the level of the other IV, we’ve got to compare the cell means cell Here, we’re interested in the simple effects Here, of the IV (or the simple main effect). of ANOVA: An analysis of mean differences differences Diet Carbo (A1) Simple (B1) Environment Enriched(B2) Main effect A: Main effect Balanced(A2) B 84.6 XA2B1 112.4 XA2B2 XA2 = 98.5 XB1 = 87.7 XB2 = 97.3 Grand mean 90.8 XA1B1 82.2 XA1B2 XA1 = 86.5 92.5 Simple Effects of Diet Simple Simple effect of Diet in a simple environment Simple (simple effect of A at B1) (simple XA1B1 – XA2B1 A1B1 90.8 – 84.6 = 6.2 90.8 Simple effect of Diet in an enriched environment Simple (simple effect of A at B2) (simple XA1B2 – XA2B2 A1B2 82.2 – 112.4 = -30.2 82.2 ANOVA: An analysis of mean differences differences Diet Carbo (A1) Simple (B1) Environment Enriched(B2) Main effect A: Main effect Balanced(A2) B 84.6 XA2B1 112.4 XA2B2 XA2 = 98.5 XB1 = 87.7 XB2 = 97.3 Grand mean 90.8 XA1B1 82.2 XA1B2 XA1 = 86.5 92.5 Simple Effects of Diet Simple Simple effect of Diet in a simple environment Simple (simple effect of A at B1) (simple XA1B1 – XA2B1 A1B1 90.8 – 84.6 = 6.2 90.8 Simple effect of Diet in an enriched environment Simple (simple effect of A at B2) (simple XA1B2 – XA2B2 A1B2 82.2 – 112.4 = -30.2 82.2 ANOVA: An analysis of mean differences differences Diet Carbo (A1) Simple (B1) Environment Enriched(B2) Main effect A: Main effect Balanced(A2) B 84.6 XA2B1 112.4 XA2B2 XA2 = 98.5 XB1 = 87.7 XB2 = 97.3 Grand mean 90.8 XA1B1 82.2 XA1B2 XA1 = 86.5 92.5 Simple Effects of Environment Simple Simple effect of environment with a carbohydrate Simple only diet (simple effect of B at A1) only XA1B1 – XA1B2 A1B1 90.8 – 82.2 = 8.6 90.8 Simple effect of an environment with a balanced Simple diet (simple effect of B at A2) diet XA2B1 – XA2B2 A2B1 84.6 – 112.4 = - 27.8 84.6 ANOVA: An analysis of mean differences differences Diet Carbo (A1) Simple (B1) Environment Enriched(B2) Main effect A: Main effect Balanced(A2) B 84.6 XA2B1 112.4 XA2B2 XA2 = 98.5 XB1 = 87.7 XB2 = 97.3 Grand mean 90.8 XA1B1 82.2 XA1B2 XA1 = 86.5 92.5 Simple Effects of Environment Simple Simple effect of environment with a carbohydrate Simple only diet (simple effect of B at A1) only XA1B1 – XA1B2 A1B1 90.8 – 82.2 = 8.6 90.8 Simple effect of an environment with a balanced Simple diet (simple effect of B at A2) diet XA2B1 – XA2B2 A2B1 84.6 – 112.4 = - 27.8 84.6 ANOVA: An analysis of mean differences differences Diet Carbo (A1) Simple (B1) Environment Enriched(B2) Main effect A: Main effect Balanced(A2) B 84.6 XA2B1 112.4 XA2B2 XA2 = 98.5 XB1 = 87.7 XB2 = 97.3 Grand mean 90.8 XA1B1 82.2 XA1B2 XA1 = 86.5 92.5 Tukey HSD test Tukey Again, to test whether the cells means are different from Again, each other, we use the Tukey HSD test again. each CD = q MSError CD MS nAB q = studentized range statistic 1) Level of α Level 2) See refer to the chart, bottom of A4 to see which q to See use to test simple effects of your factorial design use 3) df for MSError From Table A-4 494 & 495 From MSError = from overall F nAB = # of subjects in each cell. Our example Our CD = q MSError CD MSError nAB CD = 3.65 108.12 = 17.0 CD 108.12 5 Any simple effect that has an absolute value Any that is ≥ 17.0 is statistically significant at . 17.0 05. q (α=.05, 2x2) = 3.65 So, in our experiment So, Only 2 values were statistically significant Simple effect of Diet in an enriched environment Simple effect of Environment with a balanced diet In In this study, can we interpret the main effect? effect? No, No, it’s an artifactual main effect. It only occurs because having a balanced diet only was only statistically associated with greater IQ only in the enriched environment only The The effect of diet depended on the type of environment the child was raised in. environment In In a simple environment, there were no significant differences in IQ for kids who had carbs only or a balanced diet balanced In an enriched environment, children who had a In balanced diet had higher IQs than kids who had a carb only diet carb The The effect of environment on IQ was dependent on the type of diet the child ate on With With a carb only diet, there were no significant differences in IQ for kids in a simple or enriched environment environment With a balanced diet, children who had an enriched With environment had higher IQs than kids in a simple environment. environment. Interaction of Independent Variables Interaction Is there a difference, in the effect of one IV at levels of the Is other IV? other 115 110 105 100 95 90 85 80 75 70 Carbo Diet Balanced Simple Enriched IQ Measuring Strength of Effect Measuring η2 =SSA SSTotal SS η2 =SSB SSTotal SS η2 =SSAXB SSTotal SS For statistically significant main effect for factor A For statistically significant main effect for factor B For statistically significant main effect for factor AXB Strength of Effect for Example Strength η2 =SSA SSTotal SS η2 =SSAB SSTotal SS η2 =SSA SSTotal SS = 720.0 =.16 720.0 4567.0 = 720.0 =.16 720.0 4567.0 = 720.0 =.16 720.0 4567.0 ...
View Full Document

This note was uploaded on 01/16/2011 for the course PSYC 274 at USC.

Ask a homework question - tutors are online