I use the glmer function with the Poisson family from lme4. My simulated data are constituted of 3600 individuals, and a variable A with 30 levels and a second variable B with 2 levels. I have simulated random effects for the 2 variables from Normal distribution whose standards deviation are equal to 0.5 (far from zero!).

In the model, the random effets are of the form: (0 + B | A ) + (1| A )

(The complete model is of the form: event ~ -1 + cov1 : factor(B) + cov2 + offset(log(time))+ (0 + B | A ) + (1| A ) . cov1 is categorical variable. cov2 is a binary covariate. Both are fixed effects)

Despite this, the model estimates the second random coefficient at zero in 70% of the simulations, which for me is a failure.

Does anyone have any advice to prevent the model from estimating the random coefficients at zero, maybe by changing the parameters of the Control? I don't want to simplify the model, I need it to be in the above formulation. I tried the two optimizers (Nelder-Mead and bobyqa); there was no change in the proportion of failures.

Thanks a lot for any help,

  • $\begingroup$ I think you will need to provide more details, ideally your simulation code. $\endgroup$ – Robert Long Jul 8 at 15:07
  • $\begingroup$ @RobertLong I can provide it with pleasure but it is very long... $\endgroup$ – Flora Grappelli Jul 8 at 15:20
  • $\begingroup$ Perhaps you can simplify it to demonstrate the problem ? $\endgroup$ – Robert Long Jul 8 at 15:40
  • $\begingroup$ @RobertLong Everything is now available $\endgroup$ – Flora Grappelli Jul 8 at 15:53
  • $\begingroup$ Why aren't the individuals represented in the random effects structure? Reading the question. A and B sound like fixed effects. $\endgroup$ – JTH Jul 9 at 16:05

I found very useful advices in the Ben Bolker document: https://bbolker.github.io/mixedmodels-misc/glmmFAQ.html#singular-models-random-effect-variances-estimated-as-zero-or-correlations-estimated-as---1

In particular, the advice to use the "blme" package was a great help to me. This solved all my problems with the random coefficient estimated at zero. Note that this package is very easy to use when you are used to lme4.

| cite | improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.