Skip to content
Prev 69247 / 398506 Next

Numerical Derivative / Numerical Differentiation of unkno wn funct ion

"Uzuner, Tolga" <tolga.uzuner at csfb.com> writes:
The expression passed to numericDeriv can easily be a call to .C or
similar.

Actually, numericDeriv can get you in trouble if the function is not
smooth enough. It basically just calculates (f(a+d)-f(a))/d where d is
on the order of 1e-7 * a for each parameter. Sometimes a larger d and
a higher order approximation is need to avoid getting stuck in the
rough. 

(Yes, Bill, I do remember that you wanted an R News Programmer's Niche
item from me on this...)