kde {ks}R Documentation

Kernel density estimate for multivariate data

Description

Kernel density estimate for 1- to 6-dimensional data.

Usage

kde(x, H, h, gridsize, binned=FALSE, bgridsize, supp=3.7,
    eval.points, positive=FALSE)

Arguments

x matrix of data values
H bandwidth matrix
h scalar bandwidth
gridsize vector of number of grid points
binned flag for binned estimation (default is FALSE)
bgridsize vector of binning grid sizes - required if binned=TRUE
supp effective support for standard normal is [-supp, supp]
eval.points points at which density estimate is evaluated
positive flag if 1-d data are positive (default is FALSE)

Details

For d = 1, 2, 3, 4, and if eval.points is not specified, then the density estimate is computed over a grid defined by gridsize (if binned=FALSE) or by bgridsize (if binned=TRUE).

For d = 1, 2, 3, 4, and if eval.points is specified, then the density estimate is computed exactly at eval.points.

For d > 4, the kernel density estimate is computed exactly and eval.points must be specified.

Value

Kernel density estimate is an object of class kde which is a list with 4 fields

x data points - same as input
eval.points points at which the density estimate is evaluated
estimate density estimate at eval.points
H bandwidth matrix
h scalar bandwidth (1-d only)

References

Wand, M.P. & Jones, M.C. (1995) Kernel Smoothing. Chapman & Hall. London.

See Also

plot.kde

Examples

### See examples in ? plot.kde  

[Package ks version 1.5.4 Index]