[R-sig-ME] Comparing variance components of crossed effects models fit with lme4 and nlme

Joshua Rosenberg jmichaelrosenberg at gmail.com
Thu Aug 10 23:05:27 CEST 2017

Hi all,

I'm trying to fit models with a) crossed random effects and b) a specific
residual structure (auto-correlation). Based on my understanding of what
nlme and lme4 do well, I would normally turn to lme4 to fit a model with
crossed random effects, but because I'm trying to structure the residuals,
I am trying nlme.

In trying to fit and compare the same variance components (no fixed
effects) model using lme4 and nlme, I found the output is similar but a bit
different. Specifically, the standard deviations of the random effects and
the log-likelihood statistics are different. Would you expect the output to
be a bit different?

The models I fit to compare the output are here, though the output is also


m_lme4 <- lmer(diameter ~ 1 + (1 | plate) + (1 | sample), data = Penicillin)

m_nlme <- lme(diameter ~ 1, random = list(plate = ~ 1, sample = ~ 1), data
= Penicillin)

​Thank you for considering this question,

Joshua Rosenberg, Ph.D. Candidate
Educational Psychology
 Educational Technology
Michigan State University

	[[alternative HTML version deleted]]

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