0

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 ?

Community
  • 1
  • 1
user81411
  • 437
  • 1
  • 7
  • 13
  • if you're doing a simulation study, and you therefore know the true answers, can't you check whether the cases where you get warning messages are indeed problematic? I'm a litlte surprised you get the `zetafun` warnings since `profile.merMod` has a `devtol` parameter that is 1e-09 by default ... – Ben Bolker Jul 30 '15 at 20:33
  • @BenBolker I am using profile Confidence Interval and the paper using Confidence Interval based on Asymptotic Standard Normal . So I thought there would be some difference between result , but don't know how much the difference would be acceptable ? How can I check the cases for which warning messages occur ?As all cases are producing in a similar manner , what step will I take when I detect the cases ? – user81411 Jul 31 '15 at 04:09

0 Answers0