kernel.fit {npmlda} | R Documentation |
Nadaraya-Watson Kernel estimator
Description
Nadaraya-Watson Kernel estimator
Usage
kernel.fit(Xint, Xvec, Yvec, bw, Kernel = "Ep", Wt = 1)
Arguments
Xint |
a vector of x interval to generate the local linear fit |
Xvec , Yvec |
numeric vectors of data values, Xvec and Yvec must have the same length. |
bw |
a bandwidth of the kernel |
Kernel |
a character string indicating which kernel function is to be used. Use of "Ep", "Bw", or "Nm" for Epanechnikov, Biweight or Normal kernel function. |
Wt |
a weight vector |
References
Fan, J. and Gijbels, I. Local Polynomial Modeling and Its Applications. Chapman & Hall, London, United Kingdom, 1996.
Wu, C.O. and Tian, X. Nonparametric Models for Longitudinal Data. Chapman & Hall/CRC. To appear.
Examples
X <- seq(0, 1, len=100)
Y <- (X- 0.5)^3 - 2*(X-0.5)^2+ rnorm(100, 0, 0.1)
kernel.fit(seq(0,1,0.1), X, Y, Kernel="Ep", bw=0.1, Wt=1 )
[Package npmlda version 1.0.0 Index]