fda.usc (version 2.0.1)

S.basis: Smoothing matrix with roughness penalties by basis representation.

Description

Provides the smoothing matrix S with roughness penalties.

Usage

S.basis(tt, basis, lambda = 0, Lfdobj = vec2Lfd(c(0, 0)), w = NULL, ...)

Arguments

tt

Discretization points.

basis

Basis to use. See create.basis.

lambda

A roughness penalty. By default, no penalty lambda=0.

Lfdobj
w

Optional case weights.

Further arguments passed to or from other methods. Arguments to be passed by default to create.basis

Value

Return the smoothing matrix S.

Details

Provides the smoothing matrix S for the discretization points tt and bbasis with roughness penalties. If lambda=0 is not used penalty, else a basis roughness penalty matrix is caluclated using getbasispenalty.

References

Ramsay, James O. and Silverman, Bernard W. (2006). Functional Data Analysis, 2nd ed., Springer, New York.

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

See Also

See Also as S.np

Examples

Run this code
# NOT RUN {
np=101
tt=seq(0,1,len=np)

nbasis=11
base1 <- create.bspline.basis(c(0, np), nbasis)
base2 <- create.fourier.basis(c(0, np), nbasis)

S1<-S.basis(tt,basis=base1,lambda=3)
image(S1) 
S2<-S.basis(tt,basis=base2,lambda=3)
image(S2)
# }

Run the code above in your browser using DataLab