Two-Dimensional Kernel Density Estimation
Usage
kde2d(x, y, h, n=25, lims=c(range(x), range(y)))
Arguments
x
|
x coordinate of data
|
y
|
y coordinate of data
|
h
|
vector of bandwidths for x and y directions. Defaults to
normal reference bandwidth.
|
n
|
Number of grid points in each direction.
|
lims
|
The limits of the rectangle covered by the grid as c(xl, xu, yl, yu) .
|
Description
Two-dimensional kernel density estimation with an axis-aligned
bivariate normal kernel, evaluated on a square grid.Value
A list of three components.
x,
|
The x and y coordinates of the grid points, vectors of length n .
|
z
|
An n x n matrix of the evaluated density.
|