Sums of Squares in lm, aov and lmer in R
R calculates sequential or Type I SS when using lm, lmer and aov. See [http://tolstoy.newcastle.edu.au/R/help/05/04/2981.html here].
Type III SS may be obtained using [http://tolstoy.newcastle.edu.au/R/help/05/08/9560.html may be obtained] using terms of form fit <- anova(lm(y~x+z)) then anova(fit, ssType=3) for lm and Anova() for lmer.