Package 'funpca'

Title: Functional Principal Component Analysis
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>.
Authors: Francisco Rosales [aut, cph, cre], Tatyana Krivobokova [con, ths]
Maintainer: Francisco Rosales <[email protected]>
License: GPL-2
Version: 9.0
Built: 2024-11-05 04:27:30 UTC
Source: https://github.com/cran/funpca

Help Index


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 [email protected]

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 [email protected],

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)

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

funpca object.

...

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

funpca 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 [email protected]

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)