Learn R Programming

rainbow (version 1.6)

fdepth: Compute functional depth.

Description

Compute functional depth.

Usage

fdepth(data, type = c("FM", "mode", "RP", "RPD"), trim = 0.25)

Arguments

data
An object of class fds or fts.
type
Type of functional depth.
trim
Percentage of trimming.

Value

  • A list containing the following components is returned.
  • medianMedian curve (highest depth).
  • lmedIndex of median curve.
  • ltrimIndexes of the trimmed curves.
  • profFunctional depth for each curve.
  • mtrimMean of trimmed curves.

Details

If type="FM", it computes the functional depth of Fraiman and Muniz (2001), which is considered as the first functional depth. If type="mode", it computes the functional depth of Cuevas et al. (2006). A functional mode is defined as the curve most densely surrounded by the rest of curves of the dataset. If type="RP" and type="RPD", it computes random projection functional depth of Cuevas et al. (2007). Cuevas et al. (2007) considered the random projection depth based on measuring the depth of the functional data under projections and taking additional information of their derivatives. The basic idea is to project each functional curve, along a random direction, defining a point in $R^2$. A data depth in $R^2$ provides an order of the projected points. The argument trim=0.25 first order curves by depth, and then trim 25 percent curves that have comparably lower depth.

References

A. Cuevas and M. Febrero and R. Fraiman (2001) "Cluster Analysis:a further approach based on density estimation", Computational Statistics & Data Analysis, 36(4), 441-456. A. Cuevas and M. Febrero and R. Fraiman (2006) "On the use of bootstrap for estimating functions with functional data", Computational Statistics & Data Analysis, 51(10), 1063-1074. A. Cuevas and M. Febrero and R. Fraiman (2007) "Robust estimation and classification for functional data via projection-based depth notions", Computational Statistics, 22(3), 481-496. R. Fraiman and G. Muniz (2001) "Trimmed means for functional data", Test, 10(2), 419-440. M. Febrero and P. Galeano and W. Gonzalez-Manteiga (2008) "Outlier detection in functional data by depth measures, with application to identify abnormal NOx levels", Environmetrics, 19(4), 331-345.

Examples

Run this code
fdepth(data = ElNino, type = "FM")
fdepth(data = ElNino, type = "mode")
fdepth(data = ElNino, type = "RP")
fdepth(data = ElNino, type = "RPD")

Run the code above in your browser using DataLab