kernel.fit: Nadaraya-Watson Kernel estimator

Description Usage Arguments References Examples

Description

Nadaraya-Watson Kernel estimator

Usage

1
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

  1. Fan, J. and Gijbels, I. Local Polynomial Modeling and Its Applications. Chapman & Hall, London, United Kingdom, 1996.

  2. Wu, C.O. and Tian, X. Nonparametric Models for Longitudinal Data. Chapman & Hall/CRC. To appear.

Examples

1
2
3
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   )

Example output

 [1] -0.563036954 -0.386253181 -0.186116970 -0.103224562  0.008686797
 [6]  0.043631208  0.015269123 -0.051506490 -0.150086240 -0.266147667
[11] -0.325700692

npmlda documentation built on May 2, 2019, 12:54 a.m.

Related to kernel.fit in npmlda...