Skip to content
Prev 10731 / 20628 Next

Implausible estimate of random effects variance in lmer (lme4 devel version), sensible estimate in CRAN version

I ran some more tests that hopefully may help you to understand the
source of the divergence.

The model works fine in the devel version with only one random
parameter in each group. That is

m = lmer(rtr2 ~ 1 + (1 | kombiid) + (1 | turnid) + (1 | idnr), verbose = T, d1)
m = lmer(rtr2 ~ 0 + turnsec + (0 + turnsec | kombiid) + (0 + turnsec |
turnid) + (0 + turnsec | idnr), verbose = T, d1)

are giving the same sensible results as the CRAN version or the devel
version with "optimizer = "bobyqa".

I can replicate the general problem for models with more random
parameters in each group. That is

m = lmer(rtr2 ~ 0 + turnsec + turnsec_2 + (0 + turnsec + turnsec_2 |
kombiid) + (0 + turnsec + turnsec_2 | turnid) + (0 + turnsec +
turnsec_2 | idnr), verbose = 2, d1)

where turnsec_2 is turnsec^2 (i.e. a quadratic growth term over time)
gives an implausible large variance estimate for turnsec_2 in turnid.

m = lmer(rtr2 ~ poly(turnsec, 2) + (poly(turnsec, 2) | kombiid) +
(poly(turnsec, 2) | turnid) + (poly(turnsec, 2) | idnr), verbose = 2,
d1)

gives a sensible estimate of the variance of the random intercepts but
implausible large variance estimates for both poly(turnsec, 2)
parameters in turnid.


Also, I can replicate all errors when I use the same models on a
different but structurally equal data set (the ratings for the other
candidate of the televised debate).

Finally, I looked at the variances var(ranef(m)$turnid) for the models
fitted with the devel version. The variances are near the estimates of
the sensible results of the CRAN version. I know that these results
are not identical to the variance estimates given in summary(m), but I
guess they should be approx. equal? Or am I getting something wrong
here?

One last thing: I also removed the grouping factor "kombiid" from the
models, but that does not change the behavior described above.

Concerning Kevins advice to "adjust the settings  of nelder_mead": I
really don't understand how the optimizers work, so I am not sure
which setting should or should not be adjusted. If you give me some
more advice, I would happily try some settings.

Best regards
Marko





2013/9/20 Ben Bolker <bbolker at gmail.com>: