kernel.function {gplm} | R Documentation |
Kernel function
Description
Calculates several kernel functions (uniform, triangle, epanechnikov, biweight, triweight, gaussian).
Usage
kernel.function(u, kernel = "biweight", product = TRUE)
Arguments
u |
n x d matrix |
kernel |
text string |
product |
(if d>1) product or spherical kernel |
Details
The kernel parameter is a text string specifying
the univariate kernel function which is either the gaussian pdf
or proportional to .
Possible text strings are "triangle" (p=q=1),
"uniform" (p=1, q=0), "epanechnikov" (p=2, q=1),
"biweight" or "quartic" (p=q=2),
"triweight" (p=2, q=3), "gaussian" or "normal" (gaussian pdf).
The multivariate kernels are obtained by a
product of unvariate kernels
or by a spherical (radially symmetric) kernel
proportional to
. (The resulting kernel
is a density, i.e. integrates to 1.)
Value
n x 1 vector of kernel weights
Author(s)
Marlene Mueller
Examples
kernel.function(0) ## default (biweight)
kernel.function(0, kernel="epanechnikov") ## epanechnikov
kernel.function(0, kernel="gaussian") ## equals dnorm(0)
[Package gplm version 0.7-4 Index]