This function computes the Modified Half-Region Depth (MHRD) of elements of a univariate functional dataset.
MHRD(Data)
# S3 method for fData
MHRD(Data)
# S3 method for default
MHRD(Data)
either an 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.
The function returns a vector containing the values of MHRD for each
element of the functional dataset provided in Data
.
Given a univariate functional dataset, X1(t),X2(t),…,XN(t), defined over a compact interval I=[a,b], this function computes the MHRD of its elements, i.e.:
MHRD(X(t))=min
where MEI(X(t)) indicates the Modified Epigraph Index (MEI) of X(t) with respect to the dataset, and MHI(X(t)) indicates the Modified Hypograph Index of X(t) with respect to the dataset.
Lopez-Pintado, S. and Romo, J. (2012). A half-region depth for functional data, Computational Statistics and Data Analysis, 55, 1679-1695.
Arribas-Gil, A., and Romo, J. (2014). Shape outlier detection and visualization for functional data: the outliergram, Biostatistics, 15(4), 603-619.
N = 20
P = 1e2
grid = seq( 0, 1, length.out = P )
C = exp_cov_function( grid, alpha = 0.2, beta = 0.3 )
Data = generate_gauss_fdata( N,
centerline = sin( 2 * pi * grid ),
C )
fD = fData( grid, Data )
MHRD( fD )
#> [1] 0.1515 0.2830 0.4445 0.2245 0.4325 0.0985 0.5020 0.1105 0.5040 0.1420
#> [11] 0.0700 0.0985 0.3930 0.3350 0.3235 0.3435 0.4700 0.4145 0.1985 0.3675
MHRD( Data )
#> [1] 0.1515 0.2830 0.4445 0.2245 0.4325 0.0985 0.5020 0.1105 0.5040 0.1420
#> [11] 0.0700 0.0985 0.3930 0.3350 0.3235 0.3435 0.4700 0.4145 0.1985 0.3675