Learn R Programming

ks (version 1.5.5)

Hscv, Hscv.diag: Smoothed cross-validation (SCV) bandwidth matrix selector for 2- to 6-dimensional data

Description

SCV bandwidth matrix for 2- to 6-dimensional data.

Usage

Hscv(x, pre="sphere", Hstart, binned=FALSE, bgridsize)
Hscv.diag(x, pre="scale", Hstart, binned=FALSE, bgridsize)

Arguments

x
matrix of data values
pre
"scale" = pre-scaling, "sphere" = pre-sphering
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

Value

  • SCV bandwidth matrix.

Details

This SCV selector is a generalisation of the univariate SCV selector of Jones, Marron & Park (1991).

For d = 1, 2, 3, 4 and binned=TRUE, the density estimate is 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.

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

Examples

Run this code
data(unicef)
Hscv(unicef)
Hscv(unicef, binned=TRUE)
Hscv.diag(unicef)

Run the code above in your browser using DataLab