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.