Computes the integral of the squared kernel, for the kernels used in density estimation for numerical data.
kernel.squint(kernel = "gaussian", bw=1)
String name of the kernel.
Options are
"gaussian"
, "rectangular"
,
"triangular"
,
"epanechnikov"
,
"biweight"
,
"cosine"
and "optcosine"
.
(Partial matching is used).
Bandwidth (standard deviation) of the kernel.
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 the integral of the squared kernel,
bw
.
# NOT RUN {
kernel.squint("gaussian", 3)
# integral of squared Epanechnikov kernel with half-width h=1
h <- 1
bw <- h/kernel.factor("epa")
kernel.squint("epa", bw)
# }
Run the code above in your browser using DataLab