kernel.fit: Nadaraya-Watson Kernel estimator

Description Usage Arguments References Examples

View source: R/kernel.R

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   )

npmlda documentation built on Feb. 12, 2018, 5:01 p.m.