Re: [R] BFGS and Neldear-Mead

From: Ravi Varadhan <rvaradhan_at_jhmi.edu>
Date: Fri, 18 Mar 2011 17:57:26 -0400

It is important to pay attention to the convergence message. For example, if the convergence is due to reaching maximum iteration limit (this is often the case with Nelder-Mead), then you should increase the maxit from 500 to 1500 or something like that.

Users generally have trouble interpreting the convergence messages. This is one of the reasons that we have implemented explicit convergence diagnostics in "optimx" through first- and second-order KKT conditions. So, you might want to re-run your problem with "optimx" and check the KKT conditions.

If there are multiple optima, you can get different answers from properly converged iterations.

Ravi.



Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins University

Ph. (410) 502-2619
email: rvaradhan_at_jhmi.edu

-----Original Message-----
From: r-help-bounces_at_r-project.org [mailto:r-help-bounces_at_r-project.org] On Behalf Of Petr Savicky
Sent: Friday, March 18, 2011 5:25 PM
To: r-help_at_r-project.org
Subject: Re: [R] BFGS and Neldear-Mead

On Fri, Mar 18, 2011 at 11:27:58AM -0700, LC-Bea wrote:
> Hello!
>
> Im doing this:
>
> A<-optim(vv,pen.wlsv,method="BFGS")
> B<-optim(vv,pen.wlsv,method="Nelder-Mead")
>
> the function is the same
> and the initial values too
>
> the estimate values are different, very different, at the first decimal
>
> is there an error?

Not necessarily.

> or maybe its because of my data, or funtion to minimize?
> i thought that the values must be almost equal, that the big difference
> between the two algoritms is in the time that they use to find a solution

If the function has several local minima, then different methods may found different ones.

Can you send more detail about the minimized function?

Petr Savicky.



R-help_at_r-project.org mailing list
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.

R-help_at_r-project.org mailing list
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. Received on Fri 18 Mar 2011 - 22:01:04 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 21 Mar 2011 - 12:10:23 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive