Type: | Package |
Title: | Functional Principal Component Analysis |
Version: | 9.0 |
Date: | 2023-06-08 |
Depends: | Brobdingnag, MASS, nlme, fda |
Description: | Functional principal component analysis under the Linear Mixed Models representation of smoothing splines. The method utilizes the Demmler-Reinsch basis and assumes error independence. For more details see: F. Rosales (2016) https://ediss.uni-goettingen.de/handle/11858/00-1735-0000-0028-87F9-6. |
License: | GPL-2 |
NeedsCompilation: | no |
Packaged: | 2023-06-14 22:49:53 UTC; arakata |
Author: | Francisco Rosales [aut, cph, cre], Tatyana Krivobokova [con, ths] |
Maintainer: | Francisco Rosales <francisco.rosales-marticorena@protonmail.com> |
Repository: | CRAN |
Date/Publication: | 2023-06-15 17:20:05 UTC |
Functional Principal Component Analysis
Description
Performs functional principal component analysis using the mixed models representation of smoothing splines.
Details
Package: | fpcamm |
Version: | 1.0 |
Date: | 2023-06-08 |
Depends: | Brobdingnag, MASS, nlme |
Index:
funpca Performs FPCA using the MM representation of penalized splines. plot.funpca Plots fitted curves: overall trend, subj spec deviations and derivative of the mean curve. summary.funpca Summary of individual fits.
The function funpca()
is used to fit the model. Using the resulting funpca
object, fitted curves or their derivatives can be plotted with plot
and summary information on the fit can be printed using summary
.
Author(s)
Francisco Rosales Maintainer: Francisco Rosales francisco.rosales-marticorena@protonmail.com
References
Rosales, F.
For more details see <https://ediss.uni-goettingen.de/handle/11858/00-1735-0000-0028-87F9-6>
See Also
fda
(package fda)
Functional Principal Component Analysis
Description
Performs functional principal component analysis using the mixed models representation of smoothing splines.
Usage
funpca(mat,k)
Arguments
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. |
Details
The method assumes DATA is a complete rectangular matrix and hence does not support missing values.
Value
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. |
Author(s)
Francisco Rosales francisco.rosales-marticorena@protonmail.com,
References
Rosales, F.
For more details see <https://ediss.uni-goettingen.de/handle/11858/00-1735-0000-0028-87F9-6>
See Also
fda
(package fda)
Examples
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)
Internal fpcamm objects
Description
Internal functions
Details
These are not to be called by the user
Value
No return value, called for side effects
Plot fitted components
Description
Plots fitted signals and shows acf/pacf for the each one. Additionally a plot for all curves is added at the beginning.
Usage
## S3 method for class 'funpca'
plot(x,...)
Arguments
x |
|
... |
Other arguments to be called by plot(). |
Details
Plot of the fitted results.
Value
The function returns the selected plots.
Author(s)
Francisco Rosales
References
Rosales, F.
For more details see <https://ediss.uni-goettingen.de/handle/11858/00-1735-0000-0028-87F9-6>
See Also
plot.funpca
(package funpca)
Examples
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)
plot(x)
funpca Summary
Description
Takes an funpca
object produced by funpca
and summarizes the information of the components fi (individual fits).
Usage
## S3 method for class 'funpca'
summary(object,...)
Arguments
object |
|
... |
further arguments to be passed to summary(). |
Value
The function gives basic statistics of the components resulting from applying funpca
.
Author(s)
Francisco Rosales francisco.rosales-marticorena@protonmail.com
References
Rosales, F. and Krivobokova, T.
For more details see <https://ediss.uni-goettingen.de/handle/11858/00-1735-0000-0028-87F9-6>
See Also
plot.funpca
(package funpca),
Examples
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)
summary(x)