fda.usc (version 1.5.0)

Depth for a multivariate dataset: 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).

  • The mdepth.SD function provides the simplicial depth measure for bivariate data.

  • The mdepth.MhDfunction implements a Mahalanobis depth measure.

  • The mdepth.RP function provides the depth measure using random projections for multivariate data.

  • The mdepth.LD function provides the Likelihood depth measure for multivariate data.

  • The mdepth.TD function provides the Tukey depth measure for multivariate data.

Usage

mdepth.SD(x,  xx = NULL, scale=FALSE) 
mdepth.HS(x, xx=x,proj=50,scale=FALSE,xeps=1e-15,random=FALSE)
mdepth.MhD(x,xx=x,scale=FALSE)
mdepth.RP(x,  xx = x, proj = 50, scale=FALSE) 
mdepth.TD(x,xx=x,xeps=1e-15,scale=FALSE)
mdepth.LD(x,xx=x,metric=metric.dist,h=NULL,scale=FALSE,...)

Arguments

x

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

xx

is a d-dimension multivariate sample, a d-column matrix.

proj

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

scale

=TRUE, scale the depth, see scale.

metric

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

xeps

Accuracy. The left limit of the empirical distribution function.

random

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

h

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

Further arguments passed to or from other methods.

Value

lmed

Index of deepest element median of xx.

ltrim

Index of set of points x with trimmed mean mtrim.

dep

Depth of each point x w.r.t. xx.

proj

The projection value of each point on set of points.

Details

Type of depth measures,

  • The mdepth.SD calculates the simplicial depth (HD) of the points in x w.r.t. xx.

  • The mdepth.HS function calculates the random half--space depth (HS) of the points in x w.r.t. xx based on random projections proj.

  • The mdepth.MhD function calculates the Mahalanobis depth (MhD) of the points in x w.r.t. xx.

  • The mdepth.RP calculates the random projection depth (RP) of the points in x w.r.t. xx based on random projections proj.

  • The mdepth.LD calculates the Likelihood depth (LD) of the points in x w.r.t. xx.

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

Run this code
# 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


# }

Run the code above in your browser using DataLab