[R-sig-ME] same model runs in nlme but not lme4
Simon Harmel
@|m@h@rme| @end|ng |rom gm@||@com
Sat May 23 00:35:56 CEST 2020
Many thanks, Ben. Just curious, what information do the plots at the end of
your exactly convey?
I also appreciate it if there if you could point me to a documentation in
lme4 where I can learn more about `profile()` and its output.
Many thanks, Simon
On Fri, May 22, 2020 at 5:25 PM Ben Bolker <bbolker using gmail.com> wrote:
> Because lme4 is fussier than lme. lme will fit models where the
> variance components are jointly unidentifiable; lmer tries to detect
> these problems and complains about them. It's possible that this is a
> false positive. You can make it run by specifying
>
> m1 <- lmer(y~ group*year + (year|stid), data = dat,
> control=lmerControl(check.nobs.vs.nRE="ignore"))
>
> but I strongly recommend that you think about whether this might be
> exposing problems.
>
> calculating the profile suggests a little bit of weirdness.
>
> pp <- profile(m1,signames=FALSE)
>
> dd <- as.data.frame(pp)
>
> library(ggplot2)
> ggplot(dd,aes(.focal,.zeta)) + geom_point() + geom_line() +
> facet_wrap(~.par,scale="free_x")
>
> You can compare confint(pp) to intervals(m2); they're mostly consistent,
> but some caution is suggested for the CIs on the correlation and the year
> SD
>
>
> On 5/22/20 5:57 PM, Simon Harmel wrote:
> > Hi All,
> >
> > I was wondering why my model runs ok when I use `nlme` package but it
> fails
> > when I use the `lme4` package, am I missing something?
> >
> > Thanks, Simon
> >
> > #===================================
> > library(lme4)
> > library(nlme)
> >
> > dat <- read.csv('https://raw.githubusercontent.com/hkil/m/master/z.csv')
> >
> > m1 <- lmer(y~ group*year + (year|stid), data = dat) ## Fails ###
> >
> > m2 <- lme(y~ group*year, random = ~year|stid, data = dat) ## Runs ###
> >
> > [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > R-sig-mixed-models using r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
> _______________________________________________
> R-sig-mixed-models using 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