screeplot.MFPCAfit: Screeplot for Multivariate Functional Principal Component...

Description Usage Arguments See Also Examples

View source: R/MFPCAfit_methods.R

Description

This function plots the proportion of variance explained by the leading eigenvalues in an MFPCA against the number of the principal component.

Usage

1
2
3
## S3 method for class 'MFPCAfit'
screeplot(x, npcs = min(10, length(x$values)),
  type = "lines", ylim = NULL, main = deparse(substitute(x)), ...)

Arguments

x

An object of class MFPCAfit, typically returned by a call to MFPCA.

npcs

The number of eigenvalued to be plotted. Defaults to all eigenvalues if their number is less or equal to 10, otherwise show only the leading first 10 eigenvalues.

type

The type of screeplot to be plotted. Can be either "lines" or "barplot". Defaults to "lines".

ylim

The limits for the y axis. Can be passed either as a vector of length 2 or as NULL (default). In the second case, ylim is set to (0,max(pve)), with pve the proportion of variance explained by the principal components to be plotted.

main

The title of the plot. Defaults to the variable name of x.

...

Other graphic parameters passed to plot.default (for type = "lines") or barplot (for type = "barplot").

See Also

MFPCA, screeplot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# 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")))

# screeplot
screeplot(PCA) # default options
screeplot(PCA, npcs = 3, type = "barplot", main= "Screeplot")

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