Learn R Programming

rsdepth (version 0.1-1)

rsmed: Bivariate RS median

Description

Computes the Ray Shooting median of a bivariate data set.

Usage

rsmed(pt, ...)

Arguments

pt
The data as a matrix, data frame or list. If it is a matrix or data frame, then each row is viewed as one multivariate observation. If it is a list, all components must be numerical vectors of equal length (coordinates of observations). Only 2-dimensional
...
Reserved for future use.

Value

  • A point in two dimension is returned as a single row two column vector

Details

Finds out the an arbitrary point among the Ray Shooting median set of given point set. Current uses the brute-force algorithm on all O(n^4) possible points in the arrangment of all possible lines in complete graph on pt. For each point O(n log n) is used to find out depth so overall complexity of this algorithm is O(n^5 log n).

References

N. Mustafa, S. Ray, and M. Shabbir, Statistical Data Depth of Pointsets in the Plane,in prep..

See Also

rsdepth for depth function

Examples

Run this code
##  RS median of a two-dimensional data set
set.seed(601)
zz <- matrix(rnorm(30), nc = 2)
rsmed(zz)

Run the code above in your browser using DataLab