Computes the complete or incomplete
kernel.moment(m, r, kernel = "gaussian")
Exponent (order of moment). An integer.
Upper limit of integration for the incomplete moment.
A numeric value or numeric vector.
Set r=Inf
to obtain the complete moment.
String name of the kernel.
Options are
"gaussian"
, "rectangular"
,
"triangular"
,
"epanechnikov"
,
"biweight"
,
"cosine"
and "optcosine"
.
(Partial matching is used).
A single number, or a numeric vector of the same length as r
.
Kernel estimation of a probability density in one dimension
is performed by density.default
using a kernel function selected from the list above.
For more information about these kernels,
see density.default
.
The function kernel.moment
computes the partial integral
c = kernel.factor(kernel)
.
# NOT RUN {
kernel.moment(1, 0.1, "epa")
curve(kernel.moment(2, x, "epa"), from=-1, to=1)
# }
Run the code above in your browser using DataLab