[R] Problems with Optimization
Tobias
tobias_elbert at hotmail.com
Thu Dec 21 07:06:28 CET 2006
Dear R-helpers,
I am having following problem:
Let P be an observed quantity, F(...) a function describing P, and e = P -
F(...) the error.
F(...) is essentially a truncated mean whose value is obtained via
integrating from some value X to inf over a probability density with six
parameters. That's what usually causes the problem: for certain parameter
values, the integral goes very quickly to infinity which the optimization
algorithm can't handle. At least nlm() and some of the optim() algorithms
cant. The default optim() algorithm appears to be able to handle it (takes
very long to converge though) and so is nlminb().
My question is thus not really about which algorithm to use but rather
whether there is a 'on error ... do...' catcher in R? I have had a look at
try() but I am not quite sure if that is what I am looking for. I
essentially look for a command that, in plain English, allows me to specify
that if the integral goes to infinity, skip these parameters, and simply
continue optimizing into another direction.
Is this possible? How do you guys handle situtations like this?
Regards
Tobias
--
View this message in context: http://www.nabble.com/Problems-with-Optimization-tf2863893.html#a8003228
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list