mfpca {Funclustering}R Documentation

Multivariate functional pca

Description

This function runs a weighted functional pca in the univariate and multivariate cases. If the observations (the curves) are given with weights, set up the parameter tik.

Usage

mfpca(fd, nharm, tik = numeric(0))

Arguments

fd

in the univariate case fd is an object from a class fd. Otherwise in the multivariate case fd is a list of fd object (fd=list(fd1,fd2,..)).

nharm

number of harmonics or principal component to be retain.

tik

the weights of the functional pca which corresponds to the weights of the curves. If not given, a classic functional pca (without weighting the curves) is performed.

Value

With univariate functional data, the function returns an object of class pca.fd, With multivariate data, a list of pca.fd object is returned. The pca.fd class contains the folowing parameters:

Examples

data(growth)
data = cbind(matrix(growth$hgtm, 31, 39), matrix(growth$hgtf, 31, 54));
t = growth$age;
splines <- create.bspline.basis(rangeval = c(1, max(t)), nbasis = 20, norder = 4);
fd <- Data2fd(data, argvals = t, basisobj = splines);
pca = mfpca(fd, nharm = 2)
summary(pca)

[Package Funclustering version 1.0.3 Index]