[R] nlm doesn't detect a gradient in my function - odd solution (bug?)

2004-07-20 Thread Andrew Robinson
Dear R community, I sent a question to the list a few days ago. Using nlm, I was unable to detect a gradient in a four-parameter function that I had written in the region that I was searching, even though the function surface clearly varied in the fourth significant figure there. I stumbled a

[R] nlm doesn't detect a gradient in my function

2004-07-16 Thread Andrew Robinson
Hi R-community, I wonder if anyone has dealt with this problem? I've written a negative log-likelihood function of 4 parameters, and I want to minimize it. It doesn't have derivative information (it actually requires running an external program). I can detect a gradient in it, e.g.: > toy.