| drvkde {ks} | R Documentation |
Compute kernel density derivative estimates and standard errors for multivariate data.
drvkde(x, drv, bandwidth, gridsize, range.x, binned=FALSE, se=TRUE)
x |
data matrix or matrix of binning counts |
drv |
vector of derivative indices |
bandwidth |
vector of bandwidths |
gridsize |
vector of grid sizes |
range.x |
list of vector of ranges for x |
binned |
TRUE if x is binned counts or FALSE if x is data matrix |
se |
flag for computing the standard error of kernel estimate |
The estimates and standard errors are computed over a grid of binned counts
x.grid. If the binned counts are not supplied then they are computed
inside this function.
If gridsize and range.x are not supplied, they are
computed inside this function.
Returns a list with fields
x.grid - grid points
est - kernel estimate of partial derivative of density function
indicated by drv
se - estimate of standard error of est (if se=TRUE).
M.P. Wand
Wand, M.P. and Jones, M.C. (1995) Kernel Smoothing. Chapman & Hall/CRC, London.
## univariate x <- rnorm(100) fhat <- drvkde(x=x, drv=0, bandwidth=0.1) ## KDE of f fhat1 <- drvkde(x=x, drv=1, bandwidth=0.1) ## KDE of df/dx