Re: [R] Type II and III sum of square in Anova (R, car package)

From: Mark Lyman <mark.lyman_at_gmail.com>
Date: Sun 27 Aug 2006 - 15:50:40 EST

> 1. First of all, more general question. Standard anova() function for lm()
> or aov() models in R implements Type I sum of squares (sequential), which
> is not well suited for unbalanced ANOVA. Therefore it is better to use
> Anova() function from car package, which was programmed by John Fox to use
> Type II and Type III sum of squares. Did I get the point?
>
> 2. Now more specific question. Type II sum of squares is not well suited
> for unbalanced ANOVA designs too (as stated in STATISTICA help), therefore
> the general rule of thumb is to use Anova() function using Type II SS
> only for balanced ANOVA and Anova() function using Type III SS for
> unbalanced ANOVA? Is this correct interpretation?
>
> 3. I have found a post from John Fox in which he wrote that Type III SS
> could be misleading in case someone use some contrasts. What is this about?
> Could you please advice, when it is appropriate to use Type II and when
> Type III SS? I do not use contrasts for comparisons, just general ANOVA
> with subsequent Tukey post-hoc comparisons.
 

There are many threads on this list that discuss this issue. Not being a great statistician myself, I would suggest you read through some of these as a start. As I understand, the best philosophy with regards to types of sums of squares is to use the type that tests the hypothesis you want. They were developed as a convenience to test many of the hypotheses a person might want "automatically," and put it into a nice, neat little table. However, with an interactive system like R it is usually even easier to test a full model vs. a reduced model. That is if I want to test the significance of an interaction, I would use anova(lm.fit2, lm.fit1) where lm.fit2 contains the interaction and lm.fit2 does not. The anova function will return the appropriate F-test. The danger with worrying about what type of sums of squares to use is that often we do not think about what hypotheses we are testing and if those hypotheses make sense in our situation.

Mark Lyman



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Sun Aug 27 15:59:41 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sun 27 Aug 2006 - 18:22:47 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.