Mises {rotations} | R Documentation |
The circular-von Mises distribution
Description
Density, distribution function and random generation for the circular-von Mises distribution with concentration kappa
\kappa
.
Usage
dvmises(r, kappa = 1, nu = NULL, Haar = TRUE)
pvmises(q, kappa = 1, nu = NULL, lower.tail = TRUE)
rvmises(n, kappa = 1, nu = NULL)
Arguments
r , q |
vector of quantiles |
kappa |
concentration parameter. |
nu |
circular variance, can be used in place of |
Haar |
logical; if TRUE density is evaluated with respect to the Haar measure. |
lower.tail |
logical; if TRUE (default), probabilities are |
n |
number of observations. If |
Details
The circular von Mises distribution with concentration \kappa
has density
C_\mathrm{M}(r|\kappa)=\frac{1}{2\pi \mathrm{I_0}(\kappa)}e^{\kappa cos(r)}.
where \mathrm{I_0}(\kappa)
is the modified Bessel function of order 0.
Value
dvmises |
gives the density |
pvmises |
gives the distribution function |
rvmises |
generates random deviates |
See Also
Angular-distributions for other distributions in the rotations package.
Examples
r <- seq(-pi, pi, length = 500)
#Visualize the von Mises density fucntion with respect to the Haar measure
plot(r, dvmises(r, kappa = 10), type = "l", ylab = "f(r)", ylim = c(0, 100))
#Visualize the von Mises density fucntion with respect to the Lebesgue measure
plot(r, dvmises(r, kappa = 10, Haar = FALSE), type = "l", ylab = "f(r)")
#Plot the von Mises CDF
plot(r,pvmises(r,kappa = 10), type = "l", ylab = "F(r)")
#Generate random observations from von Mises distribution
rs <- rvmises(20, kappa = 1)
hist(rs, breaks = 10)