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: sker

Quantlet: looreg
Description: computes the Nadaraya-Watson leave-one-out estimator without binning using the quartic kernel. Prior to estimation, looreg sorts the data. The sorted data, along with the sorted leave-one-out regression estimates, are returned as an output.

Usage: {xs, mh} = looreg (x, y, h)
Input:
x n x p matrix, observations of explanatory variables
y n x 1 matrix, observations of the dependent variable
h n x p matrix. or 1 x p vector, or n x 1 vector, or scalar depending on whether one wants to use global or local bandwidth and if one uses the same bandwidth in all directions or one for each direction.
Output:
xy n x (p+1) matrix, the sorted data, the first p columns contain the sorted observations of the explanatory while the last column contains the sorted observations of the dependent variable
mh n x 1 matrix, the sorted leave-one-out regression estimates

Example:

library("smoother")

z=read("nicfoo")

x=z[,1]

y=z[,2]

h=0.5

{xy, mh} = looreg (x, y, h)          

dd=createdisplay(1,1)

show(dd,1,1,xy,xy[,1]~mh )

Result:

Computes the leave-one-out Nadaraya-Watson estimator 

of the regression of y on x for the nicfoo data. 


Library: smoother
See also: sker

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

Author: Axel Werwatz, 220197
(C) MD*TECH Method and Data Technologies, 21.9.2000