[R-sig-ME] lme4 versus nlme
HDoran at air.org
Thu Mar 13 20:02:18 CET 2008
lmer is a bit more general, and a heck of a lot faster. The nlme
function is designed for cases where there is a strict nesting structure
to the data. You can code for situations in which there are crossed
random effects, but it is clunky and slooooooow. lmer, on the other
hand, is specifically optimized for fully crossed or partially crossed
data and is very fast. It also works for data that are strictly nested.
There are some vignettes in the lme4 package that you can read to see
examples of how to use the lmer function. There are also some nifty
functions that go along with lmer that do not exists for nlme like
> -----Original Message-----
> From: r-sig-mixed-models-bounces at r-project.org
> [mailto:r-sig-mixed-models-bounces at r-project.org] On Behalf
> Of Kevin E. Thorpe
> Sent: Thursday, March 13, 2008 1:54 PM
> To: r-sig-mixed-models at r-project.org
> Subject: [R-sig-ME] lme4 versus nlme
> I'm a bit confused.
> I have started reading Pinheiro and Bates, which is
> excellent. I am trying to rationalize when one would use
> lmer() and when one would use
> lme() (I know lmer() is not covered in the book).
> I have read a number of the treads about why p-values have
> been taken out of lmer() stuff. Naturally, they still exist
> in nlme. Presumably, I should not trust those p-values either.
> The problem still remains that I am encountered more and more
> situations where it seems I need a mixed model. The
> investigator wants to know if the groups differ. What is the
> recommended approach to answering those kinds of questions?
> Thank you,
> Kevin E. Thorpe
> Biostatistician/Trialist, Knowledge Translation Program
> Assistant Professor, Department of Public Health Sciences
> Faculty of Medicine, University of Toronto
> email: kevin.thorpe at utoronto.ca Tel: 416.864.5776 Fax: 416.864.6057
> R-sig-mixed-models at r-project.org mailing list
More information about the R-sig-mixed-models