Learn R Programming

ks (version 1.8.4)

ks: ks

Description

Kernel smoothing for data from 1- to 6-dimensions.

Arguments

Details

There are three main types of functions in this package: (a) computing kernel estimators, (b) computing bandwidth selectors and (c) displaying kernel estimators. The kernel used throughout is the normal (Gaussian) kernel.

--For kernel density estimation, kde computes $$\hat{f}(\bold{x}; \bold{{\rm H}}) = n^{-1} \sum_{i=1}^n K_{\bold{{\rm H}}} (\bold{x} - \bold{X}_i).$$

For display, its plot method calls plot.kde.

--For kernel discriminant analysis, kda.kde computes density estimates for each the groups in the training data, and the discriminant surface. Its plot method is plot.kda.kde. The wrapper function Hkda computes bandwidth matrices for each group in the training data, by calling the above selectors. --For kernel density derivative estimation, the main function is kdde $$\widehat{{\sf D}^{\otimes r}f}(\bold{x}; \bold{{\rm H}}) = n^{-1} \sum_{i=1}^n {\sf D}^{\otimes r}K_{\bold{{\rm H}}} (\bold{x} - \bold{X}_i).$$

--There are several varieties of bandwidth matrix selectors

For 1-d data, the bandwidth $h$ is the standard deviation of the normal kernel, whereas for multivariate data, the bandwidth matrix $\bold{{\rm H}}$ is the variance matrix.

--For kernel functional estimation, kfe computes the $r$-th order integrated density functional $$\hat{{\bold \psi}}_r (\bold{{\rm H}}) = n^{-2} \sum_{i=1}^n \sum_{j=1}^n {\sf D}^{\otimes r}K_{\bold{{\rm H}}}(\bold{X}_i-\bold{X}_j).$$ The plug-in selector is Hpi.kfe.

--Binned kernel estimation is available for d = 1, 2, 3, 4. This makes kernel estimators feasible for large samples. --For an overview of this package with 2-d density estimation, see vignette("kde").

References

Bowman, A. & Azzalini, A. (1997) Applied Smoothing Techniques for Data Analysis. Oxford University Press, Oxford. Duong, T. (2004) Bandwidth Matrices for Multivariate Kernel Density Estimation. Ph.D. Thesis, University of Western Australia.

Scott, D.W. (1992) Multivariate Density Estimation: Theory, Practice, and Visualization. John Wiley & Sons, New York.

Silverman, B. (1986) Density Estimation for Statistics and Data Analysis. Chapman & Hall/CRC, London.

Simonoff, J. S. (1996) Smoothing Methods in Statistics. Springer-Verlag. New York.

Wand, M.P. & Jones, M.C. (1995) Kernel Smoothing. Chapman & Hall/CRC, London.

See Also

sm, KernSmooth