Learn R Programming

ks (version 1.6.13)

Hscv, Hscv.diag, hscv: Smoothed cross-validation (SCV) bandwidth selector

Description

SCV bandwidth for 1- to 6-dimensional data.

Usage

Hscv(x, pre="sphere", pilot="samse", Hstart, binned=TRUE, bgridsize, kfold=1)
Hscv.diag(x, pre="scale", Hstart, binned=FALSE, bgridsize, kfold=1)
hscv(x, nstage=2, binned=TRUE, bgridsize, plot=FALSE)

Arguments

x
vector or matrix of data values
pre
"scale" = pre-scaling, "sphere" = pre-sphering
pilot
"amse" = AMSE pilot bandwidths, "samse" = single SAMSE pilot bandwidth, "unconstr" = unconstrained pilot bandwidth matrix
Hstart
initial bandwidth matrix, used in numerical optimisation
binned
flag for binned kernel estimation
bgridsize
vector of binning grid sizes - required only if binned=TRUE
kfold
value for k-fold bandwidth selection. See details below
nstage
number of stages in the SCV bandwidth selector (1 or 2) (1-d only)
plot
flag to display plot of SCV(h) vs h (1-d only)

Value

  • SCV bandwidth.

Details

hsv is the univariate SCV selector of Jones, Marron & Park (1991). Hscv is a multivariate generalisation of this.

For d = 1, the selector hscv is not always stable for large sample sizes with binning. Examine the plot from hscv(, plot=TRUE) to determine the appropriate smoothness of the SCV function. Any non-smoothness is due to the discretised nature of binned estimation. For d = 1, 2, 3, 4 and binned=TRUE, the estimates are computed over a binning grid defined by bgridsize. Otherwise it's computed exactly. For details on the pre-transformations in pre, see pre.sphere and pre.scale. If Hstart is not given then it defaults to k*var(x) where k = $\left[\frac{4}{n(d+2)}\right]^{2/(d+4)}$, n = sample size, d = dimension of data.

For large samples, k-fold bandwidth selection can significantly reduce computation time. The full data sample is partitioned into k sub-samples and a bandwidth matrix is computed for each of these sub-samples. The bandwidths are averaged and re-weighted to serve as a proxy for the full sample selector.

References

Jones, M.C., Marron, J.~S. & Park, B.U. (1991) A simple root n bandwidth selector. Annals of Statistics 19, 1919--1932.

Duong, T. & Hazelton, M.L. (2005) Cross-validation bandwidth matrices for multivariate kernel density estimation. Scandinavian Journal of Statistics. 32, 485-506.

See Also

Hlscv, Hbcv, Hpi

Examples

Run this code
data(unicef)
Hscv(unicef)
Hscv.diag(unicef, binned=TRUE)
hscv(unicef[,1])

Run the code above in your browser using DataLab