Search code examples
rfunctional-programmingtime-seriesdata-miningpca

package "fdapace" (R) - How to access the principal components of the functional principal component analysis


After applying the FPCA() function of the "fdapace" package on a dataset, the function returns a FPCA object with various values and fields. Unfortunately I don't know which of those fields contain the Principal components and how to access them or plot them. I know that there is a documentation for the package but as a beginner it doesn't really help me(no criticism intended). You can find the documentation here: fdapace.pdf


Solution

  • The estimate of the functional principal components (FPCs) are saved in xiEst in the result list, a matrix each row of which is the FPCs for a subject in the data. You can make whatever plots you want with this information. See the following for an example.

    res = FPCA(Ly, Lt)

    res$xiEst # This is the matrix containing the FPC estimates.