#### Transcript Two-Way Independent ANOVA (GLM 3)

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 SS T 2 s grand ( N 1) 190 . 78 ( 48 1) 8966 . 66 Slide 8 Step 2: Calculate SSM SS M SS M 8 (60.625 i 58 . 33 ) 8 (66.875 8 ( 2 . 295 ) n x 2 2 8 (66.875 58 . 33 ) 8 ( 8 . 545 ) 2 2 i x grand 58 . 33 ) 2 8 (57.5 58 . 33 ) 8 ( 4 . 17 ) 2 2 8 (62.5 58 . 33 ) 2 8 (35.625 8 ( 8 . 545 ) 2 2 58 . 33 ) 8 ( 0 . 83 ) 2 2 8 ( 2 2.705) 42 . 1362 584 . 1362 139 . 1112 584 . 1362 5 . 5112 4124 . 1362 5479 . 167 Slide 9 2 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 2 2 (56.46 SS Gender ) 24 SS A 24 (60.21 n i x i 58 .x33grand 2 2 24 (1 . 88 ) 24 ( 1.87) 84 . 8256 83 . 9256 168 . 75 Slide 10 58 . 33 ) 2 Step 2b: Calculate SSB B1: None B2: 2 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 SS alc ohol 16 (63.75 16 ( 5 . 42 ) Mean 2 Pints = 64.6875 58 . 33 ) 2 SS B 2 n x 16 (64.6875 16 (6.3575) 2 i i 3332 . 292 58 . 33 ) Mean 4 Pints = 46.5625 2 x grand 2 16 ( 11 . 7675 ) 470 . 0224 646 . 6849 2215 . 5849 Slide 11 B3: 4 Pints 2 (46.5625 16 58 . 33 ) 2 Step 2c: Calculate SSA B SS A B SS SS A B SS M SS M SS A SS A SS B B 5479 . 167 168 . 75 3332 . 292 1978 . 125 Slide 12 Step 3: Calculate SSR 2 2 2 2 SS R s group1 ( n1 1) s group2 ( n 2 1) s group3 ( n 3 1) s group 2 2 n (nn 1) 2 SS R s group1 ( n1 1) s group2 ( n 2 1) s group3 ( n 3 1) 2 2 2 s group4 ( n 4 1) s group5 ( n 5 1) s group6 ( n 6 1) ( 2 4.55 7 ) (1 06.7 7 ) ( 4 2.86 7 ) (1 56.7 7 ) ( 5 0 7 ) (1 17.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 Sig. 5 .047 Greenhouse -Geisser Huynh-Feldt .533 Tests the null hypothesis that the error covariance matrix of the orthonormalized transformed dependent variables is proportional to an identity matrix. Slide 31 .666 Lower-bound .333 Output Tests of Within-Subjects Effects Measure: MEASURE_1 Source Animal Error(Animal) Slide 32 Type III Sum of Squares df Mean Square F Sig. Sphericity Assumed 83.125 3 27.708 3.794 .026 Greenhouse-Geis ser 83.125 1.599 52.001 3.794 .063 Huynh-Feldt 83.125 1.997 41.619 3.794 .048 Lower-bound 83.125 1.000 83.125 3.794 .092 Sphericity Assumed 153.375 21 7.304 Greenhouse-Geis ser 153.375 11.190 13.707 Huynh-Feldt 153.375 13.981 10.970 Lower-bound 153.375 7.000 21.911 Interpretation: Main Effect B u s h tu c k e r T ria ls 10 9 T im e to R e tc h ( s ) 8 7 6 5 4 3 2 1 0 S tic k In s e c t K a n g a ro o T e s tic le A n im a l Slide 33 F is h E ye W itc h e tty G ru b 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