View source: R/directional_outlyingness.R
dir_out | R Documentation |
Compute the directional outlyingness of a univariate or multivariate functional data based on Dai and Genton (2019) \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.csda.2018.03.017")} and Dai and Genton (2018) \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1080/10618600.2018.1473781")}.
dir_out(
dts,
data_depth = "random_projections",
n_projections = 200L,
seed = NULL,
return_distance = TRUE,
return_dir_matrix = FALSE
)
dts |
A matrix (or data frame) for univariate functional data (of size |
data_depth |
The method for computing the depth. The random projection depth is always used as suggested in Dai and Genton (2018) \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1080/10618600.2018.1473781")}. Support for more depth methods will be added. |
n_projections |
The number of directions for computing random projection depth. By default, 200 random directions are generated from a scaled uniform distribution between -1 and 1. |
seed |
An integer indicating the seed to set when generating the random directions. Defaults to NULL in which case a seed is not set. |
return_distance |
A logical value. If TRUE, returns: a matrix whose columns are the mean and variation of directional outlyingness, the mahalanobis distance of the observations of this matrix, and the robust estimate of the mean and covariance of this matrix (computed using the minimum covariance determinant method). |
return_dir_matrix |
A logical value. If TRUE, returns the directional outlyingness
matrix (or array for multivariate functional data). Computed from the chosen |
The directional outlyingness, as defined in Dai and Genton (2019) \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.csda.2018.03.017")} is
O(Y, F_Y) = (1/d(Y, F_Y) - 1).v
where d
is a depth notion, and v
is
the unit vector pointing from the median of F_Y
to Y
. For univariate and
multivariate functional data, the projection depth is always used as suggested by
Dai and Genton (2019) \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.csda.2018.03.017")}.
Returns a list containing:
mean_outlyingness |
an |
var_outlyingness |
a vector of length n containing the variation of directional outlyingness. |
ms_matrix |
if |
distance |
if |
mcd_obj |
if |
dirout_matrix |
if |
Oluwasegun Taiwo Ojo.
Dai, W., and Genton, M. G. (2018). Multivariate functional data visualization and outlier detection. Journal of Computational and Graphical Statistics, 27(4), 923-934.
Dai, W., and Genton, M. G. (2019). Directional outlyingness for multivariate functional data. Computational Statistics & Data Analysis, 131, 50-65.
Zuo, Y. (2003). Projection-based depth functions and associated medians. The Annals of Statistics, 31(5), 1460-1490.
msplot
for outlier detection using msplot and projection_depth
for multivariate projection depth.
# univariate magnitude model in Dai and Genton (2018).
dt4 <- simulation_model4()
dirout_object <- dir_out(dts = dt4$data, return_distance = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.