[R] nls error control

Wiener, Matthew matthew_wiener at merck.com
Wed Apr 17 21:28:13 CEST 2002


Check the "try" command.

Hope this helps,

Matt

-----Original Message-----
From: Timothy R. Johnson [mailto:trjohns at uidaho.edu]
Sent: Wednesday, April 17, 2002 2:54 PM
To: r-help at stat.math.ethz.ch
Subject: [R] nls error control


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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
_._


------------------------------------------------------------------------------
Notice:  This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (Whitehouse Station, New Jersey, USA) that may be confidential, proprietary copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message.  If you are not the intended recipient, and have received this message in error, please immediately return this by e-mail and then delete it.

==============================================================================

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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