kernel.function: kernel.function

Description Usage Arguments Details Value

Description

kernel.function calculates several kernel functions (uniform, triangle, epanechnikov, biweight, triweight, gaussian).

Usage

1
kernel.function(u, kernel = "normal", product = TRUE)

Arguments

u

n x d matrix

kernel

text string

product

or spherical kernel if d>1

Details

slightly modified version of the kernel.function from the gplm package. The kernel parameter is a text string specifying the univariate kernel function which is either the gaussian pdf or proportional to (1-|u|^p)^q. 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 K(u_1)...K(u_d) or by a spherical (radially symmetric) kernel proportional to K(||u||). (The resulting kernel is a density, i.e. integrates to 1.)

Value

matrix with diagonal elements set to x


PResiduals documentation built on June 24, 2021, 9:10 a.m.