
Last chance! 50% off unlimited learning
Sale ends in
Returns a scale factor for the kernels used in density estimation for numerical data.
kernel.factor(kernel = "gaussian")
String name of the kernel.
Options are
"gaussian"
, "rectangular"
,
"triangular"
,
"epanechnikov"
,
"biweight"
,
"cosine"
and "optcosine"
.
(Partial matching is used).
A single number.
Kernel estimation of a probability density in one dimension
is performed by density.default
using a kernel function selected from the list above.
This function computes a scale constant for the kernel.
For the Gaussian kernel, this constant is equal to 1.
Otherwise, the constant
For more information about these kernels,
see density.default
.
# NOT RUN {
kernel.factor("rect")
# bandwidth for Epanechnikov kernel with half-width h=1
h <- 1
bw <- h/kernel.factor("epa")
# }
Run the code above in your browser using DataLab