data: An n×p-dimensional data matrix for functional data X(s), where n denotes the sample size and p denotes the number of grid points for X(s).
nbasis: An integer specifying the number of B-spline basis expansion functions used to approximate the functional principal components.
ncomp: An integer specifying the number of functional principal components to be computed.
gp: A vector containing the grid points for the functional data for X(s).
emodel: Method to be used for functional principal component decomposition. Possibilities are "classical" and "robust".
Details
The functional principal decomposition of a functional data X(s) is given by
X(s)=Xˉ(s)+k=1∑Kξkψk(s),
where Xˉ(s) is the mean function, ψk(s) is the k-th weight function, and ξk is the corresponding principal component score which is given by
ξk=∫(X(s)−Xˉ(s))ψk(s)ds.
When computing the estimated functional principal components, first, the functional data is expressed by a set of B-spline basis expansion. Then, the functional principal components are equal to the principal components extracted from the matrix Dφ1/2, where D is the matrix of basis expansion coefficients and φ is the inner product matrix of the basis functions, i.e., φ=∫φ(s)φ⊤(s)ds. Finally, the k-th weight function is given by ψk(s)=φ−1/2ak, where ak is the k-th eigenvector of the sample covariance matrix of Dφ1/2.
If emodel = "classical", then, the standard functional principal component decomposition is used as given by Ramsay and Dalzell (1991).
If emodel = "robust", then, the robust principal component algorithm of Hubert, Rousseeuw and Verboven (2002) is used.
Returns
A list object with the following components: - PCAcoef: A functional data object for the eigenfunctions.
PCAscore: A matrix of principal component scores.
meanScore: A functional data object for the mean function.
bs_basis: A functional data object for B-spline basis expansion.
evalbase: A matrix of the B-spline basis expansion functions.
ncomp: An integer denoting the computed number of functional principal components. If the input ```ncomp'' is NULL, then, the output ncomp` equals to the number of functional principal components whose usage results in at least 95% explained variation.
gp: A vector containing the grid points for the functional data for X(s).
emodel: A character vector denoting the method used for functional principal component decomposition.
References
J. O. Ramsay and C. J. Dalzell (1991) "Some tools for functional data analysis (with discussion)", Journal of the Royal Statistical Society: Series B, 53 (3), 539-572.
M. Hubert and P. J. Rousseeuw and S. Verboven (2002) "A fast robust method for principal components with applications to chemometrics", Chemometrics and Intelligent Laboratory Systems, 60 (1-2), 101-111.
J. L. Bali and G. Boente and D. E. Tyler and J.-L. Wang (2011) "Robust functional principal components: A projection-pursuit approach", The Annals of Statistics, 39 (6), 2852-2882.