get.h {rflowcyt} | R Documentation |
get.h finds the critical bandwidth for specific number of modes. That is, it finds the smallest bandwidth for which "m" modes are present for a kernel density estimator.
get.h(x, m = 1, prec = 0.001, hmin = 0, hmax = 1)
x |
the data vector in which to find the critical bandwidth |
m |
the number of modes for the critical bandwidth |
prec |
the precision for the resulting bandwidth |
hmin |
the minimum value to start searching for the critical bandwidth, h |
hmax |
the maximum value to start searching for the critical bandwidth, h |
get.h uses the Gaussian kernel to estimate the density of a data vector given by x. The bandwidth determines the spread of each data point. Thus a larger bandwidth leads to a smoother density estaimate. get.h finds the smallest bandwidth in which "m" modes are still present.
h |
the critical bandwidth, rescaled for the standardized x-values for direct comparison |
Kevin Rader
B.W. Silverman (1981),Using Kernel Density Estimates to Investigate Multimodatlity. J.R. Statist. Soc. B,43,1,97-99.
set.seed(12345) x <- c(rnorm(20,0),rnorm(20,3)) get.h(x)