[R] Type II and III sums of squares with Error in AOV

Jarrett Byrnes redbeard at arrr.net
Tue Nov 8 21:26:38 CET 2005


I've recently run into the problem of using aov with nested factors, 
and wanting to get the type II and III sums of squares.  Normally Anova 
from the car package would do fine, but it doesn't like having an Error 
included, so

my.aov <-aov(Response ~ Treatment + Error(Treatment:Replicate))
Anova(my.aov, type="II")

yields

Error in Anova(nested.anova) : no applicable method for "Anova"

And lm does not take Error as an argument.

Error in eval(expr, envir, enclos) : couldn't find function "Error"

Is there a way to get these additional types of sums of squares when 
Error is included in an aov model?




More information about the R-help mailing list