[R] help with aov

2004-03-18 Thread Martin Olivier
Hi all, Suppose the following data and the simple model y<-1:12+rnorm(12) fac1<-c(rep("A",4),rep("B",4),rep("C",4)) fac2<-rep(c("D","C"),6) dat<-data.frame(y,fac1,fac2) tmp<-aov(y~fac1+fac2,dat) the command tmp$coeff gives the fllowing results : (Intercept) fac1B fac1C fac2D 3.3

Re: [R] help with aov

2004-03-18 Thread Prof Brian Ripley
This is nothing to do with aov: if you want to look at coefficients you may as well use lm(). The idea of aov is to look at factors as a whole. You do need to understand codings: looks like you want to specify contr.sum contrasts. The best place to read about this is chapter 6 of MASS. On T