funpca: Functional Principal Component Analysis

View source: R/funpca.R

funpcaR Documentation

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)


funpca documentation built on July 10, 2023, 2:03 a.m.