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.
# 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, ...)
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.
An object of class fdawarp
typically produced by time_warping()
or of class ampbox
or phbox
typically produced by boxplot.fdawarp()
.
A string specifying which kind of variability should
be displayed in the boxplot. Choices are "amplitude"
or "phase"
.
Defaults to "amplitude"
.
A numeric value specifying the quantile value. Defaults to \(0.05\) which uses the \(95\%\) quantile.
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
.
A string specifying what the function should return. Choices are
"plot"
, "stats"
or "plot+stats"
. Defaults to "stats"
.
Unused here.
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.
if (FALSE) {
out <- time_warping(simu_data$f, simu_data$time)
boxplot(out, what = "stats")
}
Run the code above in your browser using DataLab