Hi all, I have been trying to calculate Type III SS in R for an unbalanced two-way anova. However, the Type III SS are lower for the first factor compared to type I but higher for the second factor (see below). I have the impression that Type III are always lower than Type I - is that right?
And a clarification about how to fit Type III SS. Fitting model<-aov(y~a*b) in the base package and then loading car / changing contrasts / running Anova(model,type=c("III")) gives different results compared to loading car / changing contrasts / fitting model<-aov(y~a*b) / running Anova(model,type=c("III")). However summary(model) gives the same results in both cases. Is this how it is set up? > local({pkg <- select.list(sort(.packages(all.available = TRUE))) + if(nchar(pkg)) library(pkg, character.only=TRUE)}) > options(contrasts=c("contr.helmert","contr.poly")) > model2<-aov(tdrate~temp*sex) > summary(model2) Df Sum Sq Mean Sq F value Pr(>F) temp 3 0.110137 0.036712 1005.6947 < 2e-16 *** sex 1 0.000141 0.000141 3.8593 0.05095 . temp:sex 3 0.000154 0.000051 1.4073 0.24206 Residuals 187 0.006826 0.000037 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > Anova(model2,type=c"III") Error: unexpected string constant in "Anova(model2,type=c"III"" > Anova(model2,type=c("III")) Anova Table (Type III tests) Response: tdrate Sum Sq Df F value Pr(>F) (Intercept) 0.57549 1 15764.9249 < 2e-16 *** temp 0.08571 3 782.6314 < 2e-16 *** sex 0.00023 1 6.2851 0.01303 * temp:sex 0.00015 3 1.4073 0.24206 Residuals 0.00683 187 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 -- Menelaos Stavrinides Ph.D. Candidate Environmental Science, Policy and Management 137 Mulford Hall MC #3114 University of California Berkeley, CA 94720-3114 USA Tel: 510 717 5249 [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org 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.