extreme_rank_length {fdaoutlier} | R Documentation |
Compute the Extreme Rank Length Depth.
Description
This function computes the extreme rank length depth (ERLD) of a sample of curves or functions.
Functions have to be discretely observed on common domain points. In principle, the ERLD of a function X_i
is the proportion of functions in the sample that is considered to be more extreme
than X_i
, an idea similar to extremal_depth
.
To determine which functions are more extreme, pointwise ranks of the functions are computed and compared pairwise.
Usage
extreme_rank_length(
dts,
type = c("two_sided", "one_sided_left", "one_sided_right")
)
Arguments
dts |
A matrix or data frame of size |
type |
A character value. Can be one of |
Details
There are three possibilities in the (pairwise) comparison of the pointwise ranks of the functions.
First possibility is to consider only small values as extreme (when type = "one_sided_left"
) in which case the raw pointwise ranks
r_{ij}
are used. The second possibility is to consider only large values as extreme (when type = "one_sided_right"
) in which
case the pointwise ranks used are computed as R_{ij} = n + 1 - r_{ij}
where r_{ij}
is the raw pointwise rank of the function
i
at design point j
and n
is the number of functions in the sample. Third possibility is to consider both small and
large values as extreme (when type = "two_sided"
) in which case the pointwise ranks used is computed as
R_{ij} = min(r_ij, n + 1 - r_{ij})
. In the computation of the raw pointwise ranks r_{ij}
, ties are broken using
an average. See Dai et al. (2020) doi:10.1016/j.csda.2020.106960 and Myllymäki et al. (2017) doi:10.1111/rssb.12172 for more details.
Value
A numeric vector containing the depth of each curve
Author(s)
Oluwasegun Ojo
References
Dai, W., Mrkvička, T., Sun, Y., & Genton, M. G. (2020). Functional outlier detection and taxonomy by sequential transformations. Computational Statistics & Data Analysis, 106960.
Myllymäki, M., Mrkvička, T., Grabarnik, P., Seijo, H., & Hahn, U. (2017). Global envelope tests for spatial processes. J. R. Stat. Soc. B, 79:381-404.
Examples
dt3 <- simulation_model3()
erld <- extreme_rank_length(dt3$data)