plot.mFPCA: Plot the results of the Mixed Functional Principal Component...

View source: R/FRTM_plot_functions.R

plot.mFPCAR Documentation

Plot the results of the Mixed Functional Principal Component Analysis (mFPCA)

Description

This function provides plots of the principal components of the mFPCA.

Usage

## S3 method for class 'mFPCA'
plot(x, ...)

Arguments

x

The output of mFPCA.

...

A variable type could be provided that can assume two values. If type="single", the principal components are plotted separately. If type="all", the principal components are plotted together.

Value

No return value, called for side effects.

Examples

library(funcharts)

data <- simulate_data_FRTM(n_obs = 100)
X <- sapply(1:100, function(ii)
  data$x_true[[ii]])
x_fd <-
  fda::smooth.basis(y = X,
                    argvals =  data$grid,
                    fda::create.bspline.basis(c(0, 1), 30))$fd
H <- sapply(1:100, function(ii)
  data$h[[ii]])
h_fd <-
  fda::smooth.basis(y = H,
                    argvals =  data$grid,
                    fda::create.bspline.basis(c(0, 1), 30))$fd
mod_mFPCA <- mFPCA(x_fd, h_fd, ncom = "ptv", par_ncom = 0.95)
plot(mod_mFPCA)


funcharts documentation built on April 3, 2025, 7:47 p.m.