fda.usc (version 1.5.0)

S.np: Smoothing matrix by nonparametric methods.

Description

Provides the smoothing matrix S for the discretization points tt by: Nadaraya-Watson kernel estimator (S.NW) with bandwidth parameter h. Local Linear Smoothing (S.LLR) with bandwidth parameter h . K nearest neighbors estimator (S.KNN) with parameter knn .

Usage

S.LLR(tt, h, Ker = Ker.norm,w=NULL,cv=FALSE)
S.NW(tt, h, Ker = Ker.norm,w=NULL,cv=FALSE)
S.KNN(tt,h=NULL,Ker=Ker.unif,w=NULL,cv=FALSE)

Arguments

tt

Vector of discretization points or distance matrix mdist

h

Smoothing parameter or bandwidth. In S.KNN, number of k-nearest neighbors.

Ker

Type of kernel used, by default normal kernel.

w

Optional case weights.

cv

=TRUE cross-validation is done.

Value

If S.LLR return the smoothing matrix by Local Linear Smoothing. If S.NW return the smoothing matrix by Nadaraya-Watson kernel estimator. If S.KNN return the smoothing matrix by k nearest neighbors estimator.

References

Ferraty, F. and Vieu, P. (2006). Nonparametric functional data analysis. Springer Series in Statistics, New York.

Wasserman, L. All of Nonparametric Statistics. Springer Texts in Statistics, 2006.

See Also

See Also as S.basis

Examples

Run this code
# NOT RUN {
tt=1:101
S=S.LLR(tt,h=5)
S2=S.LLR(tt,h=10,Ker=Ker.tri)
S3=S.NW(tt,h=10,Ker=Ker.tri)
S4=S.KNN(tt,h=5,Ker=Ker.tri)
par(mfrow=c(2,2))
image(S)
image(S2)
image(S3)
image(S4)

# }

Run the code above in your browser using DataLab