Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

depth.graph

Depth Graph


Description

Builds the data depth graphs for 2-dimensional data. The graph is built using persp.

Usage

depth.graph(data, 
  depth_f = c("halfspace", "Mahalanobis", "projection", "simplicial", 
              "simplicialVolume", "spatial", "zonoid", "none"), 
  apoint = NULL, 
  main = depth_f,  
  xlim = c(min(data[, 1]), max(data[, 1])), 
  ylim = c(min(data[, 2]), max(data[, 2])), 
  zlim = c(0, max(z)), 
  xnum = 250, 
  ynum = 250, 
  theta=15, phi=60,
  bold = F,
  ...)

Arguments

data

2-dimensional numeric data frame or matrix

depth_f

the name of the depth function. The list of the supported depths and described in the topic depth..

apoint

a 2-dimensional point which is shown in black color.

main

an overall title for the plot: see title

xlim, ylim, zlim

numeric vectors of length 2, giving the x, y and z coordinates ranges: see plot.window

xnum, ynum

number of points on each direction, x and y. Impacts the smoothness of the surface.

theta, phi

rotation angles

bold

draws bold points

...

additional parameters passed to persp

See Also

Examples

## Not run: 

par(mfrow = c(2,3), mar = c(0,0,0,0), mai = c(0,0,0.2,0))
data(hemophilia)
depth.graph(hemophilia, "none", xnum = 100, ynum = 100)
depth.graph(hemophilia, "Mahalanobis", xnum = 100, ynum = 100)
depth.graph(hemophilia, "halfspace", xnum = 100, ynum = 100)
depth.graph(hemophilia, "projection", xnum = 100, ynum = 100)
depth.graph(hemophilia, "zonoid", xnum = 100, ynum = 100)
depth.graph(hemophilia, "spatial", xnum = 100, ynum = 100)


## End(Not run)

ddalpha

Depth-Based Classification and Calculation of Data Depth

v1.3.11
GPL-2
Authors
Oleksii Pokotylo [aut, cre], Pavlo Mozharovskyi [aut], Rainer Dyckerhoff [aut], Stanislav Nagy [aut]
Initial release
2020-01-09

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.