| h.scv | R Documentation |
Selects the bandwidth of the r'th derivative kernel density estimator by
minimising the smoothed cross-validation (SCV) criterion of Hall, Marron
and Park (1992). Returns an S4 object of class
bandwidth.
h.scv(x, g = NULL, deriv.order = 0L, kernel = "gaussian",
lower, upper, tol, nthreads = 0L)
x |
numeric vector of data values. |
g |
pilot bandwidth (positive number). If |
deriv.order |
non-negative integer: derivative order |
kernel |
must be |
lower, upper |
bounds of the search interval. Defaults to
|
tol |
convergence tolerance for |
nthreads |
number of OpenMP threads for this call: |
With a Gaussian kernel and a Gaussian pilot estimate \tilde f_g, the
integrated squared bias of \hat f_h^{(r)} is estimated in closed form
by derivatives of normal densities:
SCV(h; r) = \frac{R(K^{(r)})}{n h^{2r+1}} + \frac{(-1)^r\,2}{n(n-1)}
\sum_{i<j} \left[\phi^{(2r)}_{s_1} - 2\phi^{(2r)}_{s_2}
+ \phi^{(2r)}_{s_3}\right](X_j - X_i),
where s_1 = \sqrt{2(h^2+g^2)},
s_2 = \sqrt{h^2+2g^2},
s_3 = \sqrt{2}\,g and
\phi^{(k)}_s(u) = \phi^{(k)}(u/s)/s^{k+1}.
It follows from
\int [((K_h-\delta) * \tilde f_g)^{(r)}]^2 = (-1)^r \int
((K_h-\delta) * \tilde f_g)\,((K_h-\delta) * \tilde f_g)^{(2r)}.
For r = 0 it is the criterion of Hall, Marron and Park (1992).
The default pilot bandwidth is the density pilot of Hall et al.; for
derivatives a pilot can be supplied through g.
An S4 object of class bandwidth with
method = "SCV".
Arsalane Chouaib Guidoum acguidoum@univ-tam.dz, Amel Henider amel.henider@univ-tam.dz and Iago Giné-Vázquez iago.gin-vaz@protonmail.com
Hall, P., Marron, J. S. and Park, B. U. (1992). Smoothed cross-validation. Probability Theory and Related Fields, 92, 1–20.
h.ucv, h.bcv, bandwidth.
x <- rnorm(200)
bw <- h.scv(x)
show(bw)
plot(bw)
## first derivative (r = 1)
bw1 <- h.scv(x, deriv.order = 1)
plot(dkde(data = x, h = bw1@h, deriv.order = 1))
## on a Marron-Wand sample (SCV is defined for the Gaussian kernel)
h.scv(bimodal)
h.scv(bimodal, deriv.order = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.