[R] lme, lmer, convergence
Erin McMullen Jonaitis
jonaitis at wisc.edu
Tue Feb 7 20:36:23 CET 2012
Hello, all,
I am running some simulations to estimate power for a complicated epidemiological study, and am using lme and lmer to get these estimates. I have to run a few thousand iterations, and once in a great while, an iteration will create fake data such that the model won't converge. I see from Google searches that this is not an uncommon situation.
My question: is there a way to extract the convergence value from an lme or lmer model? It prints on the screen, but how can I get hold of it to evaluate it with some function? What I'd like to do is build a failsafe into my program so that if a particular model in an iteration doesn't converge, I call a redo on that iteration. This way the program will keep running and not stop in a fit of pique in the middle of my long simulation.
If I can't do this, my fallback will be to try setting lmeControl options such that even "bad" models return parameter estimates etc -- once or twice in 10,000 iterations should not ruin things too badly -- but I'd like to try it the cleaner way first.
Erin Jonaitis, Ph.D.
Assistant Scientist, Wisconsin Alzheimer's Institute
7818 Big Sky Drive
Madison, WI 53719
More information about the R-help
mailing list