NW.WtKernel: Title Nadaraya-Watson Kernel estimator at x0

Description Usage Arguments Value References Examples

Description

Title Nadaraya-Watson Kernel estimator at x0

Usage

1
NW.WtKernel(Xvec, Yvec, X0, Kernel = "Ep", Bndwdth, Wt = 1)

Arguments

Xvec, Yvec

numeric vectors of data values, Xvec and Yvec must have the same length.

X0

a given value

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.

Bndwdth

a bandwidth of the kernel

Wt

a weight vector or a constant. For longitudinal data, Wt=1/N corresponds to measurement uniform weight and Wt=1/(nni) corresponds subject uniform weight.

Value

The kernel estimator at x0

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
4
X <- seq(0, 1, len=100)
Y <- (X- 0.5)^3 - 2*(X-0.5)^2+ rnorm(100, 0, 0.1)
NW.WtKernel(X, Y,  X0=0.5, Kernel="Ep", Bndwdth=0.3, Wt=1 )
NW.WtKernel(X, Y,  X0=0.5, Kernel="Nm", Bndwdth=0.3, Wt=1 )

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

Related to NW.WtKernel in npmlda...