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: lregxestp Description: estimates a multivariate regression function using local linear kernel regression with Quartic kernel.

Reference(s):
Fan, J. and Gijbels, I. (1995). Data-driven bandwidth selection in local polynomial fitting: Variable bandwidth and spatial adaption. Journal of the Royal Statistical Society B, 57(2), pp. 371-394.

 Usage: mh = lregxestp(x {,h {,v} }) Input: x n x (k+1), the data. The independent variables are contained in the first k columns and the dependent variable in the last one. h optional scalar or k x 1 vector of bandwidth. If not given, 20% of the volume of x[,1:k] is used as default. v optional m x k matrix, values of the independent variable in which to compute the regression. If not given and k < 4, a grid of length 100 (k = 1), length 30 (k = 2) or length 8 (k = 3) is used. If k >= 4 then v is set to (sorted) x. Output: mh n x (k+1) or m x (k+1) matrix; the first k columns contain the sorted x[,1:k], the sorted grid or the sorted v and the last column contains the regression estimate given at the values of the first k columns.

Note:
This function does an exact computation, i.e., requires O(n^2) operations for estimating the regression function on all observations. For dimensions larger than 2 this is usually faster than the WARPing method used in "lregestp".

Example:
```library("smoother")
library("plot")
;
x = 2.*pi.*(uniform(200,2)-0.5)  ; independent variable
m = sum(cos(x),2)                ; true function
e = uniform(200)-0.5             ; error term
x = x~(m+e)
;
mh = lregxestp(x,2)              ; estimate function
plot(x,mh)                       ; surface plot
setgopt(plotdisplay,1,1,"title","ROTATE!")

```
Result:
```The local linear regression estimate (blue line) using
Quartic kernel and bandwidth h = 2 and the data are
pictured.
```

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