[R] nls error control

Timothy R. Johnson trjohns at uidaho.edu
Wed Apr 17 20:53:42 CEST 2002


I'm running a simulation that uses nls on each run. Sometimes, not
unexpectedly, nls doesn't return parameter estimates (e.g., "singular
gradient" error). Of course when this happens the simulation (in a loop)
stops and no results are recorded. What I would like is for the simulation
to simply record that nls couldn't obtain estimates on a particular run due
to whatever difficulties it encountered but to not return an error that
stops the entire simulation.

Has anyone worked-out a tweak to do this? I'm using version 1.4.1 under
Linux.

Best regards,

Tim Johnson

---------------------------------
Assistant Professor of Statistics
University of Idaho
Moscow, Idaho 83844-1104
trjohns at uidaho.edu
http://www.uidaho.edu/~trjohns


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list