The kernel is assumed to be Gaussian. Bandwidth matrix is
diagonal. The two bandwidth parameters are chosen optimally
without ever using/assuming any parametric model for the data
or any "rules of thumb". Unlike many other procedures, this one
is immune to accuracy failures in the estimation of multimodal
densities with widely separated modes. This function in meant to be
the R implementation of the MATLAB
kde2d() function written
and published by Z. I. Botev at:
N by 2 matrix with the two variables as columns
size of the n by n grid over which the density is computed
limits of the bounding box over which the density is computed; format: c(lower_Xlim, upper_Xlim, lower_Ylim, upper_Ylim)
list with bandwidth, density and grids for the two dimensions.
Z. I. Botev, J. F. Grotowski and D. P. Kroese, "Kernel Density Estimation Via Diffusion", Annals of Statistics, 2010, Volume 38, Number 5, Pages 2916-2957
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.