Re: [R] how calculation degrees freedom

From: Peter Dalgaard <>
Date: Sat 28 Jan 2006 - 11:33:46 EST

Douglas Bates <> writes:

> > I'm reasonably convinced by now that the relevant denominator is
> > always the residual variance, but it is happening via deep magic that
> > I don't quite understand... (and is quite counterintuitive to people
> > who are used to the traditional ANOVA decompositions in orthogonal
> > designs)
> Not deep magic for you, Peter. The slot called rXy in the fitted
> model is analogous to the first p components of the "effects"
> component in an lm model. Cut it up according to the terms and sum
> the squares.

Yes, that's the bit I do understand. The magic bit is that at that point, you have removed the effect of the Z, in a penalized fashion, and somehow this manages to give the right thing.  

Consider a balanced design with a number of observations for each subject, and subjects divided into groups, subject effects considered random. In traditional aov, you end up dividing the "group" SS by the "subject" SS. However in lmer, you remove the subject effect (in a BLUP sort of way) from everything and this gets the "group" SS adjusted so that it matches the residual SS instead. I'm quite prepared to believe it; I just don't think it is trivial.

   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
~~~~~~~~~~ - (                  FAX: (+45) 35327907

______________________________________________ mailing list
PLEASE do read the posting guide!
Received on Sat Jan 28 11:43:24 2006

This archive was generated by hypermail 2.1.8 : Sat 28 Jan 2006 - 14:13:57 EST