Solved – Choosing a bandwidth for kernel density estimators

kernel-smoothingsmoothing

For univariate kernel density estimators (KDE), I use Silverman's rule for calculating $h$:

\begin{equation}
0.9 \min(sd, IQR/1.34)\times n^{-0.2}
\end{equation}

What are the standard rules for multivariate KDE (assuming a Normal kernel).

Best Answer

For a univariate KDE, you are better off using something other than Silverman's rule which is based on a normal approximation. One excellent approach is the Sheather-Jones method, easily implemented in R; for example,

plot(density(precip, bw="SJ"))

The situation for multivariate KDE is not so well studied, and the tools are not so mature. Rather than a bandwidth, you need a bandwidth matrix. To simplify the problem, most people assume a diagonal matrix, although this may not lead to the best results. The ks package in R provides some very useful tools including allowing a full (not necessarily diagonal) bandwidth matrix.