[R] nlm doesn't detect a gradient in my function - odd solution (bug?)
Andrew Robinson
andrewr at uidaho.edu
Wed Jul 21 05:28:30 CEST 2004
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 across a peculiar solution: the nlm function was able to detect a non-zero gradient when the ndigit value was *reduced*. The default value is 12, I was able to detect a gradient in one of the four dimensions if I used 10, and in all of the four if I used 8.
Does that make any sense to anyone?
Thanks,
Andrew
More information about the R-help
mailing list