multiMHI: Modified Hypograph Index for multivariate functional data

Description Usage Arguments Details Value See Also Examples

View source: R/multivariate_depths.R

Description

These functions compute the Modified Hypograph Index of elements of a multivariate functional dataset.

Usage

1
2
3
4
5
6
7
multiMHI(Data, weights = "uniform")

## S3 method for class 'mfData'
multiMHI(Data, weights = "uniform")

## Default S3 method:
multiMHI(Data, weights = "uniform")

Arguments

Data

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.

weights

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.

Details

Given a multivariate functional dataset composed of N elements with L components each, \mathbf{X_1} =( X^1_1(t), X^2_1(t), …, X^L_1(t)), and a set of L non-negative weights,

w_1, w_2, …, w_L, \qquad ∑_{i=1}^L w_i = 1,

these functions compute the MHI of each element of the functional dataset, namely:

MHI( \mathbf{X_j} ) = ∑_{i=1}^{L} w_i MHI( X^i_j ), \quad \forall j = 1, … N.

Value

The function returns a vector containing the values of MHI of each element of the multivariate functional dataset.

See Also

mfData, MHI, MEI, multiMEI

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
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 ) )

# Uniform weights
multiMHI( mfD, weights = 'uniform' )

# Non-uniform, custom weights
multiMHI( mfD, weights = c(2/3, 1/3) )

roahd documentation built on Nov. 4, 2021, 1:07 a.m.