Density, probability distribution function, quantiles, and random generation for the circular normal distribution with mean and kappa.
Usage
rvm(n, mean, kappa)
dvm(theta, mean, kappa, log = FALSE, axial = FALSE)
pvm(theta, mean, kappa, from = NULL, tol = 1e-20)
qvm(p, mean = 0, kappa, from = NULL, tol = .Machine$double.eps^(0.6), ...)
Arguments
- n
integer. Number of observations in degrees
- mean
numeric. Mean angle in degrees
- kappa
numeric. Concentration parameter in the range (0, Inf]
- theta
numeric. Angular value in degrees
- log
logical. If
TRUE
, probabilities p are given as log(p).- axial
logical. Whether the data are axial, i.e. \(\pi\)-periodical (
TRUE
, the default) or directional, i.e. \(2 \pi\)-periodical (FALSE
).- from
if
NULL
is set to \(\mu-\pi\). This is the value from which the pvm and qvm are evaluated. in degrees.- tol
numeric. The precision in evaluating the distribution function or the quantile.
- p
numeric. Vector of probabilities with values in \([0,1]\).
- ...
parameters passed to
stats::integrate()
.
Value
dvm
gives the density,
pvm
gives the probability of the von Mises distribution function,
rvm
generates random deviates (in degrees), and
qvm
provides quantiles (in degrees).
Examples
x <- rvm(5, mean = 90, kappa = 2)
dvm(x, mean = 90, kappa = 2)
#> [1] 0.3413703 0.4993841 0.2342284 0.5070456 0.2700926
dvm(x, mean = 90, kappa = 2, axial = TRUE)
#> [1] 0.23459600 0.90691781 0.08178791 0.96313666 0.11783863
pvm(x, mean = 90, kappa = 2)
#> [1] 0.2042995 0.4078584 0.8721637 0.5674821 0.1512424
qvm(c(.25, .5, .75), mean = 90, kappa = 2)
#> [1] 59.65254 90.00000 120.34746