Description Usage Arguments Value See Also Examples
View source: R/MFPCAfit_methods.R
Predict functions based on a truncated multivariate KarhunenLoeve representation:
\hat x = \hat mu + ∑_{m = 1}^M ρ_m \hat ψ_m
with estimated mean function \hat μ and principal components ψ_m. The scores ρ_m can be either estimated (reconstruction of observed functions) or userdefined (construction of new functions).
1 2 
object 
An object of class 
scores 
A matrix containing the score values. The number of columns in

... 
Arguments passed to or from other methods. 
A multiFunData
object containing the predicted functions.
MFPCA
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  #' # Simulate multivariate functional data on onedimensonal domains
# and calculate MFPCA (cf. MFPCA help)
set.seed(1)
# simulate data (onedimensional domains)
sim < simMultiFunData(type = "split", argvals = list(seq(0,1,0.01), seq(0.5,0.5,0.02)),
M = 5, eFunType = "Poly", eValType = "linear", N = 100)
# MFPCA based on univariate FPCA
PCA < MFPCA(sim$simData, M = 5, uniExpansions = list(list(type = "uFPCA"),
list(type = "uFPCA")))
# Reconstruct the original data
pred < predict(PCA) # default reconstructs data used for the MFPCA fit
# plot the results: 1st element
plot(sim$simData[[1]]) # original data
plot(pred[[1]], add = TRUE, lty = 2) # reconstruction
# plot the results: 2nd element
plot(sim$simData[[2]]) # original data
plot(pred[[2]], add = TRUE, lty = 2) # reconstruction

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.