CreateFuncBoxPlot: Create functional boxplot using 'bagplot', 'KDE' or...

View source: R/CreateFuncBoxPlot.R

CreateFuncBoxPlotR Documentation

Create functional boxplot using 'bagplot', 'KDE' or 'pointwise' methodology

Description

Using an FPCA object create a functional box-plot based on the function scores. The green line corresponds to the functional median, the dark gray area to the area spanned by the curves within the 25th and 75-th percentile and the light gray to the area spanned by the curves within the 2.5th and 97.5-th percentile.

Usage

CreateFuncBoxPlot(fpcaObj, optns = list(), ...)

Arguments

fpcaObj

An object of class FPCA returned by the function FPCA().

optns

A list of options control parameters specified by list(name=value). See ‘Details’.

...

Additional arguments for the 'plot' function.

Details

Available control options are

ifactor

inflation ifactor for the bag-plot defining the loop of bag-plot or multiplying ifactor the KDE pilot bandwidth matrix. (see ?aplpack::compute.bagplot; ?ks::Hpi respectively; default: 2.58; 2 respectively).

variant

string defining the method used ('KDE', 'pointwise' or 'bagplot') (default: 'bagplot')

unimodal

logical specifying if the KDE estimate should be unimodal (default: FALSE, relevant only for variant='KDE')

addIndx

vector of indices corresponding to which samples one should overlay (Default: NULL)

K

integer number of the first K components used for the representation. (default: length(fpcaObj$lambda ))

References

P. J. Rousseeuw, I. Ruts, J. W. Tukey (1999): The bagplot: a bivariate boxplot, The American Statistician, vol. 53, no. 4, 382-387

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))
CreateFuncBoxPlot(res, list(addIndx=c(1:3)) )

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