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.
Value
gridpointA set of gridpoints.
mhDensity values corresponding to the set of gridpoints.
Details
$\frac{\sum^n_{i=1}K_h(x-x_i)y_i}{\sum^n_{j=1}K_h(x-x_j)}$,
where $K$ is a kernel function with a bandwidth h.
References
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.