Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: kernel
See also: rkernpq repa rtri rtrian runi qua

Quantlet: rqua
Description: computes the radial quartic kernel

Usage: y = rqua (x)
Input:
x n x d matrix of user-defined data for which the kernel is to be computed
Output:
y n x 1 matrix containing the radial quartic kernel

Example:
library("kernel")	; load library kernel
d  = 3			; choose dimension
n  = 1000		; choose n points uniformly in [-1,1]^d
x  = 2*uniform(n,d)-1
y  = rqua(x)		; compute kernel values
; approximate the integral about the kernel
; function in [-1,1]^d
sum(y.*2^d/n)

Result:
Independent of d you should get approximately 1 as result.
Note that for higher dimensions n has to be increased!
Example:
library("kernel")	; load kernel library
library("plot")		; load plot library
d  = 2			; choose dimension
o  = matrix(d)		; create uniform grid in [-1,1]^d
n  = 50.*o
h  = 2/(n-1).*o
x0 = -o
x  = grid(x0, h, n)
y  = rqua(x) 		; compute kernel values
plot(x~y)		; show kernel function(d<3)

Result:
Shows the radial quartic kernel. Note that d can only
take the values d=1 or d=2 to show something useful!



Author: S. Klinke, 20011031
(C) MD*TECH Method and Data Technologies, 05.02.2006