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

Thierry Onkelinx thierry.onkelinx at inbo.be
Fri Aug 11 14:38:41 CEST 2017


Dear Joshua,

Crossed random effects are difficult to specify in nlme. I think that you
have to use pdBlocked() in the specification.

When I need correlation I often use INLA (r-inla.org). It allows for
correlated random effects. Crossed random effects are no problem.

Best regards,

ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and
Forest
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
Kliniekstraat 25
1070 Anderlecht
Belgium

To call in the statistician after the experiment is done may be no more
than asking him to perform a post-mortem examination: he may be able to say
what the experiment died of. ~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data. ~ Roger Brinner
The combination of some data and an aching desire for an answer does not
ensure that a reasonable answer can be extracted from a given body of data.
~ John Tukey

2017-08-10 23:05 GMT+02:00 Joshua Rosenberg <jmichaelrosenberg op gmail.com>:

> 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
> here:
> https://bookdown.org/jmichaelrosenberg/comparing_crossed_effects_models/
>
>
> library(lme4)
> library(nlme)
>
> m_lme4 <- lmer(diameter ~ 1 + (1 | plate) + (1 | sample), data =
> Penicillin)
> m_lme4
>
> m_nlme <- lme(diameter ~ 1, random = list(plate = ~ 1, sample = ~ 1), data
> = Penicillin)
> m_nlme
>
>
> ​Thank you for considering this question,
> Josh​
>
> --
> Joshua Rosenberg, Ph.D. Candidate
> Educational Psychology
> ​&​
>  Educational Technology
> Michigan State University
> http://jmichaelrosenberg.com
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-models op r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models

	[[alternative HTML version deleted]]



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