bandwidth.scott {gplm} | R Documentation |
Scott's rule of thumb
Description
Calculates Scott's rule of thumb bandwidth vector.
Usage
bandwidth.scott(x, kernel = "biweight", product = TRUE)
Arguments
x |
n x d matrix, data |
kernel |
text string, see |
product |
(if d>1) product or spherical kernel |
Details
The default bandwidth vector is computed by Scott's rule of thumb for the Gaussian kernel and adapted to the chosen kernel function.
Value
d x 1 bandwidth vector used for calculation
Author(s)
Marlene Mueller
References
Scott, D.W. (1992). Multivariate Density Estimation: Theory, Practice, and Visualization. New York, Chichester: Wiley.
See Also
Examples
## two-dimensional data
n <- 1000
u <- runif(n)
thresh <- 0.4
x1 <- rnorm(n)*(u<thresh) +rnorm(n,mean=3)*(u>=thresh)
x2 <- rnorm(n)*(u<thresh) +rnorm(n,mean=9)*(u>=thresh)
bandwidth.scott( cbind(x1,x2) )
[Package gplm version 0.7-4 Index]