I use the
glmer function with the Poisson family from
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,