| h.ccv | R Documentation |
Computes the complete cross-validation bandwidth selector of the r'th
derivative of a kernel density estimator (one-dimensional).
Returns an S4 object of class bandwidth.
h.ccv(x, deriv.order = 0L, kernel = "gaussian",
lower, upper, tol, nthreads = 0L)
x |
numeric vector of data values. |
deriv.order |
non-negative integer: derivative order |
kernel |
character string giving the kernel; one of
|
lower, upper |
bounds of the search interval. Defaults to
|
tol |
convergence tolerance for |
nthreads |
number of OpenMP threads for this call: |
Jones and Kappenman (1991) proposed complete cross-validation
(CCV) for kernel density estimation. The method estimates the
integrated squared density derivative using
\bar{\theta}_r(h) (Peter and Marron 1987).
\hat{h}_{CCV}^{(r)} minimises:
CCV(h;r) = R\!\left(\hat{f}_h^{(r)}\right) - \bar{\theta}_r(h)
+ \tfrac{1}{2}\mu_2(K)\,h^2\,\bar{\theta}_{r+1}(h)
+ \tfrac{1}{24}\bigl(6\mu_2^2(K)-\delta(K)\bigr)\,h^4\,
\bar{\theta}_{r+2}(h)
with
R\!\left(\hat{f}_h^{(r)}\right) =
\frac{R(K^{(r)})}{nh^{2r+1}} +
\frac{(-1)^r}{n(n-1)h^{2r+1}}
\sum_{i}\sum_{j \neq i}
K^{(r)}\ast K^{(r)}\!\left(\tfrac{X_j-X_i}{h}\right)
and
\bar{\theta}_r(h)=
\frac{(-1)^r}{n(n-1)h^{2r+1}}
\sum_i\sum_{j \neq i}
K^{(2r)}\!\left(\tfrac{X_j-X_i}{h}\right)
where R(K^{(r)})=\int K^{(r)}(x)^2\,dx,
\mu_2(K)=\int x^2 K(x)\,dx,
\delta(K)=\int x^4 K(x)\,dx.
The search is bounded by the over-smoothing bandwidth hos
(Scott 1992, p.\,165; Wand and Jones 1995, p.\,61).
An S4 object of class bandwidth with slots:
datathe (cleaned) data vector.
kernelname of the kernel used.
deriv.orderderivative order r.
hselected bandwidth.
min.objminimum CCV value.
hosover-smoothing bandwidth (upper bound).
method"CCV".
Arsalane Chouaib Guidoum acguidoum@univ-tam.dz, Amel Henider amel.henider@univ-tam.dz and Iago Giné-Vázquez iago.gin-vaz@protonmail.com
Jones, M. C. and Kappenman, R. F. (1991). On a class of kernel density estimate bandwidth selectors. Scandinavian Journal of Statistics, 19, 337–349.
Peter, H. and Marron, J. S. (1987). Estimation of integrated squared density derivatives. Statistics and Probability Letters, 6, 109–115.
Wand, M. P. and Jones, M. C. (1995). Kernel Smoothing. Chapman and Hall, London.
bandwidth, h.ucv, h.bcv,
h.mcv, h.tcv, h.scv, h.amise,
kernel.conv, kernel.fun.
x <- rnorm(100)
## density (r = 0)
bw0 <- h.ccv(x, deriv.order = 0)
show(bw0)
plot(bw0)
## first derivative (r = 1)
bw1 <- h.ccv(x, deriv.order = 1)
show(bw1)
## other kernels on a Marron-Wand sample
h.ccv(trimodal, kernel = "logistic")
h.ccv(trimodal, kernel = "pow(2,3)")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.