Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

CreateModeOfVarPlot

Functional Principal Component Analysis: Mode of variation plot


Description

Creates the k-th mode of variation plot around the mean. The red-line is the functional mean, the grey shaded areas show the range of variation around the mean: +/- Q sqrt{lambda_k} phi_k for the dark grey area Q = 1, and for the light grey are Q = 2. In the case of 'rainbowPlot' the blue edge corresponds to Q = -3, the green edge to Q = +3 and the red-line to Q = 0 (the mean).

Usage

CreateModeOfVarPlot(
  fpcaObj,
  k = 1,
  rainbowPlot = FALSE,
  colSpectrum = NULL,
  ...
)

Arguments

fpcaObj

An FPCA class object returned by FPCA().

k

The k-th mode of variation to plot (default k = 1)

rainbowPlot

Indicator to create a rainbow-plot instead of a shaded plot (default: FALSE)

colSpectrum

Character vector to be use as input in the 'colorRampPalette' function defining the outliers colours (default: c("blue","red", "green"), relevant only for rainbowPlot=TRUE)

...

Additional arguments for the plot function.

Examples

set.seed(1)
n <- 20
pts <- seq(0, 1, by=0.05)
sampWiener <- Wiener(n, pts)
sampWiener <- Sparsify(sampWiener, pts, 10)
res <- FPCA(sampWiener$Ly, sampWiener$Lt, 
            list(dataType='Sparse', error=FALSE, kernel='epan', verbose=TRUE))
CreateModeOfVarPlot(res)

fdapace

Functional Data Analysis and Empirical Dynamics

v0.5.6
BSD_3_clause + file LICENSE
Authors
Cody Carroll [aut, cre] (<https://orcid.org/0000-0003-3525-8653>), Alvaro Gajardo [aut], Yaqing Chen [aut], Xiongtao Dai [aut], Jianing Fan [aut], Pantelis Z. Hadjipantelis [aut], Kyunghee Han [aut], Hao Ji [aut], Shu-Chin Lin [ctb], Paromita Dubey [ctb], Hans-Georg Mueller [cph, ths, aut], Jane-Ling Wang [cph, ths, aut]
Initial release
2021-01-10,

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.