dy.dx | R Documentation |
Returns the numerical partial derivative of y
wrt x
for a point of interest.
dy.dx(x, y, eval.point = NULL)
x |
a numeric vector. |
y |
a numeric vector. |
eval.point |
numeric or ("overall"); |
Returns a data.table
of eval.point along with both 1st and 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" (ISBN: 1490523995)
Vinod, H. and Viole, F. (2017) "Nonparametric Regression Using Clusters" \Sexpr[results=rd]{tools:::Rd_expr_doi("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)
# First derivative
dy.dx(x, y, eval.point = 1.75)[ , first.derivative]
# Second derivative
dy.dx(x, y, eval.point = 1.75)[ , second.derivative]
# Vector of derivatives
dy.dx(x, y, eval.point = c(1.75, 2.5))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.