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

Group: Statistical Data Analysis
Topic: Nonparametric Methods
See also: isoreg sknn rmed l1line lowess ngau

Function: sker
Description: sker computes a direct kernel estimate without binning from scatter plot data.

Reference(s):

Usage: z = sker (x, h, K, y {, xest})
Input:
x n x p x d1 x ... x dn array representing the data of the explanatory variable
h 1 x p x d1 x ... x dn array, global bandwidth, or k x p x d1 x ... x dn array, local bandwidth, the smoothing parameter
K text (specifies the kernel function which should be used)
y n x m x d1 x ... x dn array representing the data of the dependent variable
xest k x p x d1 x ... x dn array (optional), specifies the point of estimation. If this parameter is not given the values of x will be used for xest.
Output:
z k x m x d1 x ... x dn array

Note:

Example:
library("kernel")        ; loading the quartic kernel
x = 2.*uniform(100)-1
x = sort(x)
y = 5*x^2+0.5*normal(100)
d = createdisplay(2,1)
r = sker(x, 0.25, "qua", y)
f = sker(x, 0.25, "qua", matrix(100))
mh = r./f                ; nadaraya-watson estimator on x
mh = x~mh
setmaskp(mh, 1, 10, 8)
show(d, 1, 1, x~y, mh)
; continuing using xest
xest = 2.*(0:100)/100-1
r = sker(x, 0.25, "qua", y, xest)
f = sker(x, 0.25, "qua", matrix(100), xest)
mh = r./f                ; nadaraya-watson estimator on xest
mh = xest~mh
setmaskp(mh, 1, 10, 8)
show(d, 2, 1, x~y, mh)

Result:
n/a



(C) MD*TECH Method and Data Technologies, 05.02.2006