Re: [R] optim error

From: Rich Townsend <rich_at_u.washington.edu>
Date: Sat 12 Aug 2006 - 02:05:58 EST


If you have an idea of the ranges of your parameters, I've found that the DEoptim package has been excellent for finding good starting values for very large likelihood equations, then finishing it up with the optim() to get the final estimates.

Rich

School of Aquatic & Fishery Sciences
University of Washington
www.cbr.washington.edu

> -----Original Message-----
> From: Vaidotas Zemlys [mailto:mpiktas@gmail.com]
> Sent: Thursday, August 10, 2006 7:07 AM
> To: Frank Black
> Cc: r-help@stat.math.ethz.ch
> Subject: Re: [R] optim error
>
>
> Hi,
>
> On 8/9/06, Frank Black <fb572@hotmail.com> wrote:
> > Dear all,
> >
> > There have been one or two questions posted to the list
> regarding the
> > optim error "non-finite finite-difference value [4]." The error
> > apparently means that the 4th element of the gradient is
> non-finite.
> > My question is what
> > part(s) of my program should I fiddle with in an attempt to fix it?
> > Starting values? Something in the log-likelihood itself?
> Perhaps the data
> > (which is generated)? Any thoughts would be greatly appreciated.
> >
>
> Use Nelder-Mead algorithm for finding apropriate starting
> values. This algorithm does not use gradients, so you will
> not aforementioned error. After Nelder-Mead you can try again
> with gradient methods, like BFGS. If that does not help, try
> scaling your data. Optim behaves better (IMHO) when all
> parameters are of the same order. If you do not need hessian,
> and BFGS fails, use only Nelder-Mead, it will at least give
> you something.
>
> Vaidotas Zemlys
> --
> Doctorate student, Vilnius University
> http://www.mif.vu.lt/katedros/eka/katedra/zemlys.php
>
>
>



R-help@stat.math.ethz.ch 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 Sat Aug 12 02:11:52 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sat 12 Aug 2006 - 04:20:25 EST.

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