cardioid: Cardioid Density Function

Description Usage Arguments Value Author(s) References Examples

Description

Density and random generation for the Cardioid circular distribution.

Usage

1
2
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

1
2
3
4
5
  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)))

Example output

Attaching package: 'circular'

The following objects are masked from 'package:stats':

    sd, var

[1] 1.595946e-16

circular documentation built on May 2, 2019, 4:42 p.m.