[R] gradient function in OPTIMX

Kathie kathryn.lord2000 at gmail.com
Mon Aug 29 11:10:36 CEST 2011


Dear R users


When I use OPTIM with BFGS, I've got a significant result without an error
message.  However, when I use OPTIMX with BFGS( or spg), I've got the
following an error message.

----------------------------------------------------------------------------------------------------

>  optimx(par=theta0, fn=obj.fy, gr=gr.fy, method="BFGS",
> control=list(maxit=10000))

Error: Gradient function might be wrong - check it! 

----------------------------------------------------------------------------------------------------

I checked and checked my gradient function line by line. I could not find
anything wrong.

Is it a bug or something?  I prefer OPTIMX, so I'd like to know why.

Thanks a lot in advance

Regards,

Kathryn Lord 

--
View this message in context: http://r.789695.n4.nabble.com/gradient-function-in-OPTIMX-tp3775791p3775791.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list