Re: [R] degrees of freedom in lm() treatment contrasts

About this list Date view Thread view Subject view Author view Attachment view

From: Prof Brian Ripley (ripley@stats.ox.ac.uk)
Date: Wed 05 May 2004 - 03:23:15 EST


Message-id: <Pine.LNX.4.44.0405041817210.24775-100000@gannet.stats>

The thing is, it is *terms* that have degrees of freedom, and that does
not depend on the contrasts used except in rather exceptional
circumstances (when you set them with C() being one).

And the number of df assigned to a term depends on what went before, as
well as the data (since you can extrinsic aliasing). The only source that
is close to comprehensive is section 2.4 of the White Book (not an easy
read, though). Do read V&R section 6.2 first.

I teach my students via series of examples: the general principles seem
too hard for beginners.

On Tue, 4 May 2004, Martin Henry H. Stevens wrote:

> Does anyone have a good (and specific) reference for an explanation for
> the calculation of degrees of freedom in treatment contrasts? I checked
> the indexes of Venables and Ripley 2002, Crawley 2002, and Neter et al.
> (Applied Linear Statistical Models, 4th ed.), as well as the lm code. I
> would happily accept a "verbal" email explanation as well.
> Many thanks,
> Hank Stevens

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

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


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Mon 31 May 2004 - 23:05:07 EST