tvd_mss {fdaoutlier} | R Documentation |
Outlier detection using the total variation depth and modified shape similarity index.
Description
Find shape and magnitude outliers using the Total Variation Depth and Modified Shape Similarity Index proposed in Huang and Sun (2019) doi:10.1080/00401706.2019.1574241.
Usage
tvd_mss(
data,
emp_factor_mss = 1.5,
emp_factor_tvd = 1.5,
central_region_tvd = 0.5
)
tvdmss(
dts,
emp_factor_mss = 1.5,
emp_factor_tvd = 1.5,
central_region_tvd = 0.5
)
Arguments
emp_factor_mss |
The empirical factor of the classical boxplot used on the modified shape similarity index. Defaults to 1.5. |
emp_factor_tvd |
The empirical factor of the functional boxplot used on the TVD of observations. Defaults to 1.5. |
central_region_tvd |
A number between 0 and 1 indicating the central region probability of the functional boxplot used on the TVD of the observations. Defaults to 0.5. See also details. |
dts , data |
A matrix or dataframe of size |
Details
This method uses a combination of total variation depth (TVD) and modified shape similarity (MSS) index
defined in Huang and Sun (2019) doi:10.1080/00401706.2019.1574241
to find magnitude and shape outliers. The TVD and MSS of all the observations are
first computed and a classical boxplot is then applied on the MSS. Outliers detected
by the boxplot of MSS are flagged as shape outliers. The shape outliers are then removed
from the data and the TVD of the remaining observations are used in a functional boxplot
to detect magnitude outliers. The central region
of this functional boxplot (central_region_tvd
) is w.r.t. to the original number of curves. Thus if
8 shape outliers are found out of 100 curves, specifying central_region_tvd
= 0.5 will ensure that
50 observations are used as the central region in the functional boxplot on the remaining 92 observations.
Value
Returns a list containing the following
outliers |
the indices of the (shape and magnitude) outliers |
shape_outliers |
the indices of the shape outliers |
magnitude_outliers |
the indices of the magnitude outliers |
tvd |
the total variation depths of the observations of |
mss |
the modified shape similarity index of the observations of |
Functions
-
tvd_mss()
: Deprecated function. Usetvdmss
instead.
Author(s)
Oluwasegun Ojo
References
Huang, H., & Sun, Y. (2019). A decomposition of total variation depth for understanding functional outliers. Technometrics, 61(4), 445-458.
See Also
msplot
for outlier detection using msplot.
Examples
dt6 <- simulation_model6()
res <- tvdmss(dt6$data)
res$outliers