Dear All, I use nlminb or optim for maximizing likelihood functions. Sometimes, the parameter values happen to be NA, then the program will hang there and iterate forever without stopping. No error message will be produced. So I can not use error catch method such as "try". Are there any suggestions how I can circumvent this problem? Maybe I can time a function, and if the time exceeds a threshold, it will be stopped. I am not sure if this is feasible in R. As a note, I am running simulations with thousands of replicates, so there needs to be a systematic way of doing this. Are there any suggestions on how to do this? Thank you very much!
Regards, Dajiang ______________________________________________ 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.