h.ccv computes the complete
cross-validation bandwidth selector of r'th derivative of
kernel density estimator one-dimensional.h.ccv(x, ...)
## S3 method for class 'default':
h.ccv(x, deriv.order = 0, lower = 0.1 * hos, upper = hos,
tol = 0.1 * lower, kernel = c("gaussian", "triweight",
"tricube", "biweight", "cosine"), ...)hos (Over-smoothing) is calculated internally
from an kernel, see details.optimize."gaussian".x argument.h.ccv complete cross-validation implements for choosing the bandwidth $h$
of a r'th derivative kernel density estimator.
Jones and Kappenman (1991) proposed a so-called complete cross-validation (CCV)
in kernel density estimator. This method can be extended to the estimation of
derivative of the density, basing our estimate of integrated squared density
derivative (Peter and Marron 1987) on the $\bar{\theta}_{r}(h)$'s,
we get the following, start from $R\left(\hat{f}_{h}^{(r)}\right) - \bar{\theta}_{r}(h)$ as an estimate
of MISE. Thus, $\hat{h}^{(r)}_{CCV}$, say, is the $h$ that minimises:
$$CCV(h;r)=R\left(\hat{f}_{h}^{(r)}\right)-\bar{\theta}_{r}(h)+\frac{1}{2}\mu_{2}(K) h^{2} \bar{\theta}_{r+1}(h)+\frac{1}{24}\left(6\mu_{2}^{2}(K) -\delta(K)\right)h^{4}\bar{\theta}_{r+2}(h)$$
with
$$R\left(\hat{f}_{h}^{(r)}\right) = \int \left(\hat{f}_{h}^{(r)}(x)\right)^{2} dx = \frac{R\left(K^{(r)}\right)}{nh^{2r+1}} + \frac{(-1)^{r}}{n (n-1) h^{2r+1}} \sum_{i=1}^{n}\sum_{j=1;j \neq i}^{n} K^{(r)} \ast K^{(r)} \left(\frac{X_{j}-X_{i}}{h}\right)$$
and
$$\bar{\theta}_{r}(h)= \frac{(-1)^r}{n(n-1) h^{2r+1}} \sum_{i=1}^{n} \sum_{j=1;j \neq i}^{n} K^{(2r)} \left(\frac{X_{j}-X_{i}}{h}\right)$$
and $K^{(r)} \ast K^{(r)} (x)$ is the convolution of the r'th derivative kernel function $K^{(r)}(x)$
(see kernel.conv and kernel.fun); $R\left(K^{(r)}\right) = \int_{R} K^{(r)}(x)^{2} dx$ and
$\mu_{2}(K) = \int_{R}x^{2} K(x) dx$, $\delta(K) = \int_{R}x^{4} K(x) dx$.
The range over which to minimize is hos Oversmoothing bandwidth, the default is almost always
satisfactory. See George and Scott (1985), George (1990), Scott (1992, pp 165), Wand and Jones (1995, pp 61).plot.h.ccv.## Derivative order = 0
h.ccv(kurtotic,deriv.order = 0)
## Derivative order = 1
h.ccv(kurtotic,deriv.order = 1)Run the code above in your browser using DataLab