Two way ANOVA Flashcards
Two way Anova overview
Two-way ANOVA used when there are multiple explanatory variables -> factorial design
Tests for main effects and interactions
y= u(constant) + A + B + A*B
Graphs:
Interaction -> non-parallel + non-linear relationships of lines
NO interaction -> parallel lines
Assumptions
Assumptions same for all general linear models:
1. the measurements in every group represent a random sample from the corresponding population
2. the variable is normally distributed in each of our groups (eg. for all combos of explanatory variables)
3. the variance is the same in all our groups
Null hypothesis
1) no difference between in response variable between treatments of A (main effect A)
2) no difference in response variable between treatments of B (main effect B)
3) no interaction between the 2 – the effect of A on y does not depend on B (Interaction)
-> remember always check if this is significant first -> if it is can’t conclude on the main effects
Blocking variables are NOT considered factors – they are only included to improve detection of treatment effects
Calculation overview
1) Total sums of squares (same as one way)
2) Sums of squares for the groups
The sum of: the number of groups x number in each group (means of the group - grand mean)^2
3) sums of squares of interaction
4) df
r-1
c-1
(r-1)(c-1)
Total number of obervations -1 (nfactor A x nfactor B x repeats - 1)
5) MSS (divide my df)
6) F ratio each value/ SST
7) P value -> look in table
8) R^2 -> calculate for main effects and interaction seperately
9) same applies for planned coparison (T test) and unplanned)d. d
Notations
Alternative:
response = constant x factor A x Factor B x A*B
Null:
response = constant
response = constant x factor A
response = constant x Factor B
response = constant x A*B
Constant is grand mean for anova and intercept for regression.