dy.dx: Partial Derivative dy/dx

Description Usage Arguments Value Author(s) References Examples

View source: R/dy_dx.R

Description

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

Usage

1
2
3
dy.dx(x, y, order = NULL, stn = 0.99, eval.point = median(x),
  deriv.order = 1, h = 0.01, noise.reduction = "mean",
  deriv.method = "FS")

Arguments

x

a numeric vector.

y

a numeric vector.

order

integer; Controls the number of partial moment quadrant means. Defaults to (order=NULL) which generates a more accurate derivative for well specified cases.

stn

numeric [0,1]; Signal to noise parameter, sets the threshold of NNS.dep which reduces "order" when (order=NULL). Defaults to 0.99 to ensure high dependence for higher "order" and endpoint determination.

eval.point

numeric; x point to be evaluated. Defaults to (eval.point=median(x)). Set to (eval.points="overall") to find an overall partial derivative estimate.

deriv.order

numeric options: (1,2); 1 (default) For second derivative estimate of f(x), set (deriv.order=2).

h

numeric [0,...]; Percentage step used for finite step method. Defaults to h=.01 representing a 1 percent step from the value of the independent variable.

noise.reduction

the method of determing regression points options: ("mean","median","mode","off"); In low signal to 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="off") allows for maximum possible fit in NNS.reg. Default setting is (noise.reduction="mean").

deriv.method

method of derivative estimation, options:("NNS","FS"); Determines the partial derivative from the coefficient of the NNS.reg output when (deriv.method="NNS") or generates a partial derivative using the finite step method (deriv.method="FS") (Defualt).

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)

NNS documentation built on June 3, 2017, 1:01 a.m.

Search within the NNS package
Search all R packages, documentation and source code