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

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to