bandwidth.scott {gplm} | R Documentation |
Calculates Scott's rule of thumb bandwidth vector.
bandwidth.scott(x, kernel = "biweight", product = TRUE)
x |
n x d matrix, data |
kernel |
text string, see |
product |
(if d>1) product or spherical kernel |
The default bandwidth vector is computed by Scott's rule of thumb for the Gaussian kernel and adapted to the chosen kernel function.
d x 1 bandwidth vector used for calculation
Marlene Mueller
Scott, D.W. (1992). Multivariate Density Estimation: Theory, Practice, and Visualization. New York, Chichester: Wiley.
## 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) )