depthf.fd1: Univariate Integrated and Infimal Depth for Functional Data

View source: R/depth.fd.R

depthf.fd1R Documentation

Univariate Integrated and Infimal Depth for Functional Data

Description

Usual, and order extended integrated and infimal depths for real-valued functional data based on the halfspace and simplicial depth.

Usage

depthf.fd1(datafA, datafB, range = NULL, d = 101, order = 1, approx = 0)

Arguments

datafA

Functions whose depth is computed, represented by a dataf object of their arguments and functional values. m stands for the number of functions.

datafB

Random sample functions with respect to which the depth of datafA is computed. datafB is represented by a dataf object of their arguments and functional values. n is the sample size. The grid of observation points for the functions datafA and datafB may not be the same.

range

The common range of the domain where the functions datafA and datafB are observed. Vector of length 2 with the left and the right end of the interval. Must contain all arguments given in datafA and datafB.

d

Grid size to which all the functional data are transformed. For depth computation, all functional observations are first transformed into vectors of their functional values of length d corresponding to equi-spaced points in the domain given by the interval range. Functional values in these points are reconstructed using linear interpolation, and extrapolation, see Nagy et al. (2016).

order

The order of the order extended integrated and infimal depths. By default, this is set to 1, meaning that the usual univariate depths of the functional values are computed. For order=2 or 3, the second and the third order extended integrated and infimal depths are computed, respectively.

approx

Number of approximations used in the computation of the order extended depth for order greater than 1. For order=2, the default value is set to 0, meaning that the depth is computed at all possible d^order combinations of the points in the domain. For order=3, the default value is set to 101. When approx is a positive integer, approx points are randomly sampled in [0,1]^order and at these points the order-variate depths of the corresponding functional values are computed.

Details

The function returns vectors of sample integrated and infimal depth values.

Value

Four vectors of length m of depth values are returned:

  • Simpl_FD the integrated depth based on the simplicial depth,

  • Half_FD the integrated depth based on the halfspace depth,

  • Simpl_ID the infimal depth based on the simplicial depth,

  • Half_ID the infimal depth based on the halfspace depth.

In addition, two vectors of length m of the relative area of smallest depth values is returned:

  • Simpl_IA the proportions of points at which the depth Simpl_ID was attained,

  • Half_IA the proportions of points at which the depth Half_ID was attained.

The values Simpl_IA and Half_IA are always in the interval [0,1]. They introduce ranking also among functions having the same infimal depth value - if two functions have the same infimal depth, the one with larger infimal area IA is said to be less central. For order=2 and m=1, two additional matrices of pointwise depths are also returned:

  • PSD the matrix of size d*d containing the computed pointwise bivariate simplicial depths used for the computation of Simpl_FD and Simpl_ID,

  • PHD the matrix of size d*d containing the computed pointwise bivariate halfspace depths used for the computation of Half_FD and Half_ID.

For order=3, only Half_FD and Half_ID are provided.

Author(s)

Stanislav Nagy, nagy@karlin.mff.cuni.cz

References

Nagy, S., Gijbels, I. and Hlubinka, D. (2016). Weak convergence of discretely observed functional data with applications. Journal of Multivariate Analysis, 146, 46–62.

Nagy, S., Gijbels, I. and Hlubinka, D. (2017). Depth-based recognition of shape outlying functions. Journal of Computational and Graphical Statistics, 26 (4), 883–893.

See Also

depthf.fd2, infimalRank

Examples

datafA = dataf.population()$dataf[1:20]
datafB = dataf.population()$dataf[21:50]
depthf.fd1(datafA,datafB)
depthf.fd1(datafA,datafB,order=2)
depthf.fd1(datafA,datafB,order=3,approx=51)


ddalpha documentation built on March 23, 2022, 9:07 a.m.