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: smoother
See also: regestp lpregest lregxestp

Quantlet: lregestp
Description: estimates a multivariate regression function using local linear kernel regression. The computation uses WARPing.


Usage: mh = lregestp(x {,h {,K {,d}}})
x n x (p+1), the data. They contain the independent variables in the first p columns and the dependent variable in the last column.
h scalar or p x 1 vector, bandwidth. If not given, 20% of the volume of x[,1:p] is used.
K string, kernel function on [-1,1]^p. If not given, the product Quartic kernel "qua" is used.
d scalar, discretization binwidth. d[i] must be smaller than h[i]. If not given, the minimum of h/3 and (max(x)-min(x))'/r, with r=100 for p=1, and r=(1000^(1/p)) for p>1 is used.
mh m x (p+1) matrix, the first p columns constitute a grid and the last column contains the regression estimate on that grid.


x = 4.*pi.*(uniform(400,2)-0.5)
m = sum(cos(x),2)
e = uniform(400)-0.5
x = x~(m+e)
mh = regestp(x,2)
mh = setmask(mh, "surface","blue")
m  = setmask(x[,1:2]~m,"black","cross","small")

The Local Linear regession estimate (blue) using
Quartic kernel and bandwidth h=2 and the true
regression function (thin black crosses) are pictured.

Author: M. Mueller, 20010529
(C) MD*TECH Method and Data Technologies, 05.02.2006