powered by
Density, distribution function and random generation for the von Mises distribution.
dvm(x, mu = 0, kappa = 1, log = FALSE)pvm(q, mu = 0, kappa = 1, from = NULL, tol = 1e-20)rvm(n, mu = 0, kappa = 1, wrap = TRUE)
pvm(q, mu = 0, kappa = 1, from = NULL, tol = 1e-20)
rvm(n, mu = 0, kappa = 1, wrap = TRUE)
dvm gives the density, pvm gives the distribution function, and rvm generates random deviates.
dvm
pvm
rvm
vector of angles measured in radians at which to evaluate the density function.
mean direction of the distribution measured in radians.
non-negative numeric value for the concentration parameter of the distribution.
logical; if TRUE, densities are returned on the log scale.
TRUE
value from which the integration for CDF starts. If NULL, is set to mu - pi.
NULL
mu - pi
the precision in evaluating the distribution function
number of observations. If length(n) > 1, the length is taken to be the number required.
length(n) > 1
logical; if TRUE, generated angles are wrapped to the interval [-pi, pi].
The implementation of dvm allows for automatic differentiation with RTMB. rvm and pvm are imported from CircStats and circular respectively.
RTMB
CircStats
circular
set.seed(1) x = rvm(10, 0, 1) d = dvm(x, 0, 1) p = pvm(x, 0, 1)
Run the code above in your browser using DataLab