depth.mdata {fda.usc}R Documentation

Provides the depth measure for multivariate data

Description

Compute measure of centrality of the multivariate data. Type of depth function: simplicial depth (SD), Mahalanobis depth (MhD), Random Half–Space depth (HS), random projection depth (RP) and Likelihood Depth (LD).

Usage

mdepth.LD(x, xx = x, metric = metric.dist, h = NULL, scale = FALSE, ...)

mdepth.HS(x, xx = x, proj = 50, scale = FALSE, xeps = 1e-15, random = FALSE)

mdepth.RP(x, xx = x, proj = 50, scale = FALSE)

mdepth.MhD(x, xx = x, scale = FALSE)

mdepth.KFSD(x, xx = x, trim = 0.25, h = NULL, scale = FALSE, draw = FALSE)

mdepth.FSD(x, xx = x, trim = 0.25, scale = FALSE, draw = FALSE)

mdepth.FM(x, xx = x, scale = FALSE, dfunc = "TD1")

mdepth.TD(x, xx = x, xeps = 1e-15, scale = FALSE)

mdepth.SD(x, xx = NULL, scale = FALSE)

Arguments

x

is a set of points, a d-column matrix.

xx

is a d-dimension multivariate reference sample (a d-column matrix) where x points are evaluated.

metric

Metric function, by default metric.dist. Distance matrix between x and xx is computed.

h

Bandwidth, h>0. Default argument values are provided as the 15%–quantile of the distance between x and xx.

scale

=TRUE, scale the depth, see scale.

...

Further arguments passed to or from other methods.

proj

are the directions for random projections, by default 500 random projections generated from a scaled runif(500,-1,1).

xeps

Accuracy. The left limit of the empirical distribution function.

random

=TRUE for random projections. =FALSE for deterministic projections.

trim

The alpha of the trimming.

draw

=TRUE, draw the curves, the sample median and trimmed mean.

dfunc

type of univariate depth function used inside depth function: "FM1" refers to the original Fraiman and Muniz univariate depth (default), "TD1" Tukey (Halfspace),"Liu1" for simplical depth, "LD1" for Likelihood depth and "MhD1" for Mahalanobis 1D depth. Also, any user function fulfilling the following pattern FUN.USER(x,xx,...) and returning a dep component can be included.

Details

Type of depth measures:

Value

Author(s)

mdepth.RP, mdepth.MhD and mdepth.HS are versions created by Manuel Febrero Bande and Manuel Oviedo de la Fuente of the original version created by Jun Li, Juan A. Cuesta Albertos and Regina Y. Liu for polynomial classifier.

References

Liu, R. Y., Parelius, J. M., and Singh, K. (1999). Multivariate analysis by data depth: descriptive statistics, graphics and inference,(with discussion and a rejoinder by Liu and Singh). The Annals of Statistics, 27(3), 783-858.

See Also

Functional depth functions: depth.FM, depth.mode, depth.RP, depth.RPD and depth.RT.

Examples

## Not run: 
data(iris)
group<-iris[,5]
x<-iris[,1:2]
                                  
MhD<-mdepth.MhD(x)
PD<-mdepth.RP(x)
HD<-mdepth.HS(x)
SD<-mdepth.SD(x)

x.setosa<-x[group=="setosa",]
x.versicolor<-x[group=="versicolor",] 
x.virginica<-x[group=="virginica",]
d1<-mdepth.SD(x,x.setosa)$dep
d2<-mdepth.SD(x,x.versicolor)$dep
d3<-mdepth.SD(x,x.virginica)$dep

## End(Not run)

[Package fda.usc version 2.1.0 Index]