Help! What are the typical diagnosis that one can do when facing "fail to converge"?
On Thu, May 10, 2012 at 9:10 AM, Ben Bolker <bbolker at gmail.com> wrote:
arun <smartpink111 at ...> writes:
I also had a similar warning message but with lmer ( (Warning message:In mer_finalize(ans) : false convergence (8)).? I used verbose=TRUE in the model statement.? It will print each iteration estimates.? I also tried to increase the iterations, but it didn't work.? Then, I found this blog (http://davidhughjones.blogspot.com/2009/11/lme-false-convergence.html). It says to look for betas with estimates very low and divide that variable by 10 or 100.? This was the only solution that worked for me.? But, the estimates of beta for the variable and its interactions will be 10 fold higher than expected.
?A more generic piece of advice would be to scale and center
all continuous predictor variables ... it won't always
help, but it's easy to try.
orig_data <- data.frame(V1=factor(1:5),V2=1:5,V3=(1:5)*0.001,V4=LETTERS[1:5])
scaled_data <- as.data.frame(lapply(orig_data,
? ? ? ? ? ? ? ? ? function(x) {
? ? ? ? ? ? ? ? ? ? ? ?if (class(x) %in% c("integer","numeric")) {
? ? ? ? ? ? ? ? ? ? ? ? ? ? ?scale(x) } else x
? ? ? ? ? ? ? ? ? ?}))
In doing this, the scaling and centering factors seem to get lost,
so it's not a perfect solution.
A full-fledged auto-scaling solution *might* be built into some
future version of lme4 ...
if so FYI is.numeric tests the mode and the mode of both integer and
numeric classes is numeric so you can simplify slightly to:
if (is.numeric(x)) {
scale(x)
} else x
_______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
Joshua Wiley Ph.D. Student, Health Psychology Programmer Analyst II, Statistical Consulting Group University of California, Los Angeles https://joshuawiley.com/