Description Usage Arguments Details Value Author(s) References See Also Examples

Draws a perspective plot of the surface of a depth function over the x-y plane.

1 2 |

`x` |
Bivariate data as a matrix, data frame or list. If it is a matrix or data frame, then each row is viewed as one bivariate observation. If it is a list, both components must be numerical vectors of equal length (coordinates of observations). |

`method` |
Character string which determines the depth function used. |

`output` |
Logical. Default FALSE produces a perspective plot; otherwise, returns a list containing the grid points and depth values over these points. |

`tt` |
Gridsize. Number of equally spaced grid points in each coordinate direction to be used in perspective plot. |

`xlab` |
Title for x-axis. Must be a character string. |

`ylab` |
Title for y-axis. Must be a character string. |

`zlab` |
Title for z-axis. Must be a character string. Default NULL identifies the depth function. |

`col` |
Color of the surface plot. Default NULL is "lightblue". |

`...` |
Any additional graphical parameters. |

Requires the `rgl`

package. The perspective plot takes advantage of some of the user interaction facilities of that package.

Default `output = FALSE`

yields a perspective plot; otherwise the function returns a list with components

`x` |
x-coordinates of the grid where the depth function is evaluated. |

`y` |
y-coordinates of the grid where the depth function is evaluated. |

`z` |
Matrix whose entry z[i ,j] is the value of the depth function at (x[i], y[j]). |

Jean-Claude Masse and Jean-Francois Plante, based on Fortran code by Rousseeuw, Ruts and Struyf from University of Antwerp.

Rousseuw, P.J. and Ruts, I. (1996), AS 307 : Bivariate location depth, *Appl. Stat.-J. Roy. S. C*, **45**, 516–526.

1 2 3 4 5 6 7 8 9 10 11 12 | ```
## 2 perspective plots
data(geyser, package = "MASS")
perspdepth(geyser, col = "magenta")
set.seed(159); library(MASS)
mu1 <- c(0,0); mu2 <- c(6,0); sigma <- matrix(c(1,0,0,1), nc = 2)
mixbivnorm <- rbind(mvrnorm(80, mu1, sigma),mvrnorm(20, mu2, sigma))
perspdepth(mixbivnorm, col = "chartreuse")
## grid coordinates and corresponding depth values
set.seed(601)
x <- matrix(rnorm(48), nc = 2)
perspdepth(x, output = TRUE, tt = 10)
``` |

depth documentation built on May 29, 2017, 12:09 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.