Generates pseudo-random numbers from a mixture of two von Mises distributions.
rmixedvm(n, mu1, mu2, kappa1, kappa2, p)
number of random variables to generate.
mean direction in radians of one of the two von Mises distributions.
mean direction in radians of the other von Mises distribution.
concentration parameter of one of the two von Mises distributions.
concentration parameter of the other von Mises distribution.
mixing proportion.
Returns a vector of n independent random variables generated from a mixture of two von Mises distributions.
Simulates random variables with the density function p*VM(mu1, kappa1) + (1-p)*VM(mu2, kappa2), where VM is the von Mises density function.
A uniform random variable on (0,1) is generated. If it is less than p, then a variable is generated from VM(mu1, kappa1), else a variable is generated from VM(mu2, kappa2). Simulation from the von Mises distribution is done via the algorithm due to Best and Fisher (1979).
Best, D. and Fisher, N. (1979). Efficient simulation of the von Mises distribution. Applied Statistics, 24, 152-157.