h.tcv computes the trimmed
cross-validation bandwidth selector of r'th derivative of
kernel density estimator one-dimensional.h.tcv(x, ...)
## S3 method for class 'default':
h.tcv(x, deriv.order = 0, lower = 0.1 * hos, upper = 2 * hos,
tol = 0.1 * lower, kernel = c("gaussian", "epanechnikov", "uniform",
"triangular", "triweight", "tricube", "biweight", "cosine"), ...)hos (Over-smoothing) is calculated internally
from an kernel, see details.optimize."gaussian".x argument.h.tcv trimmed cross-validation implements for choosing the bandwidth $h$
of a r'th derivative kernel density estimator.
Feluch and Koronacki (1992) proposed a so-called trimmed cross-validation (TCV) in kernel
density estimator, a simple modification of the unbiased (least-squares) cross-validation
criterion. We consider the following "trimmed" version of "unbiased", to be minimized with
respect to $h$:
$$\int \left(\hat{f}_{h}^{(r)}(x)\right)^{2} - 2 \frac{(-1)^{r}}{n(n-1) h^{2r+1}} \sum_{i=1}^{n}\sum_{j=1; j \neq i} K^{(2r)} \left(\frac{X_{j}-X_{i}}{h}\right)\chi\left(|X_{i}-X_{j}| > c_{n}\right)$$
where $\chi(.)$ denotes the indicator function and $c_{n}$ is a sequence of positive
constants, $c_{n}/ h^{2r+1} \rightarrow 0$ as $n \rightarrow \infty$, and
$$\int \left(\hat{f}_{h}^{(r)}(x)\right)^{2} = \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)$$
the trimmed cross-validation function is defined by:
$$TCV(h;r) = \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} \varphi^{(r)} \left(\frac{X_{j}-X_{i}}{h}\right)$$
whit $$\varphi^{(r)}(c) = \left(K^{(r)} \ast K^{(r)} - 2 K^{(2r)} \chi\left(|c| > c_{n}/h^{2r+1}\right) \right)(c)$$
here we take $c_{n} = 1/n$, for assure the convergence. Where $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).
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.tcv.## Derivative order = 0
h.tcv(kurtotic,deriv.order = 0)
## Derivative order = 1
h.tcv(kurtotic,deriv.order = 1)Run the code above in your browser using DataLab