Learn R Programming

fda.usc (version 0.9.4)

fdata2pls: Partial least squares components for functional data.

Description

Compute partial least squares (PLS) components for functional data.

Usage

fdata2pls(fdataobj,y,ncomp=2,...)
dA(w, A, dw)
vvtz(v, z)
dvvtz(v, z, dv, dz)

Arguments

fdataobj
fdata class object.
y
Scalar response with length n.
ncomp
The number of components to include in the model.
...
Further arguments passed to or from other methods.
w,A,dw,v,z,dv,dz
Auxiliary arguments

Value

  • fdata2pls function return:
  • rotationfdata class object.
  • xIs true the value of the rotated data (the centred data multiplied by the rotation matrix) is returned.
  • fdataobj.cenThe centered fdataobj object.
  • meanmean of fdataobj.
  • lVector of index of principal components.
  • CThe matched call.

Details

The partial least squares are calculated by NIPALS algorithm.

References

Preda C. and Saporta G. PLS regression on a stochastic process. Comput. Statist. Data Anal. 48 (2005): 149{-}158. Kraemer, N., Sugiyama M. (2011). The Degrees of Freedom of Partial Least Squares Regression. Journal of the American Statistical Association. Volume 106, 697-705.

See Also

Used in: fregre.pls, fregre.pls.cv. Alternative method: fdata2pc.

Examples

Run this code
n= 500;tt= seq(0,1,len=101)
x0<-rproc2fdata(n,tt,sigma="wiener")
x1<-rproc2fdata(n,tt,sigma=0.1)
x<-x0*3+x1
beta = tt*sin(2*pi*tt)^2
fbeta = fdata(beta,tt)
y<-inprod.fdata(x,fbeta)+rnorm(n,sd=0.1)
pls1=fdata2pls(x,y)
norm.fdata(pls1$rotation)

Run the code above in your browser using DataLab