If you are using the R package lme4, and get error messages about "false convergence", then use the option verbose=TRUE in your call to lmer, and examine the output, which shows how the estimates of your betas change as the estimation proceeds. If you see any values for your betas are rather small, then divide that variable by 10 or 100 or 1000. This seems to help lmer to converge correctly.
Thanks David! I was scouring the many R listservs for a solution to this issue, and this was the only one that worked.
ReplyDeleteThis should probably be mentioned in the lme4 help. If anyone is still following up here, why exactly does this work so well? I mean is there a logical/numerical/statistical reason that I'm not grasping?
ReplyDeleteFor now it's a mystery to me but it sure does work wonders. I've literally spent days both recently and in the past worrying about overfitting and whatnot, never being able to pinpoint the problem, and all along the solution was this simple.
So thank you Dr. Hugh-Jones!
I think the reason is that the numerical algorithm doesn't cope well if numbers get very large/small.
ReplyDeleteThanks for that tip, it was really helpful and worked wonders for me too. Attempted to fit quadratic and cubic terms for age and encountered the same problem. I was including them using poly() but it was making the model coefficients difficult to interpret.
ReplyDeleteThanks for this tip! It worked for me too, with the added bonus that it makes sense to me!
ReplyDeleteI had already spent quite a while with the same problem on lme and this trick worked :)...saved my day and my weekend, many thanks!
ReplyDeleteWill this solution work for lmer with binomial data with a yes/no response? If so, I don't see how I can just divide the variable by 10, 100, etc. Please help.
ReplyDeleteAlmost surely your dependent variable will not be the problem - it will be one of your indep vars that is causing the problem.
ReplyDeleteOh, I apologize. Let me clarify. The independent variables are categorical factors (treatment, sex, breeding condition). How can I correct for this problem? Thanks!
ReplyDeleteHmm, well in that case I wonder if this is the right problem. But it might be; if so, then I guess you need to create appropriate dummy variables and multiply or divide by some amount. Awkward but it should still work.
ReplyDelete