CreateOutliersPlot: Functional Principal Component or Functional Singular Value...

Description Usage Arguments Details Value References Examples

View source: R/CreateOutliersPlot.R

Description

This function will create, using the first components scores, a set of convex hulls of the scores based on 'bagplot' or 'KDE' methodology.

Usage

1
CreateOutliersPlot(fObj, optns = NULL, ...)

Arguments

fObj

A class object returned by FPCA() or FSVD().

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 outlier method used ('KDE', 'NN' or 'bagplot') (default: 'KDE')

unimodal

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

maxVar

logical specifying if during slicing we should used the directions of maximum variance (default: FALSE for FPCA, TRUE for FSVD)

nSlices

integer between 3 and 16, denoting the number of slices to be used (default: 4, relevant only for groupingType='slice')

showSlices

logical specifying if during slicing we should show the outline of the slice (default: FALSE)

colSpectrum

character vector to be use as input in the 'colorRampPalette' function defining the outliers colours (default: c("red", "yellow", 'blue'), relevant only for groupingType='slice')

groupingType

string specifying if a slice grouping ('slice') or a standard percentile/bagplot grouping ('standard') should be returned (default: 'standard')

fIndices

a two-component vector with the index of the mode of variation to consider (default: c(1,2) for FPCA and c(1,1) for FSVD)

Value

An (temporarily) invisible copy of a list containing the labels associated with each of sample curves.

References

P. J. Rousseeuw, I. Ruts, J. W. Tukey (1999): The bagplot: a bivariate boxplot, The American Statistician, vol. 53, no. 4, 382-387 R. J. Hyndman and H. L. Shang. (2010) Rainbow plots, bagplots, and boxplots for functional data, Journal of Computational and Graphical Statistics, 19(1), 29-45

Examples

1
2
3
4
5
6
7
8
set.seed(1)
n <- 420
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))
CreateOutliersPlot(res)

fdapace documentation built on May 24, 2021, 9:06 a.m.