draw.von.mises: Generates variates from Von Mises distribution

Description Usage Arguments Value References Examples

View source: R/draw.von.mises.R

Description

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

f(x|K)=\frac{1}{2π I_{0}(K)}e^{Kcos(x)}

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

Usage

1

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

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

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

UnivRNG documentation built on Jan. 11, 2018, 1:03 a.m.