draw.von.mises {UnivRNG}R Documentation

Generates variates from Von Mises distribution

Description

This function implements pseudo-random number generation for a Von Mises distribution with pdf

f(xK)=12πI0(K)eKcos(x)f(x|K)=\frac{1}{2\pi I_{0}(K)}e^{Kcos(x)}

for πxπ-\pi \leq x \leq \pi and K>0K > 0 where I0(K)I_{0}(K) is a modified Bessel function of the first kind of order 0.

Usage

draw.von.mises(nrep,K)

Arguments

nrep

Number of data points to generate.

K

Parameter of the desired von Mises distribution.

Value

A list of length three containing generated data, the theoretical mean, and the empirical mean with names y, theo.mean, and emp.mean, respectively.

References

Best, D. J., & Fisher, N. I. (1979). Efficient simulation of the von mises distribution. Applied Statistics, 28, 152-157.

Examples

draw.von.mises(nrep=100000,K=10)

draw.von.mises(nrep=100000,K=0.5)

[Package UnivRNG version 1.2.3 Index]