# scaleCurve: Scale curve In DepthProc: Statistical Depth Functions for Multivariate Analysis

## Description

Draws a scale curve: measure of dispersion.

## Usage

 1 2 scaleCurve(x, y = NULL, alpha = seq(0, 1, 0.01), method = "Projection", name = "X", name_y = "Y", title = "Scale Curve", ...) 

## Arguments

 x Multivariate data as a matrix. y Additional matrix with multivariate data. alpha Vector with values of central area to be used in computation. method Character string which determines the depth function used. method can be "Projection" (the default), "Mahalanobis", "Euclidean" or "Tukey". For details see depth. name Name of matrix X used in legend. name_y Name of matrix Y used in legend. title title of the plot. ... Any additional parameters for function depth.

## Details

For sample depth function D({x},{{{Z}}^{n}}) , {x}\in {{{R}}^{d}} , d≥ 2 , {Z}^{n}=\{{{{z}}_{1}},...,{{{z}}_{n}}\}\subset {{{R}}^{d}} , {{D}_{α }}({{{Z}}^{n}}) denoting α- central region, we can define the scale curve

SC(α )=≤ft( α ,vol({{D}_{α }}({{{Z}}^{n}}) \right)\subset {{{R}}^{2}}, for α \in [0,1]

The scale curve is a two-dimensional method of describing the dispersion of random vector around the depth induced median.

Function scalecurve for determining the volumes of the convex hull containing points from alpha central regions, uses function convhulln from geometry package.

The minimal dimension of data in X or Y is 2.

ggplot2 package is used to draw a plot.

## Value

Returns the volume of the convex hull containing subsequent central points of X.

## 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.

Chaudhuri, P. (1996), On a Geometric Notion of Quantiles for Multivariate Data, Journal of the American Statistical Association, 862–872.

Dyckerhoff, R. (2004), Data Depths Satisfying the Projection Property, Allgemeines Statistisches Archiv., 88, 163–190.

depthContour and depthPersp for depth graphics.
 1 2 3 4 5 6 7 8 9 require(mvtnorm) x = mvrnorm(n = 100, mu = c(0,0), Sigma = 3*diag(2)) y = rmvt(n = 100, sigma = diag(2), df = 2) scaleCurve(x, y, method = "Projection", plot = TRUE) ## comparing of two scale curves - normal distribution and mixture of normal distributions x = mvrnorm(100, c(0,0), diag(2)) y = mvrnorm(80, c(0,0), diag(2)) z = mvrnorm(20, c(5,5), diag(2)) scaleCurve(x, rbind(y,z), method = "Projection", name = "N", name_y = "Mixture of N")