Analysis of variance ANOVA E0420 Week 5 What for? •To compare more than two independent means = more than two groups • •ANOVA = regression •More precisely, both are linear models •More about that later on in the course • Logic •To see whether there is a “signal” in the noise •To see whether the variance due to group membership is systematic •To compare whether group means differ from grand mean Group means ANOVA model 1.Categorical independent variable 2.Continuous dependent variable • • •All of the assumptions we know from t tests apply here •Normality of distribution of DV within each group •Homogeneity of variance •Independence of observations ANOVA types •One-way ANOVA •Two-way ANOVA •Repeated measures ANOVA •ANCOVA •MANOVA •MANCOVA One-way ANOVA •Comparing whether means of groups differ from the baseline •H0: the group means are not significantly different from the grand mean (i.e. the sample average) • •Terms: •Sums of squares (SS) •degrees of freedom (df) •Mean square (MS) •F-test Sums of squares (SS) • •SS/(n-1) = variance • •SS between = variance between groups = IV •SS within = variance within groups = error • •SS Total = SS between + SS within • •Mean square: SS/df Degrees of freedom •The number of independent values that can vary in an analysis •df = n – # parameters •for 2 groups = 1df, for 3 groups = 2df… •Ex: average is 10 out of 3 numbers. What are the 3 numbers? •X1, X2, X3 •Once we know X1 and X2, X3 has only one solution = 2 degrees of freedom • F-test F Distribution | R Tutorial http://www.r-tutor.com/elementary-statistics/probability-distributions/f-distribution Post-hoc tests •F-test is an omnibus test •Tells you whether the variance explained is significantly greater than random variance •Does not tell you which group means are different from grand mean •Need to run post-hoc tests – pairwise comparisons •Running multiple t tests inflates Type I error rate • n of groups comparisons Type I error rate 2 1 5% 3 3 14% 4 6 26% 5 10 40% 6 15 54% 7 21 66% 8 28 76% 9 36 84% 10 45 90% Different types •Bonferroni •Easy to compute •Conservative – decreases statistical power •Tukey – for all pairwise comparisons •Dunnett – for comparing group means to control, not to each other •LSD •HSD •Scheffé • • Two-way ANOVA •Two categorical variables •Can estimate interactions (IV1 conditional on levels of IV2 and vice versa) • https://dynamicecology.wordpress.com/2014/10/02/interpreting-anova-interactions-and-model-selection / Repeated measures ANOVA •For asessing the effect of categorical IV with more timepoints of the DV •E.g., pretest-posttest • • ANCOVA •ANalysis Of COVAriance •ANOVA + controlling for other variables MANOVA •Multiple Analysis Of VAriance •Estimates effects on multiple DVs •Using a combination of DVs •multivariate F value (Wilks‘ λ) • Statistical write-up •There was a statistically significant difference between groups as determined by one-way ANOVA, F(2,27) = 4.467, p = .021. •A post hoc Tukey test showed that the Group A and Group B differed significantly at p < .05; the Group C was not significantly different from the other two groups. •