Loading [MathJax]/jax/output/HTML-CSS/jax.js

This function computes the Modified Band Depth (MBD) of elements of a functional dataset.

MBD(Data, manage_ties = FALSE)

# S3 method for fData
MBD(Data, manage_ties = FALSE)

# S3 method for default
MBD(Data, manage_ties = FALSE)

Arguments

Data

either a fData object or a matrix-like dataset of functional data (e.g. fData$values), with observations as rows and measurements over grid points as columns.

manage_ties

a logical flag specifying whether a check for ties and relative treatment must be carried out or not (default is FALSE).

Value

The function returns a vector containing the values of MBD for the given dataset.

Details

Given a univariate functional dataset, X1(t),X2(t),,XN(t), defined over a compact interval I=[a,b], this function computes the sample MBD of each element with respect to the other elements of the dataset, i.e.:

MBD(X(t))=(N2)11i1<i2N˜λ(t:min(Xi1(t),Xi2(t))X(t)max(Xi1(t),Xi2(t))),

where ˜λ() is the normalized Lebesgue measure over I=[a,b], that is ~λ(A)=λ(A)/(ba).

See the References section for more details.

References

Lopez-Pintado, S. and Romo, J. (2009). On the Concept of Depth for Functional Data, Journal of the American Statistical Association, 104, 718-734.

Lopez-Pintado, S. and Romo. J. (2007). Depth-based inference for functional data, Computational Statistics & Data Analysis 51, 4957-4968.

Examples

grid = seq( 0, 1, length.out = 1e2 )


D = matrix( c( 1 + sin( 2 * pi * grid ),
               0 + sin( 4 * pi * grid ),
               1 - sin( pi * ( grid - 0.2 ) ),
               0.1 + cos( 2 * pi * grid ),
               0.5 + sin( 3 * pi + grid ),
               -2 + sin( pi * grid ) ),
            nrow = 6, ncol = length( grid ), byrow = TRUE )

fD = fData( grid, D )

MBD( fD )
#> [1] 0.4813333 0.5946667 0.6400000 0.5853333 0.6986667 0.3333333

MBD( D )
#> [1] 0.4813333 0.5946667 0.6400000 0.5853333 0.6986667 0.3333333