powered by
Nadaraya-Watson Kernel estimator
kernel.fit(Xint, Xvec, Yvec, bw, Kernel = "Ep", Wt = 1)
a vector of x interval to generate the local linear fit
numeric vectors of data values, Xvec and Yvec must have the same length.
a bandwidth of the 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.
a weight vector
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.
# NOT RUN { 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 ) # }
Run the code above in your browser using DataLab