[R-sig-ME] lme vs. lmer

Douglas Bates bates at stat.wisc.edu
Tue Sep 29 20:32:16 CEST 2009


On Tue, Sep 29, 2009 at 1:02 PM, Ben Bolker <bolker at ufl.edu> wrote:

> Christopher David Desjardins wrote:
>> I've started working through Pinheiro & Bates, 2000 and noticed the use
>> of lme from the nlme package. I am curious if lmer from lme4 has
>> superseded lme or if lme still holds its own? The reason I ask is that I
>> have taken a few classes where we've solely used lmer and just read
>> about lme today. If both functions are on equal footing, can the
>> p-values from lme be trusted?
>> Thanks!
>> Chris

>  You should read the extended discussion of p-values, degrees of
> freedom, etc. that is on the R wiki (I think) and referenced from the R
> FAQ.  At least in my opinion, (n)lme is still fine (and indeed necessary
> at this stage for fitting heteroscedastic and correlated models).  The
> df/p-value estimates, however, are "use at your own risk" -- you'll have
> to read the literature and decide for yourself.

>  I still think there's room for someone to implement (at least)
> Satterthwaite and (possibly) Kenward-Roger corrections, at least for the
> sake of comparison, but I'm not volunteering.

You may need to define them first.  Many of the formulas in the mixed
models literature assume a hierarchical structure in the random
effects - certainly we used such a formula for calculating the
denominator degrees of freedom in the nlme package. But lme4 allows
for fully or partially crossed random effects so you can't think in
terms of "levels" of random effects.

Referring to the "Satterthwaite and Kenward-Roger corrections" gives
the impression that these are well-known formulas and implementing
them would be a simple matter of writing a few lines of code.  I don't
think it is.  I would be very pleased to incorporate such code if it
could be written but, as I said, I don't even know if such things are
defined in the general case, let alone easy to calculate.

I am not trying to be argumentative (although of late I seem to have
succeeded in being that).  I'm just saying that I don't think this is
trivial. (It I wanted to be argumentative I would say that it is
difficult and, for the most part, irrelevant. :-)




More information about the R-sig-mixed-models mailing list