View source: R/MFPCAfit_methods.R
screeplot.MFPCAfit | R Documentation |
This function plots the proportion of variance explained by the leading eigenvalues in an MFPCA against the number of the principal component.
## S3 method for class 'MFPCAfit' screeplot( x, npcs = min(10, length(x$values)), type = "lines", ylim = NULL, main = deparse(substitute(x)), ... )
x |
An object of class MFPCAfit, typically returned by a call to
|
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
|
ylim |
The limits for the y axis. Can be passed either as a vector
of length 2 or as |
main |
The title of the plot. Defaults to the variable name of
|
... |
Other graphic parameters passed to
|
A screeplot, showing the decrease of the principal component score.
MFPCA
, screeplot
# 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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.