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

cardioid

Cardioid Density Function


Description

Density and random generation for the Cardioid circular distribution.

Usage

dcardioid(x, mu = circular(0), rho = 0)
rcardioid(n, mu = circular(0), rho = 0, control.circular=list())

Arguments

x

a vector. The object is coerced to class circular.

n

number of observations.

mu

mean direction of the distribution. The object is coerced to class circular.

rho

concentration parameter of the distribution. Absolute value of rho must be less than 0.5.

control.circular

the coordinate system used in the output of rcardioid. See circular for details.

Value

dcardioid gives the density and rcardioid generates random deviates.

Author(s)

Claudio Agostinelli and Ulric Lund

References

Jammalamadaka, S. Rao and SenGupta, A. (2001). Topics in Circular Statistics, Section 2.2.2, World Scientific Press, Singapore.

Examples

set.seed(1234) 
  resrad <- rcardioid(n=10)
  set.seed(1234)
  resdeg <- rcardioid(n=10, control.circular=list(units="radians", zero=pi))  
  max(abs(resrad - conversion.circular(resdeg, zero=0)))

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.