plot.MFPCAfit: Plot MFPCA results

Description Usage Arguments Value See Also Examples

View source: R/MFPCAfit_methods.R

Description

Plots the eigenfunctions as perturbations of the mean (i.e. the mean function plus/minus a constant factor times each eigenfunction separately). If all elements have a one-dimensional domain, the plots can be combined, otherwise the effects of adding and subtracting are shown in two separate rows for each eigenfunction.

Usage

1
2
3
## S3 method for class 'MFPCAfit'
plot(x, plotPCs = seq_len(nObs(x$functions)),
  stretchFactor = NULL, combined = FALSE, ...)

Arguments

x

An object of class MFPCAfit, typically returned by the MFPCA function.

plotPCs

The principal components to be plotted. Defaults to all components in the MFPCAfit object.

stretchFactor

The factor by which the principal components are multiplied before adding / subtracting them from the mean function. If NULL (the default), the median absolute value of the scores of each eigenfunction is used.

combined

Logical: Should the plots be combined? (Works only if all dimensions are one-dimensional). Defaults to FALSE.

...

Further graphical parameters passed to the plot.funData functions for functional data.

Value

A plot of the principal components as perturbations of the mean.

See Also

MFPCA, plot.funData

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# Simulate multivariate functional data on one-dimensonal domains
# and calculate MFPCA (cf. MFPCA help)
set.seed(1)
# simulate data (one-dimensional 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")))

# Plot the results
plot(PCA, combined = TRUE) # combine addition and subtraction in one plot

MFPCA documentation built on May 2, 2019, 2:49 p.m.