[R] how specify lme() with multiple within-subject factors?

Douglas Bates bates at stat.wisc.edu
Mon Jan 5 18:57:38 CET 2009


On Sun, Jan 4, 2009 at 5:28 PM, Bert Gunter <gunter.berton at gene.com> wrote:
> Folks:
>
>> Lme() is only able to work with nested random effects, not with crossed
>> random effects.
>
> Not quite true. Crossed models **can** be done, albeit clumsily, via
> pdMatrix objects: the Bates/Pinheiro book even contains an example or two
> (one on assay plates, I recall, but I don't have my book with me for the
> reference).

Clumsily indeed and very inefficiently.  I would not recommend using
lme or nlme to fit models with crossed random effects other than for
small toy examples.

> Also, lme, not lmer, is currently the only way to implement
> penalized splines as random effects -- see the lmeSplines package.

And this is relevant because ???

The original question was about the number of denominator degrees of
freedom and I will freely admit that lmer, in particular, does not
produce the "correct" denominator degrees of freedom. (As many people
discover to their chagrin, it doesn't provide denominator degrees of
freedom at all.)  In my opinion there isn't such a thing as the
"correct" denominator degrees of freedom except in small, perfectly
balanced, toy examples, which is why I am not that terribly concerned.




More information about the R-help mailing list