View source: R/depth.qhpeeling.r
| depth.qhpeeling | R Documentation |
Calculates the convex hull peeling depth of points w.r.t. a multivariate data set.
depth.qhpeeling(x, data)
x |
Matrix of objects (numerical vector as one object) whose depth is to be calculated; each row contains a |
data |
Matrix of data where each row contains a |
Calculates the convex hull peeling depth (Eddy, 1982; see also Cascos, 2009).
Numerical vector of depths, one for each row in x; or one depth value if x is a numerical vector. Each depth value equals the number of the convex hulls to be peeled from data so that (the corresponding row of) x is not contained in the convex hull of the rest of the data; the depths are normalized by the number of points in data.
Eddy, W.F. (1982). Convex hull peeling. In: Caussinus, H., Ettinger, P. and Tomassone, R. (eds), COMPSTAT 1982. Proceedings in computational statistics, Physica-Verlag (Vienna), 42–47.
Cascos, I. (2009). Data depth: multivariate statistics and geometry. In: Kendall, W.S. and Molchanov, I. (eds) New Perspectives in Stochastic Geometry, Clarendon/Oxford University Press (Oxford).
depth.halfspace for calculation of the Tukey depth.
depth.L2 for calculation of L2-depth.
depth.Mahalanobis for calculation of Mahalanobis depth.
depth.projection for calculation of projection depth.
depth.simplicial for calculation of simplicial depth.
depth.simplicialVolume for calculation of simplicial volume depth.
depth.spatial for calculation of spatial depth.
depth.potential for calculation of data potential.
depth.zonoid for calculation of zonoid depth.
# Mixture of 3-variate normal distributions
data <- mvrnorm(25, rep(0, 3), diag(3))
x <- rbind(mvrnorm(10, rep(1, 3), diag(3)), data)
depths <- depth.qhpeeling(x, data)
cat("Depths:", depths, "\n")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.