Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

bw.silv

Bandwidth selector for multivariate kernel density estimation


Description

Rule of thumb bandwidth selectors for Gaussian kernels as described by Scott (1992) and Silverman (1986).

Usage

bw.silv(x, na.rm = FALSE)

bw.scott(x, na.rm = FALSE)

Arguments

x

numeric matrix or data.frame.

na.rm

a logical value indicating whether NA values should be stripped before the computation proceeds.

Details

Scott's (1992) rule is defined as

H = n^(-2/(m+4)) * S

Silverman's (1986; see Chacon, Duong and Wand, 2011) rule is defined as

H = (4/(n*(m+2)))^(2/(m+4)) * S

where m is number of variables, n is sample size, S is the empirical covariance matrix. The bandwidth is returned as a covariance matrix, so to use it for a product kernel, take square root of it's diagonal: sqrt(diag(H)).

bw.silv corresponds to Hns method with deriv.order=0 from the ks package.

References

Silverman, B.W. (1986). Density estimation for statistics and data analysis. Chapman and Hall/CRC.

Wand, M.P. and Jones, M.C. (1995). Kernel smoothing. Chapman and Hall/CRC.

Scott, D.W. (1992). Multivariate density estimation: theory, practice, and visualization. John Wiley & Sons.

Chacon J.E., Duong, T. and Wand, M.P. (2011). Asymptotics for general multivariate kernel density derivative estimators. Statistica Sinica, 21, 807-840.

Epanechnikov, V.A. (1969). Non-parametric estimation of a multivariate probability density. Theory of Probability & Its Applications, 14(1): 153-158.

See Also


kernelboot

Smoothed Bootstrap and Random Generation from Kernel Densities

v0.1.7
GPL-2
Authors
Tymoteusz Wolodzko
Initial release
2020-02-13

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.