Provides the depth measure for multivariate data
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).
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)
x |
is a set of points, a d-column matrix. |
xx |
is a d-dimension multivariate reference sample (a d-column matrix)
where |
metric |
Metric function, by default |
h |
Bandwidth, |
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 |
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 |
Type of depth measures:
The mdepth.SD
calculates the simplicial depth (HD) of the points in x
w.r.t.
xx
(for bivariate data).
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
.
The mdepth.TD
function provides the Tukey depth measure for multivariate data.
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.
xis a set of points to be evaluated.
xx a reference sample
name Name of depth method
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.
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.
Functional depth functions: depth.FM
,
depth.mode
, depth.RP
, depth.RPD
and depth.RT
.
## 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)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.