| tf_depth | R Documentation |
Data depths for functional data. All depths are scaled so that 1 means most central and 0 means most extreme. Available methods:
tf_depth(x, arg, depth = "MBD", na.rm = TRUE, ...)
## S3 method for class 'matrix'
tf_depth(
x,
arg,
depth = c("MBD", "MHI", "FM", "FSD", "RPD"),
na.rm = TRUE,
...
)
## S3 method for class 'tf'
tf_depth(x, arg, depth = "MBD", na.rm = TRUE, ...)
x |
|
arg |
grid of evaluation points. |
depth |
one of |
na.rm |
remove missing observations? Defaults to |
... |
for |
"MBD": Modified Band-2 Depth (default). Scale of 0 (most extreme) to
1 (most central).
"MHI": Modified Hypograph Index. Ranks functions from lowest (0) to
highest (1) instead of most extreme to most central! For functions that
never cross: MBD = -2(MHI - 0.5)^2 + .5.
"FM": Fraiman-Muniz depth. Integrates pointwise univariate halfspace
depths over the domain. Scale of 0 (most extreme) to 1 (most central).
"FSD": Functional Spatial Depth. Based on spatial signs; robust to
outliers. Scale of 0 (most extreme) to 1 (most central).
"RPD": Regularized Projection Depth. Projects curves onto random
directions and computes outlyingness. Especially useful for detecting
shape outliers. Scale of 0 (most extreme) to 1 (most central).
Note: results depend on the RNG state; set a seed
(e.g. set.seed(...)) before calling for reproducibility. Accepts
additional arguments via ...: u (quantile level for regularization,
default 0.01), n_projections (M, number of projection directions,
default 5000), n_projections_beta (L, directions for estimating
regularization parameter, default 500).
vector of depth values
Sun, Ying, Genton, G M, Nychka, W D (2012). “Exact fast computation of band depth for large functional datasets: How quickly can one million curves be ranked?” Stat, 1(1), 68–74.
López-Pintado, Sara, Romo, Juan (2009). “On the concept of depth for functional data.” Journal of the American Statistical Association, 104(486), 718–734.
López-Pintado, Sara, Romo, Juan (2011). “A half-region depth for functional data.” Computational Statistics & Data Analysis, 55(4), 1679–1695.
Fraiman, Ricardo, Muniz, Graciela (2001). “Trimmed means for functional data.” Test, 10(2), 419–440.
Chakraborty, Anirvan, Chaudhuri, Probal (2014). “The spatial distribution in infinite dimensional spaces and related quantiles and depths.” The Annals of Statistics, 42(3), 1203–1231.
Bočinec, Filip, Nagy, Stanislav, Yeon, Hyemin (2026). “Projection depth for functional data: Practical issues, computation and applications.” arXiv preprint arXiv:2602.22877.
Other tidyfun ordering and ranking functions:
tf_minmax,
tf_order
x <- tf_rgp(3)/3 + 1:3
tf_depth(x, depth = "MBD")
tf_depth(x, depth = "MHI")
tf_depth(x, depth = "FM")
tf_depth(x, depth = "FSD")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.