[R] type II and III Sum square whit empty cells

Mario Morales malfonso at telecom.com.co
Tue Apr 11 19:04:30 CEST 2006

Dear all

I need to run an anova from a factorial model


and calculate type II and III sums of square, but I have an empty
cells, so anova function from package car fail. (I believe)



b<-as.factor( c(rep(1,7),rep(2,4)) )

table(b,a) # cell (2,3) is empty

mod<-lm(y~ a+b+a:b)


Anova(mod,type="II")  # don't work

How can I calculate type II and III sum of square whit empty cell?

Thanks a lot

More information about the R-help mailing list