Bandwidth selector for multivariate kernel density estimation
Rule of thumb bandwidth selectors for Gaussian kernels as described by Scott (1992) and Silverman (1986).
bw.silv(x, na.rm = FALSE) bw.scott(x, na.rm = FALSE)
x |
numeric matrix or data.frame. |
na.rm |
a logical value indicating whether |
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.
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.
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.