Depth calculation

Description

Depth calculation

Usage

1
depth(u, X, method = "Projection", name = "X", threads = -1, ...)

Arguments

u

Numerical vector or matrix whose depth is to be calculated. Dimension has to be the same as that of the observations.

X

The data as a matrix, data frame or list. If it is a matrix or data frame, then each row is viewed as one multivariate observation. If it is a list, all components must be numerical vectors of equal length (coordinates of observations).

method

Character string which determines the depth function. method can be "Projection" (the default), "Mahalanobis", "Euclidean" or "Tukey". For details see depth.

name

name for this data set - it will be used on plots.

threads

number of threads used in parallel computations. Default value -1 means that all possible cores will be used.

...

parameters specific to method - see depthEuclid

Details

Calculate depth functions.

Author(s)

Daniel Kosiorowski, Mateusz Bocian, Anna Wegrzynkiewicz and Zygmunt Zawadzki from Cracow University of Economics.

References

Liu, R.Y., Parelius, J.M. and Singh, K. (1999), Multivariate analysis by data depth: Descriptive statistics, graphics and inference (with discussion), Ann. Statist., 27, 783-858.

Mosler K (2013). Depth statistics. In C Becker, R Fried, K S (eds.), Robustness and Complex Data Structures, Festschrift in Honour of Ursula Gather, pp. 17-34. Springer.

Rousseeuw, P.J. and Struyf, A. (1998), Computing location depth and regression depth in higher dimensions, Stat. Comput., 8, 193-203.

Zuo, Y. and Serfling, R. (2000), General Notions of Statistical Depth Functions, Ann. Statist., 28, no. 2, 461-482.

See Also

depthContour and depthPersp for depth graphics.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
require(robustbase)

 ## Calculation of Projection depth
 data(starsCYG, package = "robustbase")
 depth(t(colMeans(starsCYG)), starsCYG)

 #Aslo for matrices
 depth(starsCYG, starsCYG)

 ## Projection depth applied to a large bivariate data set
 x = matrix(rnorm(9999), nc = 3)
 depth(x, x)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.