I am doing a simulation study for sample size calculation for multilevel modeling. I am using R for both simulation and estimation . As posted in this post , confint function was not working and that was due to model mis-specification . As, I have one independent variable (X) at individual level and one independent variable (Z) at group level and since the simulation study assumes a zero correlation between the intercept deviations and X effect deviations across grouping factors , the model need to be specified as :
fit <- lmer(Y~X+Z+X:Z+(X||group),data=sim_data)
Now the confint.merMod function works . But another problem arises . I am checking the effect of sample size for various combination of parameters . But for small group size , I found warning message more than 50 (though it produces a result also) . Some of those are :
Warning messages:
1: In optwrap(optimizer, par = thopt, fn = mkdevfun(rho, ... :
convergence code 3 from bobyqa: bobyqa -- a trust region step failed to reduce q
4: In zeta(shiftpar, start = opt[seqpar1][-w]) :
slightly lower deviances (diff=-1.42109e-14) detected
5: In nextpar(mat, cc, i, delta, lowcut, upcut) :
Last two rows have identical or NA .zeta values: using minstep
7: In zetafun(np, ns) : slightly lower deviances (diff=-1.42109e-14) detected
8: In FUN(X[[i]], ...) : non-monotonic profile
24: In nextpar(mat, cc, i, delta, lowcut, upcut) :
unexpected decrease in profile: using minstep
25: In profile.merMod(object, which = parm, signames = oldNames, ... :
non-monotonic profile for (Intercept)
But there are no warning message , if I increase the number of group size .
In this case , should I worry of the warnings ?