Learn R Programming

depth (version 2.1-1.1)

depth-package: Depth functions tools for multivariate analysis

Description

This is a collection of functions applying depth functions methodology to multivariate analysis. Besides allowing calculation of depth values and depth-based location estimators, the package includes functions for drawing contour plots and perspective plots of depth functions.

Arguments

Details

Package: depth
Type: Package
Version: 2.0
Date: 2012-08-12
License: GPL-2
LazyLoad: yes

All functions apply to a multivariate data set. Function depth calculates the depth of a point with respect to the data set. Depth functions covered are Tukey's, Liu's and Oja's. Functions med, trmean and ctrmean return depth-based medians, classical-like trimmed means and centroid trimmed means, respectively. Functions perspdepth and isodepth draw perspective and contour plots, respectively. Functions sdepth, smed, strmeasure and scontour give equivalent results for directional data.

References

Liu, R.Y., Parelius, J.M. and Singh, K. (1999), Multivariate analysis by data depth: Descriptive statistics, graphics and inference (with discussion), Ann. Statist., 27, 783--858.

Liu, R.Y. and Singh, K. (1992), Directional data: Concepts of data depth on circles and spheres, Ann. Statist., 20, 1468--1484.

Mardia, K.V. and Jupp, E.J. (1999). Directional Statistics, Wiley.

Small, C.G. (1990), A survey of multidimensional medians, Int. Statist. Rev., 58, 263--277.

Zuo, Y. amd Serfling, R. (2000), General Notions of Statistical Depth Functions, Ann. Statist., 28, no. 2, 461--482.

Examples

Run this code
# NOT RUN {
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))
depth(c(0,0),mixbivnorm)
med(mixbivnorm)
trmean(mixbivnorm, 0.2)
library(rgl)
perspdepth(mixbivnorm, col = "magenta")
isodepth(mixbivnorm, dpth = c(35,5), col = rainbow(2))
# }

Run the code above in your browser using DataLab