[R-sig-ME] convergence issues on lme4 and incoherent error messages

Cesko Voeten c@c@voeten @end|ng |rom hum@|e|denun|v@n|
Tue Jun 11 19:07:16 CEST 2019


Hi Cristiano,

With respect to your final point: lmer() does not currently support removing correlations between different levels of the same factor. A workaround is to convert your factor to a set of numeric columns, and then use the double-bar syntax ('(factor1+factor2+etc||grouping)'). The conversion from factor to numeric can be done automatically by function lmer_alt() from package afex, so that lmer_alt(y ~ factor + (factor||grouping)) would suffice.

Another option could be to try fitting your model in glmmTMB and use the 'diag(factor|grouping)' syntax.

HTH,
Cesko

Op 11-06-2019 om 16:38 schreef Cristiano Alessandro:
> Hi all,
> 
> I am having trouble fitting a mixed effect model. I keep getting the
> following warning, independently on the optimizer that I use (I tried
> almost all of them):
> 
> Warning messages:
> 1: 'rBind' is deprecated.
>   Since R version 3.2.0, base's rbind() should work fine with S4 objects
> 2: In optimx.check(par, optcfg$ufn, optcfg$ugr, optcfg$uhess, lower,  :
>    Parameters or bounds appear to have different scalings.
>    This can cause poor performance in optimization.
>    It is important for derivative free methods like BOBYQA, UOBYQA, NEWUOA.
> 3: Model failed to converge with 5 negative eigenvalues: -2.5e-01 -5.8e-01
> -8.2e+01 -9.5e+02 -1.8e+03
> 
> This suggests that the optimization did not converge. On the other hand, if
> I call summary() of the "fitted" model, I receive (among the other things)
> a convergence code = 0, which according to the documentation means that the
> optimization has indeed converged. Did the optimization converged or not?
> 
> convergence code: 0
> Parameters or bounds appear to have different scalings.
>    This can cause poor performance in optimization.
>    It is important for derivative free methods like BOBYQA, UOBYQA, NEWUOA.
> 
> Note that I used 'optimx' ("L-BFGS-B") for this specific run of the
> optimization. I also get other weird stuff that I do not understand:
> negative entries in the var-cov matrix, which I could not get rid of even
> if I simplify the model a lot (see
> https://stats.stackexchange.com/questions/408504/variance-covariance-matrix-with-negative-entries-on-mixed-model-fit
> , with data). I thought of further simplify the var-cov matrix making it
> diagonal, but I am still struggling on how to do that in lme4 (see
> https://stats.stackexchange.com/questions/412345/diagonal-var-cov-matrix-for-random-slope-in-lme4
> ).
> 
> Any help is highly appreciated. Thanks!
> 
> Cristiano
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-mixed-models using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>



More information about the R-sig-mixed-models mailing list