[R] help on nlm (gradient) (fwd)

From: Luz Maria Palacios Derflingher <palacios_at_math.ucalgary.ca>
Date: Tue 20 Jun 2006 - 00:28:16 EST


No worries anymore. Figured it out.

Thanks for everything.



I am having some trouble using nlm in R for windows version 2.2.1. I have to minimise a function which includes in its insides the evaluation of integrals through the "adapt" function.
In order to make R work less, I calculated the gradient and coded it. I made sure that the code and function for the gradient worked. So I know that the main function (the one to minimise,let's call it "func1") yields values when evaluated.
I know that the gradient I coded also works and yields values when evaluated (on its own); when I put it all together and use nlm I get the following message:

Error in nlm(func1, starting values, :

         probable coding error in analytic gradient

Any light that can be shed on this would be highly appreciated. Many thanks

Luz Palacios
PhD Candidate University of Calgary

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 Received on Tue Jun 20 00:44:59 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 Tue 20 Jun 2006 - 02:11:34 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.