CreateModeOfVarPlot: Functional Principal Component Analysis: Mode of variation...

View source: R/CreateModeOfVarPlot.R

CreateModeOfVarPlotR Documentation

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)

functionaldata/tPACE documentation built on Aug. 16, 2022, 8:27 a.m.