Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

fdata2pc

Principal components for functional data


Description

Compute (penalized) principal components for functional data.

Usage

fdata2pc(fdataobj, ncomp = 2, norm = TRUE, lambda = 0, P = c(0, 0, 1), ...)

Arguments

fdataobj

fdata class object.

ncomp

Number of principal comoponents.

norm

=TRUE the norm of eigenvectors (rotation) is 1.

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) penalize the second derivative (curvature) or acceleration. If P is a matrix: the penalty matrix object.

...

Further arguments passed to or from other methods.

Details

Smoothing is achieved by penalizing the integral of the square of the derivative of order m over rangeval:

  • m = 0 penalizes the squared difference from 0 of the function

  • m = 1 penalize the square of the slope or velocity

  • m = 2 penalize the squared acceleration

  • m = 3 penalize the squared rate of change of acceleration

Value

  • d The standard deviations of the functional principal components.

  • rotation are also known as loadings. A fdata class object whose rows contain the eigenvectors.

  • x are also known as scores. The value of the rotated functional data is returned.

  • fdataobj.cen The centered fdataobj object.

  • mean The functional mean of fdataobj object.

  • l Vector of index of principal components.

  • C The matched call.

  • lambda Amount of penalization.

  • P Penalty matrix.

Author(s)

Manuel Febrero-Bande, Manuel Oviedo de la Fuente manuel.oviedo@usc.es

References

Venables, W. N. and B. D. Ripley (2002). Modern Applied Statistics with S. Springer-Verlag.

N. Kraemer, A.-L. Boulsteix, and G. Tutz (2008). Penalized Partial Least Squares with Applications to B-Spline Transformations and Functional Data. Chemometrics and Intelligent Laboratory Systems, 94, 60 - 69. http://dx.doi.org/10.1016/j.chemolab.2008.06.009

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/

See Also

See Also as svd and varimax.

Examples

## Not run: 
 n= 100;tt= seq(0,1,len=51)
 x0<-rproc2fdata(n,tt,sigma="wiener")
 x1<-rproc2fdata(n,tt,sigma=0.1)
 x<-x0*3+x1
 pc=fdata2pc(x,lambda=1)
 summary(pc)
 
## End(Not run)

fda.usc

Functional Data Analysis and Utilities for Statistical Computing

v2.0.2
GPL-2
Authors
Manuel Febrero Bande [aut], Manuel Oviedo de la Fuente [aut, cre], Pedro Galeano [ctb], Alicia Nieto [ctb], Eduardo Garcia-Portugues [ctb]
Initial release
2020-02-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.