depthf.RP1: Univariate Random Projection Depths for Functional Data

View source: R/depth.fd.R

depthf.RP1R Documentation

Univariate Random Projection Depths for Functional Data

Description

Random projection depth and random functional depth for functional data.

Usage

depthf.RP1(datafA, datafB, range = NULL, d = 101, nproj = 50, nproj2 = 5)

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.

nproj

Number of projections taken in the computation of the random projection depth. By default taken to be 51.

nproj2

Number of projections taken in the computation of the random functional depth. By default taken to be 5. nproj2 should be much smaller than d, the dimensionality of the discretized functional data.

Details

The function returns the vectors of sample random projection, and random functional depth values. The random projection depth described in Cuevas et al. (2007) is based on the average univariate depth of one-dimensional projections of functional data. The projections are taken randomly as a sample of standard normal d-dimensional random variables, where d stands for the dimensionality of the discretized functional data.

The random functional depth (also called random Tukey depth, or random halfspace depth) is described in Cuesta-Albertos and Nieto-Reyes (2008). The functional data are projected into the real line in random directions as for the random projection depths. Afterwards, an approximation of the halfspace (Tukey) depth based on this limited number of univariate projections is assessed.

Value

Three vectors of depth values of length m are returned:

  • Simpl_FD the random projection depth based on the univariate simplicial depth,

  • Half_FD the random projection depth based on the univariate halfspace depth,

  • RHalf_FD the random halfspace depth.

Author(s)

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

References

Cuevas, A., Febrero, M. and Fraiman, R. (2007). Robust estimation and classification for functional data via projection-based depth notions, Computational Statistics 22 (3), 481–496.

Cuesta-Albertos, J.A. and Nieto-Reyes, A. (2008). The random Tukey depth. Computational Statistics & Data Analysis 52 (11), 4979–4988.

See Also

depthf.RP2

Examples

datafA = dataf.population()$dataf[1:20]
datafB = dataf.population()$dataf[21:50]

depthf.RP1(datafA,datafB)


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