[R] contrats hardcoded in aov()?
Prof Brian Ripley
ripley at stats.ox.ac.uk
Thu Jun 23 17:55:19 CEST 2005
On Thu, 23 Jun 2005, RenE J.V. Bertin wrote:
> On Thu, 23 Jun 2005 15:40:25 +0100 (BST), Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote regarding
> "Re: [R] contrats hardcoded in aov()?"
>
> Thanks to all the others who replied.
>
> 8-) and do note it is unset again a few lines later. (Listing a function
> 8-) inside R is not giving you the `source code'.)
>
> Indeed. Ahem. So Yuelin was right (even if his example didn't use
> an Error term). I was misled by the onexit statement, I suppose. Stupid.
The on.exit (sic) is needed in case you interrupt R at that point.
>
> 8-)
> 8-) If this is really the `source code' as you claim, why did you remove the
> 8-) very helpful comment?
>
> Trust me, I didn't, at least not on a purpose that I'm aware of. I did a fix(aov), and this is what I got. I did run an update of my installed packages last week (via the Mac GUI's R Package Installer interface). Maybe that stripped comments? I do not appear to unset something like keep.source in my startup files.
Let me say it again:
Listing a function inside R is not giving you the `source code'
You need to look in the *sources* to get the source code.
>
> 8-) 2) Some other things you can do with an aov fit do, and there you want an
> 8-) orthogonal parametrization if possible, both for ease of interpretation
> 8-) and numerical stability.
>
> In other words, you are advising against changing this setting, if
> I understand correctly?
If you are trying to do expert things with aov() you will know all this,
and if not perhaps you should read up some of the expert accounts. There
are things for which contr.helmert() is a good choice, and some for which
contr.treatment does not meet the traditional definition of `contrast'
used in this area and so will be misleading.
More information about the R-help
mailing list