View source: R/functional_boxplot.R
functional_boxplot | R Documentation |
This function finds outliers in a sample of curves using the functional boxplot by Sun and Genton (2011) \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1198/jcgs.2011.09224")}. Unlike the name suggests, the function does not actually produce a plot but is only used as support in finding outliers in other functions. Different depth and outlyingness methods are supported for ordering functions. Alternatively, the depth values of the functions can be supplied directly.
functional_boxplot(
dts,
depth_method = c("mbd", "tvd", "extremal", "dirout", "linfinity", "bd", "erld", "dq"),
depth_values = NULL,
emp_factor = 1.5,
central_region = 0.5,
erld_type = NULL,
dq_quantiles = NULL
)
dts |
A matrix or data frame of size |
depth_method |
A character value specifying the method to use for computing the depth values (if
The default method is |
depth_values |
A numeric vector containing the depth values of the functions in |
emp_factor |
A numeric value specifying the empirical factor for the boxplot. Defaults to 1.5. |
central_region |
A numeric value between 0 and 1 indicating the probability of central region. Defaults to 0.5. |
erld_type |
If |
dq_quantiles |
If |
A list containing:
outliers |
The indices of the functions/curves flagged as outliers. |
depth_values |
The depths of the functions/curves in |
median_curve |
The index of the median curve, which is the curve with the largest depth value (or smallest outlyingness value). |
Sun, Y., & Genton, M. G. (2011). Functional boxplots. Journal of Computational and Graphical Statistics, 20(2), 316-334.
seq_transform
for functional outlier detection using sequential transformation.
dt1 <- simulation_model1()
fbplot_obj <- functional_boxplot(dt1$data, depth_method = "mbd")
fbplot_obj$outliers
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.