scoreplot.MFPCAfit: Plot the Scores of a Multivariate Functional Principal...

View source: R/MFPCAfit_methods.R

scoreplot.MFPCAfitR Documentation

Plot the Scores of a Multivariate Functional Principal Component Analysis

Description

This function plots two scores of a multivariate functional principal component analysis for each observation.

Usage

## S3 method for class 'MFPCAfit'
scoreplot(PCAobject, choices = 1:2, scale = FALSE, ...)

Arguments

PCAobject

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

choices

The indices of the scores that should by displayed. Defaults to 1:2, i.e. the scores corresponding to the two leading modes of variability in the data.

scale

Logical. Should the scores be scaled by the estimated eigenvalues to emphasize the proportions of total variance explained by the components. Defaults to FALSE.

...

Further parameters passed to the plot.default function.

Value

A bivariate plot of scores.

See Also

MFPCA

Examples

# 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 first two scores
scoreplot(PCA) # no scaling (default)
scoreplot(PCA, scale = TRUE) # scale the scores by the first two eigenvalues 

MFPCA documentation built on Sept. 15, 2022, 9:07 a.m.