NadarayaWatsonkernel {bbemkr} | R Documentation |
Nadaraya (1964) and Watson (1964) proposed to estimate m
as a locally weighted average, using a kernel as a weighting function.
NadarayaWatsonkernel(x, y, h, gridpoint)
x |
A set of |
y |
A set of |
h |
Optimal bandwidth chosen by the user. |
gridpoint |
A set of gridpoints. |
\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
.
gridpoint |
A set of gridpoints. |
mh |
Density values corresponding to the set of gridpoints. |
Han Lin Shang
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.
x = rnorm(100) y = rnorm(100) NadarayaWatsonkernel(x, y, h = 2, gridpoint = seq(-3, 3, length.out = 100))