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

 Quantlet: regestp Description: Nadaraya-Watson estimator for multivariate regression. The computation uses WARPing.

Reference(s):
Wand/Jones (1995): Kernel Smoothing

 Usage: mh = regestp(x {,h {,K {,d}}}) Input: x n x (p+1), the data. In the first p columns the independent, in the last column the dependent variable. 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. Output: mh m x (p+1) matrix, the first p columns constitute a grid and the last column contains the regression estimate on that grid.

Note:
The WARPing enhances the speed of computation, but may lead to computational errors, if the bandwidth is small. For p<=2 WARPing is usually faster than exact computation. For p>2, the macro "regxestp" should be used instead.

Example:
```library("smoother")
library("plot")
;
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)
plot(mh,m)
setgopt(plotdisplay,1,1,"title","ROTATE!")

```
Result:
```The Nadaraya-Watson regession estimate (blue) using
Quartic kernel and bandwidth h=2 and the true
regression function (thin black crosses) are pictured.
```

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