On 2007-11-22, Peter Alspach <[EMAIL PROTECTED]> wrote:
> Tyler 
>
> For balanced data like this you might find aov() gives an output which
> is more comparable to Sokal and Rohlf (which I don't have):
>
>> trtCont <- C(sugars$treatment, matrix(c(-4,1,1,1,1, 0,-1,3,-1,-1), 5,
> 2))
>> sugarsAov <- aov(length ~ trtCont, sugars)
>> summary(sugarsAov, split=list(trtCont=list('control vs rest'=1, 'gf vs
> others'=2)))

>> model.tables(sugarsAov, type='mean', se=T)

Thank you Peter, that's a big help! To confirm that I understand
correctly, aov is identical to lm, but provides better summary
information for balanced anova designs. As such, it is preferred to lm
for balanced anova designs, but should be avoided otherwise. Is that
correct?

Also, it appears that C and contrasts serve pretty much the same
purpose. Is there a context in which one is preferable to the other? 

Cheers,

Tyler

______________________________________________
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.

Reply via email to