1. Type I ANOVA
1.1 Definition of Type I ANOVA
SS(A) for factor A
SS(B | A) for factor B
SS(AB | A, B) for interaction AB
SS(A)
is SS attributable to A, even including those that could also have been attributed to other factors like B or A*B. Thus, SS(A)
is equal to the model of only putting A as the single predictor.
SS(B | A) = SS (A, B) – SS(A)
SS(AB|A,B) = SS (AB, A, B) – SS(A, B)
1.2 When and how to use Type I ANOVA
- Type I ANOVA considers the order effect of A and B. If your theory is focusing on the effect of A, you should put A into the model first. That is, if your theory is all about factor A, and factor B is just one you want to control its impact, you can use Type I ANOVA.
- For Type I ANOVA, if you sum up all different parts of Sum of Squares (SS), it will be equal to SST, see below. See my posts in R showing this with examples.
SSA + SSB | A +SSAB | A, B + SSE = SST
1.3 Example of using Type I ANOVA
You would like to see how city
impacts sales
. Thus, city
is the focal variable. However, you would like to also control for the impact of different stores (i.e., variable of store
). Thus, SS(B | A)
= SS(store | city)
.
You can decide whether you want to add the interaction item of AB. If you do not have any theory about potential interaction, you do not have to add it. But, you can still add it as an exploratory test, even if you do not predict anything in advance. If the interaction is not significant, you can just remove it and keep the first two components.
2. Type II ANOVA
2.1 Definition
SS(A | B) for factor A
SS(B | A) for factor B
SS(AB | A, B) for interaction AB
SS(A|B) = SS (A, B) – SS(B)
SS(B|A) = SS (A, B) – SS(A)
SS(AB|A,B) = SS (AB, A, B) – SS(A, B).
2.2 When and how to use Type II ANOVA
- Type II ANOVA does not consider the relative priority of A and B, as it controls one when calculating another one. Thus, when you have two equally important factors A and B (i.e., you do not prioritize either A or B), you can consider Type II ANOVA.
- Do you need to include the interaction AB in the model for Type II ANOVA? There are two possible scenarios.
- (a) One is when AB is not significant, then the question is whether you still keep it. Typically, you do not have to, unless you have a good reason to do so.
- (b) Another scenario is when AB is significant, and you probably keep it in the model. The question is whether you should use Type II or Type III ANOVA. In my humble opinion, you should use Type III ANOVA instead. This is due to the fact that, when calculating
SS(A|B)
andSS(B|A)
, Type II ANOVA does not control the interaction effect, namely, A*B . Thus, if the interaction effect AB is significant, Type II ANOVA might not be appropriate to use. Again, in my opinion, you should use Type III ANOVA if interaction AB is significant.
- For Type II ANOVA, typically,
SSA | B + SSB | A +SSAB | A, B + SSE ≠ SST
. For more discussion, refer to my other tutorial.
2.3 Example of using Type II ANOVA
We can still use the example of how two IVs, namely city
and store
impact DV sales
. However, when using Type II ANOVA, you should have equal interests in the impact of city
and store
.
That is, when using Type II ANOVA, you do not particularly prioritize either one of the IVs.
Regarding the interaction of AB, if the interaction is significant, you need to consider using Type III ANOVA. If the interaction is not significant, you do not really need to keep it in Type II ANOVA.
3. Type III ANOVA
3.1 Definition
SS(A | B, AB) for factor A
SS(B | A, AB) for factor B
SS(AB | A, B) for interaction AB
SS(A|B,AB) = SS (AB, A, B) – SS(AB, B)
SS(B|A,AB)= SS (AB, A, B) – SS(AB, A)
SS(AB|A,B)= SS (AB, A, B) – SS(A, B)
3.2 When and how to use Type III ANOVA
It would be used when the interaction effect is significant. Type III ANOVA adds AB into all the SS, and thus it makes sense to use Type III ANOVA when the interaction is significant. When it is not, you probably need to use Type I or Type III ANOVA.
3.3 Example of using Type III ANOVA
We can still use the example of how IVs, namely city
and store
, impact DV of sales
. If the interaction of city
and store
is significant, you need to consider using Type III ANOVA.
Reference
- How to interpret type I, type II, and type III ANOVA and MANOVA?
- TYPE I vs. TYPE III Sum of Squares
- Anova – Type I/II/III SS explained