# fdata2pls

0th

Percentile

##### Partial least squares components for functional data.

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

Keywords
multivariate
##### Usage
fdata2pls(fdataobj, y, ncomp = 2, lambda = 0, P = c(0, 0, 1), norm = TRUE, ...)
##### Arguments
fdataobj

fdata class object.

y

Scalar response with length n.

ncomp

The number of components to include in the model.

lambda

Amount of penalization. Default value is 0, i.e. no penalization is used.

P

If P is a vector: coefficients to define the penalty matrix object. By default $P=c(0,0,1)$ penalizes the second derivative (curvature) or acceleration. If P is a matrix: the penalty matrix object.

norm

If TRUE the fdataobj are centered and scaled.

Further arguments passed to or from other methods.

##### Details

If norm=TRUE, computes the PLS by NIPALS algorithm and the Degrees of Freedom using the Krylov representation of PLS, see Kraemer and Sugiyama (2011). If norm=FALSE, computes the PLS by Orthogonal Scores Algorithm and the Degrees of Freedom are the number of components ncomp, see Martens and Naes (1989).

##### Value

fdata2pls function return:

• df degree of freedom

• rotation fdata class object.

• x Is true the value of the rotated data (the centred data multiplied by the rotation matrix) is returned.

• fdataobj.cen The centered fdataobj object.

• mean mean of fdataobj.

• lVector of index of principal components.

• C The matched call.

• lambda Amount of penalization.

• P Penalty matrix.

##### References

Kraemer, N., Sugiyama M. (2011). The Degrees of Freedom of Partial Least Squares Regression. Journal of the American Statistical Association. Volume 106, 697-705.

Febrero-Bande, M., Oviedo de la Fuente, M. (2012). Statistical Computing in Functional Data Analysis: The R Package fda.usc. Journal of Statistical Software, 51(4), 1-28. http://www.jstatsoft.org/v51/i04/

Martens, H., Naes, T. (1989) Multivariate calibration. Chichester: Wiley.

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

• fdata2pls
##### Examples
# NOT RUN {
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)
# }

Documentation reproduced from package fda.usc, version 2.0.1, License: GPL-2

### Community examples

Looks like there are no examples yet.