dy.dx {NNS} | R Documentation |
Returns the numerical partial derivative of y
wrt x
for a point of interest.
dy.dx(x, y, eval.point = median(x), deriv.method = "FD")
x |
a numeric vector. |
y |
a numeric vector. |
eval.point |
numeric or ("overall"); |
deriv.method |
method of derivative estimation, options: ("NNS", "FD"); Determines the partial derivative from the coefficient of the NNS.reg output when |
Returns a list of both 1st and 2nd derivative:
dy.dx(...)$First
the 1st derivative.
dy.dx(...)$Second
the 2nd derivative.
If a vector of derivatives is required, ensure (deriv.method = "FD")
.
Fred Viole, OVVO Financial Systems
Viole, F. and Nawrocki, D. (2013) "Nonlinear Nonparametric Statistics: Using Partial Moments" https://www.amazon.com/dp/1490523995/ref=cm_sw_su_dp
Vinod, H. and Viole, F. (2017) "Nonparametric Regression Using Clusters" https://link.springer.com/article/10.1007/s10614-017-9713-5
## Not run: x <- seq(0, 2 * pi, pi / 100) ; y <- sin(x) dy.dx(x, y, eval.point = 1.75) # Vector of derivatives dy.dx(x, y, eval.point = c(1.75, 2.5), deriv.method = "FD") ## End(Not run)