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

median.circular

Median Direction


Description

Sample median direction for a vector of circular data

Usage

## S3 method for class 'circular'
median(x, na.rm = FALSE, ...)

Arguments

x

a vector. The object is coerced to class circular.

na.rm

logical, indicating if NA's should be omitted.

...

NotYetUsed.

Details

The Definition in equations 2.32 & 2.33 from N.I. Fisher's 'Statistical Analysis of Circular Data', Cambridge Univ. Press 1993. is implemented. Since version 0.4-4, the algorithm (not the definition) for the calculation of the median is changed. For a measure of spread associated to the circular median use function meandeviation.

Value

A scalar with the circular median value.

The median is returned as an object of class circular.

Author(s)

Claudio Agostinelli and Alessandro Gagliardi

References

N.I. Fisher (1993) Statistical Analysis of Circular Data, Cambridge University Press.

R.Y. Liu and K. Singh (1992) Ordering Directional Data: Concepts of Data Depth on Circles and Spheres, The Annals of Statistics, vol. 20, n. 3, 1468-1484.

See Also

Examples

# Compute the median direction of a random sample of observations.
x <- circular(runif(50, circular(0), pi))
median(x) #only the median is returned
meandeviation(x) #mean deviation is reported

circular

Circular Statistics

v0.4-93
GPL-2
Authors
Ulric Lund <ulund@calpoly.edu> [aut], Claudio Agostinelli <claudio.agostinelli@unitn.it> [aut, cre], Hiroyoshi Arai <h_arai@aoni.waseda.jp> [ctb], Alessando Gagliardi <gagliardi@stud.unive.it> [ctb], Eduardo Garcia Portugues <edgarcia@est-econ.uc3m.es> [ctb], Dimitri Giunchi <dimitri.giunchi@unipi.it> [ctb], Jean-Olivier Irisson <irisson@normalesup.org> [ctb], Matthew Pocernich <pocernic@ucar.edu> [ctb], Federico Rotolo [ctb]
Initial release
2017-06-26

We don't support your browser anymore

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