[R-sig-ME] Random Effect Variance of Zero
Ben Bolker
bbolker at gmail.com
Thu Mar 21 23:42:29 CET 2013
Kevin E. Thorpe <kevin.thorpe at ...> writes:
> I'm posting this for a colleague since I subscribe to this list. He fit
> a lme4::lmer model on a data set and got a variance of zero on the RE
> intercept. He fit what appears to be the same model with nlme::lme and
> obtained a non-zero value for the same terms.
>
> I re-ran on my system, since I just updated this week and here are my
> results. If requested, I will send the data off-list.
>
> Any idea why this happens or how to make it not happen?
We (lme4 developers) are aware of couple of examples of this
type of behaviour. Optimizers that allow for box constraints do
sometimes get stuck on the boundary even when they shouldn't ...
I don't know that I have a really good, detailed/principled
explanation of what happens in this situation.
https://github.com/lme4/lme4/issues/17
https://github.com/lme4/lme4/blob/master/tests/boundary.R
represent some of the examples we're aware of, contributed by
Manuel Koller, Stephane Laurent, and Vincent Dorie.
As far as we know the development version of lme4 doesn't have
any of these problems, and for LMMs (again as far as we know)
it is never worse than stable lme4 (alas, still not entirely
true for GLMMs). It would also allow you to swap nlminb in
for Nelder-Mead if you wanted.
It may not be the appropriate strategy, but rather than
putting the effort into fixing the stable version of lme4
we have been investing our effort in fixing the GLMM issues
in development lme4 (the code bases are sufficiently different
that it requires a separate effort to fix the stable
version ...)
Have you tried with development lme4?
I wouldn't mind seeing the data off-list.
> === lme4::lmer ===
>
> > lmer(zbmi ~ (1|DA) , data = ra.subset)
> Linear mixed model fit by REML ['lmerMod']
> Formula: zbmi ~ (1 | DA)
> Data: ra.subset
>
> REML criterion at convergence: 10474.66
>
> Random effects:
> Groups Name Variance Std.Dev.
> DA (Intercept) 0.000 0.000
> Residual 1.129 1.063
> Number of obs: 3538, groups: DA, 1603
>
> Fixed effects:
> Estimate Std. Error t value
> (Intercept) 0.15347 0.01787 8.591
> > sessionInfo()
> R version 2.15.3 Patched (2013-03-13 r62256)
> Platform: x86_64-unknown-linux-gnu (64-bit)
[snip]
> other attached packages:
> [1] lme4_0.999902345-0 Matrix_1.0-11 lattice_0.20-14
>
> === nlme::lme ===
>
> > lme(zbmi ~ 1 , data = ra.subset, random = ~ 1 | DA,na.action=na.omit)
> Linear mixed-effects model fit by REML
> Data: ra.subset
> Log-restricted-likelihood: -5236.905
> Fixed: zbmi ~ 1
> (Intercept)
> 0.1537825
>
> Random effects:
> Formula: ~1 | DA
> (Intercept) Residual
> StdDev: 0.1564781 1.051139
>
> Number of Observations: 3538
> Number of Groups: 1603
> > sessionInfo()
> R version 2.15.3 Patched (2013-03-13 r62256)
> Platform: x86_64-unknown-linux-gnu (64-bit)
>
[snip]
> other attached packages:
> [1] nlme_3.1-108
More information about the R-sig-mixed-models
mailing list