Learn R Programming

fdasrvf (version 2.3.6)

boxplot.fdawarp: Functional Boxplot

Description

This function computes the required statistics for building up a boxplot of the aligned functional data. Since the process of alignment provides separation of phase and amplitude variability, the computed boxplot can focus either on amplitude variability or phase variability.

Usage

# S3 method for fdawarp
boxplot(
  x,
  variability_type = c("amplitude", "phase"),
  alpha = 0.05,
  range = 1,
  what = c("stats", "plot", "plot+stats"),
  ...
)

# S3 method for ampbox boxplot(x, ...)

# S3 method for phbox boxplot(x, ...)

# S3 method for curvebox boxplot(x, ...)

Value

If what contains stats, a list containing the computed statistics necessary for drawing the boxplot. Otherwise, the function simply draws the boxplot and no object is returned.

Arguments

x

An object of class fdawarp typically produced by time_warping() or of class ampbox or phbox typically produced by boxplot.fdawarp().

variability_type

A string specifying which kind of variability should be displayed in the boxplot. Choices are "amplitude" or "phase". Defaults to "amplitude".

alpha

A numeric value specifying the quantile value. Defaults to \(0.05\) which uses the \(95\%\) quantile.

range

A positive numeric value specifying how far the plot whiskers extend out from the box. The whiskers extend to the most extreme data point which is no more than range times the interquartile range from the box. Defaults to 1.0.

what

A string specifying what the function should return. Choices are "plot", "stats" or "plot+stats". Defaults to "stats".

...

Unused here.

Details

The function boxplot.fdawarp() returns optionally an object of class either ampbox if variability_type = "amplitude" or phbox if variability_type = "phase". S3 methods specialized for objects of these classes are provided as well to avoid re-computation of the boxplot statistics.

Examples

Run this code
if (FALSE) {
out <- time_warping(simu_data$f, simu_data$time)
boxplot(out, what = "stats")
}

Run the code above in your browser using DataLab