In some trial simulation work I need to create batch files that will repeatedly generate pseudoreplicate datasets and then create non- linear mixed effects models using nlme. Inevitably these models sometimes fail to converge but I need the batch file to simply move on to another simulation rather than abort. I am using the try() function as in
model<-try((nlme(...))) which handles reported errors such as the "Step halving in PNLS step" error well. On rare runs however the nlme function hangs without an error message. Aborting the script prompts a notification of multiple warnings and warnings() gives multiple recurrences of "Singular precision matrix in level -1, block 1". I understand why these occur but would like to trap these events too and simply move on to the next simulation. The try() function doesn't work presumably as no actual error message is reported during the run. Is there a way to test for this condition? Thanks Rob Forsyth ______________________________________________ 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.