rvm {CircularDDM} | R Documentation |
Generate random deviates for the von Mises distribution
Description
Generate random deviates for the von Mises distribution.
Usage
rvm(n, mu, k)
Arguments
n |
number of observations. |
mu |
mean direction of the distribution. |
k |
non-negative numeric value for the concentration parameter of the distribution |
Details
A random variable for circular normal distribution has the form:
f(theta; mu, kappa) = 1 / (2 * pi * I0(kappa)) * exp(kappa * cos(theta-mu))
theta is withins 0 and 2 * pi.
I0(kappa)
in the normalizing constant is the modified Bessel
function of the first kind and order zero.
Value
a vector
Examples
n <- 100
mu <- 0
k <- 10
vm3_de <- rvm(n, mu, k) ## in degree unit
vm3_pi <- vm3_de %% (2 * pi) ## in radian unit
[Package CircularDDM version 0.1.0 Index]