# depth.betaSkeleton: Calculate Beta-Skeleton Depth In ddalpha: Depth-Based Classification and Calculation of Data Depth

## Calculate Beta-Skeleton Depth

### Description

Calculates the beta-skeleton depth of points w.r.t. a multivariate data set.

### Usage

depth.betaSkeleton(x, data, beta = 2, distance = "Lp", Lp.p = 2,
mah.estimate = "moment", mah.parMcd = 0.75)


### Arguments

 x Matrix of objects (numerical vector as one object) whose depth is to be calculated; each row contains a d-variate point. Should have the same dimension as data. data Matrix of data where each row contains a d-variate point, w.r.t. which the depth is to be calculated. beta The paremeter defining the positionning of the balls' centers, see Yang and Modarres (2017) for details. By default (together with other arguments) equals 2, which corresponds to the lens depth, see Liu and Modarres (2011). distance A character string defining the distance to be used for determining inclusion of a point into the lens (influence region), see Yang and Modarres (2017) for details. Possibilities are "Lp" for the Lp-metric (default) or "Mahalanobis" for the Mahalanobis distance adjustment. Lp.p A non-negative number defining the distance's power equal 2 by default (Euclidean distance); is used only when distance = "Lp". mah.estimate A character string specifying which estimates to use when calculating sample covariance matrix; can be "none", "moment" or "MCD", determining whether traditional moment or Minimum Covariance Determinant (MCD) (see covMcd) estimates for mean and covariance are used. By default "moment" is used. Is used only when distance = "Mahalanobis". mah.parMcd The value of the argument alpha for the function covMcd; is used when distance = "Mahalanobis" and mah.estimate = "MCD".

### Details

Calculates the beta-skeleton depth, see Yang and Modarres (2017). Its particular case, lens depth, see Liu and Modarres (2011), is obtained when beta = 2, distance = "Lp" and Lp.p = 2 (default settings). For tne example of the lens depth, the depth of an observation x is calculated as the portion of lens containing x, with lens being an intersection of two closed balls centered at two sample's points each having radius equal to the distance between these two points.

### Value

Numerical vector of depths, one for each row in x; or one depth value if x is a numerical vector.

### References

Liu, Z. and Modarres, R. (2011). Lens data depth and median. Journal of Nonparametric Statistics 23(4) 1063–1074.

Yang, M. and Modarres, R. (2017). \beta-skeleton depth functions and medians. Commmunications in Statistics - Theory and Methods to appear.

depth.halfspace for calculation of the Tukey 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.zonoid for calculation of zonoid depth.

depth.potential for calculation of data potential.

### Examples

# 5-dimensional normal distribution
data <- mvrnorm(1000, rep(0, 5),
matrix(c(1, 0, 0, 0, 0,
0, 2, 0, 0, 0,
0, 0, 3, 0, 0,
0, 0, 0, 2, 0,
0, 0, 0, 0, 1),
nrow = 5))
x <- mvrnorm(10, rep(1, 5),
matrix(c(1, 0, 0, 0, 0,
0, 1, 0, 0, 0,
0, 0, 1, 0, 0,
0, 0, 0, 1, 0,
0, 0, 0, 0, 1),
nrow = 5))