Two-Way Independent ANOVA (GLM 3) Slide 1 Aims • Rationale of Factorial ANOVA • Partitioning Variance • Interaction Effects –Interaction Graphs –Interpretation Slide 2 What is Two-Way Independent ANOVA? • Two Independent Variables – Two-way = 2 Independent variables – Three-way = 3 Independent variables • Different participants in all conditions. – Independent = ‘different participants’ • Several Independent Variables is known as a factorial design. Slide 3 Benefit of Factorial Designs • We can look at how variables Interact. • Interactions – Show how the effects of one IV might depend on the effects of another – Are often more interesting than main effects. • Examples – Interaction between hangover and lecture topic on sleeping during lectures. • A hangover might have more effect on sleepiness during a stats lecture than during a clinical one. Slide 4 An Example • Field (2009): Testing the effects of Alcohol and Gender on ‘the beer-goggles effect’: – IV 1 (Alcohol): None, 2 pints, 4 pints – IV 2 (Gender): Male, Female • Dependent Variable (DV) was an objective measure of the attractiveness of the partner selected at the end of the evening. Slide 5 Alcohol Gender Slide 6 None 2 Pints 4 Pints Female Male Female Male Female Male 65 50 70 45 55 30 50 55 65 60 65 30 70 80 60 85 70 30 45 65 70 65 55 55 55 70 65 70 55 35 30 75 60 70 60 20 70 75 60 80 50 45 55 65 50 60 50 40 Total 485 535 500 535 460 285 Mean 60.625 66.875 62.50 66.875 57.50 35.625 Variance 24.55 106.70 42.86 156.70 50.00 117.41 SST (8967) Variance between all scores SSM SSR Variance explained by the experimental manipulations SSA Effect of Alcohol SSB Effect of Gender Error Variance SSA B Effect of Interaction Step 1: Calculate SST 65 50 70 45 55 30 50 55 65 60 65 30 70 80 60 85 70 30 45 65 70 65 55 55 55 70 65 70 55 35 30 75 60 70 60 20 70 75 60 80 50 45 55 65 50 60 50 40 Grand Mean = 58.33 2 SS T sgrand (N 1) 190 .78 (48 1) 8966 .66 Slide 8 Step 2: Calculate SSM SSM ni xi xgrand 2 SSM 8(60.625 58 .33)2 8(66.875 58 .33)2 8(62.5 58 .33)2 8(66.875 58 .33)2 8(57.5 58 .33)2 8(35.625 58 .33)2 8(2.295 )2 8 (8.545 )2 8(4.17)2 8 (8.545 )2 8(0.83)2 8 (22.705) 2 42 .1362 584 .1362 139 .1112 584 .1362 5.5112 4124 .1362 5479 .167 Slide 9 Step 2a: Calculate SSA A1: Female A2: Male 65 70 55 50 45 30 70 65 65 55 60 30 60 60 70 80 85 30 60 70 55 65 65 55 60 65 55 70 70 35 55 60 60 75 70 20 60 60 50 75 80 45 55 50 50 65 60 40 Mean Female = 60.21 Mean Male = 56.46 24 (1.88) 2 2 (56.46 58 .33)2 SSGender 24 (60.21 58 . 33 ) 24 SS n x x A i 2 i grand 24 (1.87) 2 84 .8256 83 .9256 168 .75 Slide 10 Step 2b: Calculate SSB B1: None B2: 2 Pints B3: 4 Pints 65 50 70 45 55 30 70 55 65 60 65 30 60 80 60 85 70 30 60 65 70 65 55 55 60 70 65 70 55 35 55 75 60 70 60 20 60 75 60 80 50 45 55 65 50 60 50 40 Mean None = 63.75 Mean 2 Pints = 64.6875 n x Mean 4 Pints = 46.5625 2 (46.5625 58 .33)2 SSalc ohol 16(63.75 58 .33)2 16 (64.6875 58 .33)2 16 SSB xgrand i i 16 (5.42) 16 (6.3575) 16 (11 .7675 )2 2 2 470 .0224 646 .6849 2215 .5849 3332 .292 Slide 11 Step 2c: Calculate SSA B SSA B SS M SS A SS B SS A B SS M SS A SS B 5479 .167 168 .75 3332 .292 1978 .125 Slide 12 Step 3: Calculate SSR 2 2 2 2 SSR sgroup1 (n1 1) sgroup2 (n2 1) sgroup3 (n3 1) sgroup n (nn 1) 2 2 2 SSR sgroup1 (n1 1) sgroup2 (n2 1) sgroup3 (n3 1) 2 2 2 sgroup4 (n4 1) sgroup5 (n5 1) sgroup6 (n6 1) (24.55 7) (106.7 7) (42.86 7) (156.7 7) (50 7) (117.41 7) 171 .85 746 .9 300 1096 .9 350 821 .87 3487 .52 Slide 13 Summary Table Slide 14 Interpretation: Main Effect Alcohol There was a significant main effect of the amount of alcohol consumed at the night-club, on the attractiveness of the mate that was selected, F(2, 42) = 20.07, p < .001. Slide 15 Interpretation: Main Effect Gender There was a nonsignificant main effect of gender on the attractiveness of selected mates, F(1, 42) = 2.03, p = .161. Slide 16 Interpretation: Interaction There was a significant interaction between the amount of alcohol consumed and the gender of the person selecting a mate, on the attractiveness of the partner selected, F(2, 42) = 11.91, p < .001. Slide 17 What is an Interaction? Slide 18 Is there likely to be a significant interaction effect? Slide 19 Is there likely to be a significant interaction effect? Slide 20 Repeated-measures designs (GLM 4) Aims • Rationale of Repeated Measures ANOVA – One- and two-way – Benefits • Partitioning Variance • Statistical Problems with Repeated Measures Designs – Sphericity – Overcoming these problems • Interpretation Slide 22 Benefits of Repeated Measures Designs • Sensitivity – Unsystematic variance is reduced. – More sensitive to experimental effects. • Economy – Less participants are needed. – But, be careful of fatigue. Slide 23 An Example • Are certain Bushtucker foods more revolting than others? • Four Foods tasted by 8 celebrities: – – – – Stick Insect Kangaroo Testicle Fish Eyeball Witchetty Grub • Outcome: – Time to retch (seconds). Slide 24 The Data Celebrity Stick Insect Testicle Fish Eye Witchetty Grub Mean Variance Df 1 8 7 1 6 5.50 9.67 3 2 9 5 2 5 5.25 8.25 3 3 6 2 3 8 4.75 7.58 3 4 5 3 1 9 4.50 11.67 3 5 8 4 5 8 6.25 4.25 3 6 7 5 6 7 6.25 0.92 3 7 10 2 7 2 5.25 15.58 3 8 12 6 8 1 6.75 20.92 3 Mean 8.13 4.25 4.13 5.75 Grand Mean = 5.56 24 SST Variance between all scores SSW SSBetween Variance Within Individuals SSM Effect of Experiment Slide 26 SSR Error Problems with Analyzing Repeated Measures Designs • Same participants in all conditions. – Scores across conditions correlate. – Violates assumption of independence (lecture 2). • Assumption of Sphericity. – Crudely put: the correlation across conditions should be the same. – Adjust Degrees of Freedom. Slide 27 The Assumption of Sphericity • Basically means that the correlation between treatment levels is the same. • Actually, it assumes that variances in the differences between conditions is equal. • Measured using Mauchly’s test. – P < .05, Sphericity is Violated. – P > .05, Sphericity is met. Slide 28 What is Sphericity? Slide 29 Testicle Stick Eye – Stick Witchetty – Stick Eye – Testicle Witchetty Witchetty – Testicle – Eye 1 -1 -7 -2 -6 -1 5 2 -4 -7 -4 -3 0 3 3 -4 -3 2 1 6 5 4 -2 -4 4 -2 6 8 5 -4 -3 0 1 4 3 6 -2 -1 0 1 2 1 7 -8 -3 -8 5 0 -5 8 -6 -4 -11 2 -5 -7 Variance 5.27 4.29 25.70 11.55 14.29 26.55 Estimates of Sphericity • Three measures: – Greenhouse-Geisser Estimate ~ – Huynh-Feldt Estimate – Lower-bound Estimate ˆ • Multiply df by these estimates to correct for the effect of Sphericity. • G-G is conservative, and H-F liberal. Slide 30 Correcting for Sphericity Df = 3, 21 Mauchly's Test of Sphericity Measure: MEASURE_1 Epsilon Within Subjects Effect Animal Mauchly's W .136 Approx. Chi-Square 11.406 df 5 Sig. .047 Greenhous e -Geiss er .533 Huynh-Feldt .666 Lower-bound .333 Tests the null hypothesis that the error covariance matrix of the orthonormalized trans formed dependent variables is proportional to an identity matrix. Slide 31 Output Tests of Within-Subjects Effects Measure: MEASURE_1 Source Animal Error(Animal) Slide 32 Sphericity Assumed Greenhous e-Geisser Huynh-Feldt Lower-bound Sphericity Assumed Greenhous e-Geisser Huynh-Feldt Lower-bound Type III Sum of Squares 83.125 83.125 83.125 83.125 153.375 153.375 153.375 153.375 df 3 1.599 1.997 1.000 21 11.190 13.981 7.000 Mean Square 27.708 52.001 41.619 83.125 7.304 13.707 10.970 21.911 F 3.794 3.794 3.794 3.794 Sig. .026 .063 .048 .092 Interpretation: Main Effect Bushtucker Trials 10 9 Time to Retch (s) 8 7 6 5 4 3 2 1 0 Stick Insect Kangaroo Testicle Animal Slide 33 Fish Eye Witchetty Grub Post Hoc Tests • Compare each mean against all others (t-tests). • In general terms they use a stricter criterion to accept an effect as significant. – Hence, control the familywise error rate. – Simplest example is the Bonferroni method: Bonferroni Slide 34 Number of Tests What is Two-Way Repeated Measures ANOVA? • Two Independent Variables – Two-way = 2 IVs – Three-Way = 3 IVs • The same participants in all conditions. – Repeated Measures = ‘same participants’ – A.k.a. ‘within-subjects’ Slide 35 An Example • Field (2009): Effects of advertising on evaluations of different drink types. – IV 1 (Drink): Beer, Wine, Water – IV 2 (Imagery): Positive, negative, neutral – Dependent Variable (DV): Evaluation of product from -100 dislike very much to +100 like very much) Slide 36 SST Variance between all participants SSR SSM BetweenParticipant Variance Within-Particpant Variance Variance explained by the experimental manipulations SSA SSA B Effect of Drink Effect of Imagery Effect of Interaction SSRA SSRB SSRA B Error for Drink Slide 37 SSB Error for Imagery Error for Interaction Running the Analysis: Naming factors Slide 38 Defining Variables Slide 39 Defining Variables Slide 40 Contrasts Slide 41 Plots Slide 42 Getting Means Slide 43 Output: Sphericity Slide 44 Output: Main ANOVA Slide 45 Main Effect of Drink F(1.15, 21.93) = 5.11, p < .05 Slide 46 Main Effect of Imagery F(1.50, 28.40) = 122.57, p < .001 Slide 47 Drink by Dose Interaction F(4, 76) = 17.16, p < .001 Slide 48 Contrasts