Partial Derivative dy/dx

Description

Returns the numerical partial derivate of y wrt x for a point of interest.

Usage

1
2
dy.dx(x, y, order = NULL, s.t.n = 0.9, eval.point = median(x),
  deriv.order = 1, h = 0.05, noise.reduction = NULL)

Arguments

x

Independent Variable

y

Dependent Variable

order

Controls the number of partial moment quadrant means. Defaults to NULL to allow NNS.reg to determine optimal order based on R2 of regression. order='max' generates a more accurate derivative for well specified cases.

s.t.n

Signal to noise parameter, sets the threshold of NNS.dep which reduces "order" when order=NULL. Defaults to 0.9 to ensure high dependence for higher "order" and endpoint determination.

eval.point

Independent variable point to be evaluated. Defaults to median(x).

deriv.order

For second derivative estimate of f(x), set deriv.order=2. Defaults to first derivative.

h

Percentage step used for finite step method. Defaults to h=.05 representing a 5 percent step from the value of the independent variable.

noise.reduction

In low signal:noise situations, noise.reduction="median" uses medians instead of means for partitions, while noise.reduction="mode" uses modes instead of means for partitions. noise.reduction=NULL (Default setting) allows for maximum possible fit in NNS.reg.

Value

Returns the value of the partial derivative estimate for the given order.

Author(s)

Fred Viole, OVVO Financial Systems

References

Viole, F. and Nawrocki, D. (2013) "Nonlinear Nonparametric Statistics: Using Partial Moments" http://amzn.com/1490523995

Examples

1
2
x<-seq(0,2*pi,pi/100); y<-sin(x)
dy.dx(x,y,eval.point=1.75)

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.