BD {roahd} | R Documentation |
Band Depth for univariate functional data
Description
This function computes the Band Depth (BD) of elements of a functional dataset.
Usage
BD(Data)
## S3 method for class 'fData'
BD(Data)
## Default S3 method:
BD(Data)
Arguments
Data |
either an object of class |
Details
Given a univariate functional dataset, X_1(t), X_2(t), \ldots, X_N(t)
,
this function computes the sample BD of each element with respect to the
other elements of the dataset, i.e.:
BD( X( t ) ) = {N \choose 2 }^{-1} \sum_{1 \leq i_1 < i_2 \leq N} I(
G(X) \subset B( X_{i_1}, X_{i_2} ) ),
where G(X)
is the graphic of X(t)
, B(X_{i_1},X_{i_2})
is
the envelope of X_{i_1}(t)
and X_{i_2}(t)
, and X \in
\left\{X_1, \ldots, X_N\right\}
.
See the References section for more details.
Value
The function returns a vector containing the values of BD for the given dataset.
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.
See Also
MBD
, BD_relative
,
MBD_relative
, fData
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 )
BD( fD )
BD( D )