"RenE J.V. Bertin" <[EMAIL PROTECTED]> writes:

> Hello,
> 
> I was just having a look at the aov function source code, and see that when 
> the model used does not have an Error term, Helmert contrasts are imposed:
> 
>     if (is.null(indError)) {
> ... 
>    }
>     else {
>         opcons <- options("contrasts")
>         options(contrasts = c("contr.helmert", "contr.poly"))
>         on.exit(options(opcons))
> ...
> 
> 
> My reading of several contributed user guides' sections on ANOVA is
> that Helmert contrasts are not intuitive at all and best avoided by
> non-expert users. This explains why I didn't see any influence of
> the various contrast settings on my results, and I wonder why this
> local shadowing of global settings is done?

I believe the reason is that you get in trouble further down the line
if the contrast matrices do not sum to zero over rows, which basically
implies contr.helmert or contr.sum. 

There is some disagreement over whether this is a natural requirement
for contrast matrices (Brian and I have discussed this previously, on
this list I believe), but this is technical: the code assumes it and
gives wrong results if it isn't true.

-- 
   O__  ---- Peter Dalgaard             Ă˜ster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph: (+45) 35327918
~~~~~~~~~~ - ([EMAIL PROTECTED])                  FAX: (+45) 35327907

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to