R: Unbiased Cross-Validation for Bandwidth Selection
ucv
R Documentation
Unbiased Cross-Validation for Bandwidth Selection
Description
Uses unbiased cross-validation to select the bandwidth of a Gaussian
kernel density estimator.
Usage
ucv(x, nb = 1000, lower, upper)
Arguments
x
a numeric vector
nb
number of bins to use.
lower, upper
Range over which to minimize. The default is almost always satisfactory.
Value
a bandwidth.
References
Scott, D. W. (1992)
Multivariate Density Estimation: Theory, Practice, and Visualization.
Wiley.
Venables, W. N. and Ripley, B. D. (2002)
Modern Applied Statistics with S. Fourth edition. Springer.
See Also
bcv, width.SJ, density
Examples
ucv(geyser$duration)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(MASS)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/MASS/ucv.Rd_%03d_medium.png", width=480, height=480)
> ### Name: ucv
> ### Title: Unbiased Cross-Validation for Bandwidth Selection
> ### Aliases: ucv
> ### Keywords: dplot
>
> ### ** Examples
>
> ucv(geyser$duration)
[1] 0.1746726
Warning message:
In ucv(geyser$duration) : minimum occurred at one end of the range
>
>
>
>
>
> dev.off()
null device
1
>