######################################################
I ran <while (TRUE) 0> before posting, and waited a while...
(Re: The posting guide, which I'm going to start putting a lot more weight on).

Noting, I was wondering if the posting guide has a mistake, because
<4*runif(1)> doesn't do anything special...
(Hopefully, Martin is reading this...).

And I'm planning to make this my last post in this thread...
######################################################
Here's a much simpler example of the problem:

optim (4, dnorm, method="CG", control = list (fnscale=-1) )$par

This problem isn't limited to objective functions of one variable.
I tried similar problems with functions of two, three and four variables.
And the same thing happened.

I'm not sure if this is a bug in the R code, or not.

If it's a bug...

And if it's not a bug, I'm struggling to see why anyone would want to
use this method in an applied setting...


On Fri, Mar 13, 2020 at 3:42 AM Duncan Murdoch <murdoch.dun...@gmail.com> wrote:
>
> It looks like a bug in the CG method.  The other methods in optim() all
> work fine.  CG is documented to be a good choice in high dimensions; why
> did you choose it for a 1 dim problem?
>
> Duncan Murdoch

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.

Reply via email to