Determines numerical derivative of a given function using projected secant lines on the y-axis. These projected points infer finite steps h, in the finite step method.
Usage
NNS.diff(f, point, h = 0.1, tol = 1e-10, print.trace = FALSE)
Arguments
f
an expression or call or a formula with no lhs.
point
numeric; Point to be evaluated for derivative of a given function f.
h
numeric [0, ...]; Initial step for secant projection. Defaults to (h = 0.1).
tol
numeric; Sets the tolerance for the stopping condition of the inferred h. Defualts to (tol = 1e-10).
print.trace
logical; FALSE (default) Displays each iteration, lower y-intercept, upper y-intercept and inferred h.
Value
Returns a matrix of values, intercepts, derivatives, inferred step sizes for multiple methods of estimation.