Returns the numerical partial derivate of y wrt x for a point of interest.
Usage
dy.dx(x, y, eval.point = median(x), deriv.method = "FD")
Arguments
x
a numeric vector.
y
a numeric vector.
eval.point
numeric or ("overall"); x point to be evaluated. Defaults to (eval.point = median(x)). Set to (eval.point = "overall") to find an overall partial derivative estimate (1st derivative only).
deriv.method
method of derivative estimation, options: ("NNS", "FD"); Determines the partial derivative from the coefficient of the NNS.reg output when (deriv.method = "NNS") or generates a partial derivative using the finite difference method (deriv.method = "FD") (Defualt).
# NOT RUN {x <- seq(0, 2 * pi, pi / 100) ; y <-sin(x)
dy.dx(x, y, eval.point = 1.75)
# Vector of derivativesdy.dx(x, y, eval.point = c(1.75, 2.5), deriv.method = "FD")
# }