[R] Looping until a solution is found
jpoulsen at zoo.ufl.edu
Sat May 30 15:08:34 CEST 2009
I am using maximum likelihood to find the best parameters for a model.
This involves sometimes tweaking the starting values to find a solution
I would like to automate the process so that when the optimizer runs
into an error it tweaks one of the parameters slightly, tries the fit
again, and then continues this until a solution if found.
I have been using try() to test if a fit will work (see below), but how
do I run a loop that says continue until class(m1) is not "try error"?
This seems like it should be easy... but I am stymied. Thanks for your help
More information about the R-help