funpca | R Documentation |
Performs functional principal component analysis using the mixed models representation of smoothing splines.
funpca(mat,k)
mat |
Is a rectangular matrix with no missing values.Each colum represents a sample. |
k |
Desired number of eigen functions to construct subj spec deviations. Should be between 1 and the sample size. |
The method assumes DATA is a complete rectangular matrix and hence does not support missing values.
A list object of class funpca
containing the following information.
est |
Mixed model estimation |
f |
A matrix with the fitted overall trend. All columns contain the same information |
di |
A matrix with the fitted subj spec deviations |
fi |
Fitted values for each subject, i.e. fitted overall trend + fitted subj spec deviations + subj spec seasonality. |
error |
Remainder component for each subject. |
residuals |
Remainder component for each subject. |
y |
Data used for all the computations. |
call |
Call of funpca. |
Francisco Rosales francisco.rosales-marticorena@protonmail.com,
Rosales, F.
For more details see <https://ediss.uni-goettingen.de/handle/11858/00-1735-0000-0028-87F9-6>
fda
(package fda)
library(fda)
sdata <- NULL
data <- CanadianWeather$monthlyTemp
for(i in 1:ncol(data)) sdata <- cbind(sdata,spline(data[,i])$y)
x <- funpca(sdata, k=3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.