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.