### Description

Nadaraya (1964) and Watson (1964) proposed to estimate m as a locally weighted average, using a kernel as a weighting function.

### Usage

NadarayaWatsonkernel(x, y, h, gridpoint)


### Arguments

 x A set of x observations. y A set of y observations. h Optimal bandwidth chosen by the user. gridpoint A set of gridpoints.

### Details

\frac{∑^n_{i=1}K_h(x-x_i)y_i}{∑^n_{j=1}K_h(x-x_j)}, where K is a kernel function with a bandwidth h.

### Value

 gridpoint A set of gridpoints. mh Density values corresponding to the set of gridpoints.

Han Lin Shang

### References

M. Rosenblatt (1956) Remarks on some nonparametric estimates of a density function, The Annals of Mathematical Statistics, 27(3), 832-837.

E. Parzen (1962) On estimation of a probability density function and mode, The Annals of Mathematical Statistics, 33(3), 1065-1076.

E. A. Nadaraya (1964) On estimating regression, Theory of probability and its applications, 9(1), 141-142.

G. S. Watson (1964) Smooth regression analysis, Sankhya: The Indian Journal of Statistics (Series A), 26(4), 359-372.

### Examples

x = rnorm(100)
y = rnorm(100)
NadarayaWatsonkernel(x, y, h = 2, gridpoint = seq(-3, 3, length.out = 100))


[Package bbemkr version 2.0 Index]