Description Details Symmetric kernels Asymmetric kernels Structure References See Also Examples
Kernel functions are an important part of kdensity
. This document
lists the available built-in functions and the structure of them. Any kernel
in the list can be used in kdensity
by using kernel = "kernel"
for the intended kernel.
Be careful combining kernels with compact support with parametric starts,
as the normalizing integral typically fails to converge. Use gaussian
instead.
gaussian, normal
: The Gaussian kernel. The default argument when
starts
is supported on R.
epanechnikov, rectangular (uniform), triangular, biweight, cosine, optcosine
: Standard symmetric kernels, also used in
stats::density()
.
tricube, triweight
: Standard symmetric kernels. Not supported by
stats::density()
.
laplace
: Uses the Laplace density, also known as the double
exponential density.
gamma, gamma_biased
: The gamma kernel of Chen (2000). For use on the positive
half-line. gamma
is the recommended biased-corrected kernel.
gcopula
: The Gaussian copula kernel of Jones & Henderson (2007). For use
on the unit interval.
beta, beta_biased
: The beta kernel of Chen (1999). For use on the unit interval.
beta
is the recommended bias-corrected kernel.
A kernel is a list containing two mandatory elements and one optional
element. The mandatory element 'kernel
' is the kernel function.
It takes arguments y, x, h
, where x
is the data supplied
to kdensity
and y
is the point of evaluation. h
is
the bandwidth. Internally, the kernel function is evaluated as
1/h*kernel(y, x, h)
. It should be vectorized in x
, but
vectorization in y
is not needed.
The second mandatory element is support
, stating the domain of
definition for the kernel. This is used to distinguish kernels on the
unit interval / positive half-line from kernels on R.
sd
is used for symmetric kernels, and states the standard error
of the kernel. This is used to make kernels comparable to the Gaussian
kernel when calculating bandwidths.
Chen, Song Xi. "Probability density function estimation using gamma kernels." Annals of the Institute of Statistical Mathematics 52.3 (2000): 471-480. Jones, M. C., and D. A. Henderson. "Kernel-type density estimation on the unit interval." Biometrika 94.4 (2007): 977-984. Chen, Song Xi. "Beta kernel estimators for density functions." Computational Statistics & Data Analysis 31.2 (1999): 131-145.
kdensity()
; parametric_starts()
;
bandwidths()
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.