This function computes the Half-Region Depth (HRD) of elements of a univariate functional dataset.

HRD(Data)

# S3 method for fData
HRD(Data)

# S3 method for default
HRD(Data)

Arguments

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.

Value

The function returns a vector containing the values of HRD for each element of the functional dataset provided in Data.

Details

Given a univariate functional dataset, \(X_1(t), X_2(t), \ldots, X_N(t)\), defined over a compact interval \(I=[a,b]\), this function computes the HRD of its elements, i.e.:

$$HRD(X(t)) = \min( EI( X(t) ), HI(X(t)) ),$$

where \(EI(X(t))\) indicates the Epigraph Index (EI) of \(X(t)\) with respect to the dataset, and \(HI(X(t))\) indicates the Hypograph Index of \(X(t)\) with respect to the dataset.

References

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.

See also

Examples


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 )

HRD( fD )
#>  [1] 0.05 0.05 0.20 0.10 0.10 0.05 0.05 0.05 0.15 0.10 0.05 0.05 0.10 0.10 0.05
#> [16] 0.10 0.05 0.25 0.05 0.20

HRD( Data )
#>  [1] 0.05 0.05 0.20 0.10 0.10 0.05 0.05 0.05 0.15 0.10 0.05 0.05 0.10 0.10 0.05
#> [16] 0.10 0.05 0.25 0.05 0.20