fpcscore {cvmaPLFAM} | R Documentation |
Calculate functional principal component (fpc) scores
Description
Conduct functional principal component analysis (FPCA) on the observation matrix of the functional predictor.
Usage
fpcscore(Z, nbasis, tt)
Arguments
Z |
An |
nbasis |
The number of basis functions used for spline approximation. |
tt |
The vector of recording/measurement points for the functional predictor. |
Value
A list
of
score |
An |
eigv |
A vector of estimated eigen-values related to FPCA. |
varp |
A vector of percents of variance explained related to FPCA. |
Examples
# Generate a recording/measurement matrix of the functional predictor
fddata = matrix(rnorm(1000), nrow = 10, ncol = 100)
tpoints = seq(0, 1, length.out = 100)
library(fda)
# Using 20 basis functions for spline approximation
fpcscore(fddata, nbasis = 20, tt = tpoints)
[Package cvmaPLFAM version 0.1.1 Index]