week 10. 2-way ANOVA Flashcards
2-way ANOVA
Also called factorial Anova. Has 2 factors. (Some actually have more=factorial anova) If have 3 levels in 1st factor, and 2 in second, is a 3x2 factorial anova. Factorial anovas allow for more complex understanding of multi-faceted interactions. ina two-way factorial anova we can answer these questions; 1. what is the main effect of Factor A? 2.What is the main effect of Factor B? 3. axb interaction? Does factor A’s effect on the dependent variable differ for Factor B’s different levels? Will need to obtain an F statistic for each of these three questions. Therefore need a sum of squares for factor A, sum of squares for factor B and a sum of squares for factor axb interaction.
Factor
an independent variable.eg temperature and gender ,and studied alongside test results as dependedent variable etc
level
Also known as a group. eg if have factor of temperature, might have three groups or levels within the factor eg 15 degrees, 20 degrees and 25 degrees.
Note that if we have a 2 level Factor A, and a 3-level Factor B, and if we have n=6 for each cell,
then N= number of cells (2x3) x n (6)=6x6=36
Interaction
An interaction occurs when the effect of one factor on the dependent variable, IS NOT THE SAME at all levels of the other factor. eg the effect of temperature was not the same for male and female, on cognition. If the lines graphed for a) Factor 1/factor 2a, and dependent variable (eg temperature/males and cognitive performance) and b) Factor 1/factor 2b and dependent variable ( eg temp/females and cognitive performance) are parallel (even if change directions still in parallel), then factor 1 is having the same effect (temperature) and there is no interaction.
Main effect
This is the overall effect of one factor, without considering the other factor. eg maybe females perform cognitively better irrespective of what the temperature was. Conceptually, a main effect is the same as when conducting a one-way anova. eg, overall is there a difference between the different temperature groups, and also as a seperate question, is there an overall gender difference etc.?
it is important to remember that main effects and interaction effects are independent. Can have both, none or 1of either, in any combination.
Calculations
MS=SS/df
F=MStreatment/MSerror
Need multiple F statistics, and need to calculate SS (sum of squares ) for each.
X-… =grand mean
SSfactor a=nbΣ(X-a -X-…)2
where n=number of participants in each cell eg factor a1 such as male, and factor b1 such as high anxiety
b= number of levels for factor B such as 2 in eg of high and low anxiety.
X-a= the mean for factor A across all levels. eg if A is gender, then X-a is the mean of male plus mean of female and divided by 2.
then SSb=naΣ(X-b-X-…)2
Also need SScells
SScells=nΣ(X-ab-X-…)2
X-ab is the mean for each cell, so in a 2x2 analysis there are 4 cell means eg male and low anxiety cell etc.
then SSab=SS for interaction
SSab=SScells-SSa-SSb
and finally SSerror=SStotal-SScells
Put SS values in anova table.
Degrees of freedom;
Total df is always N-1
df for each factor is number of levels-1.
df for interaction axb=df of a x df of b.
df error= df total -dfa-dfb-dfab
consult F tables for each F
if F(df treatment, df error)> critical F, reject the null hypothesis.
remember df treatment is numerator and df error is denominator
eg, Ffactor a=MSfactor a/MSerror
and Fab interaction=MSab/MSerror
If have an F=4.76, this means that the variance between treatments if 4.76 times greater than the error variance.
3-factor anova
if had a 3 factor anova, would need an F statistic for the main effect of A, B and C individually,
plus an F statistic for each interaction (AB,BC,AC and ABC) so 7 F statistics in total.