These functions compute the Band Depth (BD) and Modified Band Depth (MBD) of elements of a multivariate functional dataset.
multiMBD(Data, weights = "uniform", manage_ties = FALSE)
# S3 method for mfData
multiMBD(Data, weights = "uniform", manage_ties = FALSE)
# S3 method for default
multiMBD(Data, weights = "uniform", manage_ties = FALSE)
multiBD(Data, weights = "uniform")
# S3 method for mfData
multiBD(Data, weights = "uniform")
# S3 method for default
multiBD(Data, weights = "uniform")
specifies the the multivariate functional dataset.
It is either an object of class mfData
or a list of 2-dimensional
matrices having as rows the elements of that component and as columns the
measurements of the functional data over the grid.
either a set of weights (of the same length of Data
) or the string "uniform"
specifying that a set of uniform weights
(of value \(1 / L\), where \(L\) is the number of dimensions of the
functional dataset and thus the length of Data
) is to be used.
a logical flag specifying whether the check for ties and
the relative treatment is to be carried out while computing the MBDs in each
dimension. It is directly passed to MBD
.
The function returns a vector containing the depths of each element of the multivariate functional dataset.
Given a multivariate functional dataset composed of \(N\) elements with \(L\) components each, \(\mathbf{X_1} =( X^1_1(t),\) \(X^2_1(t), \ldots, X^L_1(t))\), and a set of \(L\) non-negative weights,
$$ w_1, w_2, \ldots, w_L, \qquad \sum_{i=1}^L w_i = 1,$$
these functions compute the BD and MBD of each element of the functional dataset, namely:
$$ BD( \mathbf{X_j} ) = \sum_{i=1}^{L} w_i BD( X^i_j ), \quad \forall j = 1, \ldots N.$$
$$ MBD( \mathbf{X_j} ) = \sum_{i=1}^{L} w_i MBD( X^i_j ), \quad \forall j = 1, \ldots N.$$
Ieva, F. and Paganoni, A. M. (2013). Depth measures for multivariate functional data, Communications in Statistics: Theory and Methods, 41, 1265-1276.
Tarabelloni, N., Ieva, F., Biasi, R. and Paganoni, A. M. (2015). Use of Depth Measure for Multivariate Functional Data in Disease Prediction: An Application to Electrocardiograph Signals, International Journal of Biostatistics, 11.2, 189-201.
N = 20
P = 1e3
grid = seq( 0, 10, length.out = P )
# Generating an exponential covariance function to be used to simulate gaussian
# functional data
Cov = exp_cov_function( grid, alpha = 0.2, beta = 0.8 )
# First component of the multivariate guassian functional dataset
Data_1 = generate_gauss_fdata( N, centerline = rep( 0, P ), Cov = Cov )
# First component of the multivariate guassian functional dataset
Data_2 = generate_gauss_fdata( N, centerline = rep( 0, P ), Cov = Cov )
mfD = mfData( grid, list( Data_1, Data_2 ) )
multiBD( mfD, weights = 'uniform' )
#> [1] 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1
#> [20] 0.1
multiMBD( mfD, weights = 'uniform', manage_ties = TRUE )
#> [1] 0.3968211 0.3919579 0.3666263 0.4175474 0.3614158 0.3642842 0.4203421
#> [8] 0.4199632 0.3970421 0.3997579 0.3948158 0.3854737 0.3524158 0.4073263
#> [15] 0.4184368 0.4222526 0.4080526 0.4482632 0.3568474 0.4703579
multiBD( mfD, weights = c( 1/3, 2/3 ))
#> [1] 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1
#> [20] 0.1
multiMBD( mfD, weights = c( 1/3, 2/3 ), manage_ties = FALSE )
#> [1] 0.4068877 0.3874211 0.3753895 0.4290877 0.3473579 0.3716491 0.4218702
#> [8] 0.4211579 0.3774912 0.3864491 0.3976737 0.3787965 0.3600561 0.4094737
#> [15] 0.4181860 0.4212035 0.4094737 0.4304035 0.3719719 0.4780000
multiBD( list( Data_1, Data_2 ), weights = 'uniform')
#> [1] 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1
#> [20] 0.1
multiMBD( list( Data_1, Data_2 ), weights = 'uniform', manage_ties = TRUE )
#> [1] 0.3968211 0.3919579 0.3666263 0.4175474 0.3614158 0.3642842 0.4203421
#> [8] 0.4199632 0.3970421 0.3997579 0.3948158 0.3854737 0.3524158 0.4073263
#> [15] 0.4184368 0.4222526 0.4080526 0.4482632 0.3568474 0.4703579
multiBD( list( Data_1, Data_2 ), weights = c( 1/3, 2/3 ))
#> [1] 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1
#> [20] 0.1
multiMBD( list( Data_1, Data_2 ), weights = c( 1/3, 2/3 ), manage_ties = FALSE )
#> [1] 0.4068877 0.3874211 0.3753895 0.4290877 0.3473579 0.3716491 0.4218702
#> [8] 0.4211579 0.3774912 0.3864491 0.3976737 0.3787965 0.3600561 0.4094737
#> [15] 0.4181860 0.4212035 0.4094737 0.4304035 0.3719719 0.4780000