I need to calculate third and fourth order numerical derivatives in R. I suppose I should use the grad (or hessian) function from the numDeriv package recursively but I have problems with evaluation. What is the most efficient way to achieve this?
Asked
Active
Viewed 324 times
0
-
1You should describe your data situation better, ideally by posting dput( for an adequate fragment of your data object). – IRTFM Apr 08 '15 at 15:05
-
Don't do it. Numerical derivatives are extremely sensitive to noise, so by the time you get to `f'''(x)` the results are rather untrustworthy. At the very least, you need to have a really good method for removing noise prior to differentiating each time. – Carl Witthoft Apr 08 '15 at 16:11