nag_rngs_von_mises (g05lpc) generates a vector of pseudorandom numbers from a von Mises distribution with concentration parameter .
The von Mises distribution is a symmetric distribution used in the analysis of circular data. The probability density function of this distribution on the circle with mean direction
and concentration parameter kappa,
, can be written as:
where
is reduced modulo
so that
and
. For very small
the distribution is almost the uniform distribution, whereas for
all the probability is concentrated at one point.
The
variates,
, are generated using an envelope rejection method with a wrapped Cauchy target distribution as proposed by
Best and Fisher (1979) and described by
Dagpunar (1988).
One of the initialization functions
nag_rngs_init_repeatable (g05kbc) (for a repeatable sequence if computed sequentially) or
nag_rngs_init_nonrepeatable (g05kcc) (for a non-repeatable sequence) must be called prior to the first call to nag_rngs_von_mises (g05lpc).
Best D J and Fisher N I (1979) Efficient simulation of the von Mises distribution Appl. Statist. 28 152–157
Not applicable.
For a given number of random variates the generation time increases slightly with increasing .
If
vk is supplied too large (i.e.,
) then floating point overflow will occur in internal calculation.
This example prints the first five pseudorandom real numbers from a von Mises distribution with
, generated by a single call to nag_rngs_von_mises (g05lpc), after initialization by
nag_rngs_init_repeatable (g05kbc).
None.