powered by
This function implements pseudo-random number generation for a Von Mises distribution with pdf
$$f(x|K)=\frac{1}{2\pi I_{0}(K)}e^{Kcos(x)}$$
for \(-\pi \leq x \leq \pi\) and \(K > 0\) where \(I_{0}(K)\) is a modified Bessel function of the first kind of order 0.
draw.von.mises(nrep,K)
Number of data points to generate.
Parameter of the desired von Mises distribution.
A list of length three containing generated data, the theoretical mean, and the empirical mean with names y, theo.mean, and emp.mean, respectively.
Best, D. J., & Fisher, N. I. (1979). Efficient simulation of the von mises distribution. Applied Statistics, 28, 152-157.
# NOT RUN { draw.von.mises(nrep=100000,K=10) draw.von.mises(nrep=100000,K=0.5) # }
Run the code above in your browser using DataLab