width.SJ.Rd
Uses the method of Sheather & Jones (1991) to select the bandwidth of a Gaussian kernel density estimator.
width.SJ(x, nb = 1000, lower, upper, method = c("ste", "dpi"))
a bandwidth.
A faster version for large n
(thousands) is available in R
\(\ge\) 3.4.0 as part of bw.SJ
: quadruple its
value for comparability with this version.
Sheather, S. J. and Jones, M. C. (1991) A reliable data-based bandwidth selection method for kernel density estimation. Journal of the Royal Statistical Society series B 53, 683–690.
Scott, D. W. (1992) Multivariate Density Estimation: Theory, Practice, and Visualization. Wiley.
Wand, M. P. and Jones, M. C. (1995) Kernel Smoothing. Chapman & Hall.
width.SJ(geyser$duration, method = "dpi")
#> [1] 0.57479
width.SJ(geyser$duration)
#> [1] 0.36052
width.SJ(galaxies, method = "dpi")
#> [1] 3256.2
width.SJ(galaxies)
#> [1] 2566.4