Re: [R] contrats hardcoded in aov()?

From: Douglas Bates <dmbates_at_gmail.com>
Date: Thu 23 Jun 2005 - 23:32:41 EST

On 6/23/05, RenE J.V. Bertin <rjvbertin@gmail.com> wrote:
> 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?

An aov model is intended to produce just the analysis of variance table for which the choice of contrasts is irrelevant. If you do want to examine individual coefficients then fit the model using lm().



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 Received on Thu Jun 23 23:35:43 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:58 EST