|
NAG[g05lpc] NAG[nag_rngs_von_mises] - Generates a vector of random numbers from a von Mises distribution, seeds and generator number passed explicitly
|
|
Calling Sequence
g05lpc(vk, n, x, igen, iseed, 'fail'=fail)
nag_rngs_von_mises(. . .)
Parameters
|
vk - float;
|
|
|
On entry: , the concentration argument of the required von Mises distribution.
|
|
Constraint: . .
|
|
|
n - integer;
|
|
|
On entry: , the number of pseudo-random numbers to be generated.
|
|
Constraint: . .
|
|
|
x - Vector(1..dim, datatype=float[8]);
|
|
|
Note: the dimension, dim, of the array x must be at least .
|
|
On exit: the pseudo-random numbers from the specified von Mises distribution.
|
|
|
iseed - Vector(1.. , datatype=integer[kernelopts('wordsize')/8]);
|
|
|
On entry: contains values which define the current state of the selected generator.
|
|
On exit: contains updated values defining the new state of the selected generator.
|
|
|
'fail'=fail - table; (optional)
|
|
|
The NAG error argument, see the documentation for NagError.
|
|
|
|
Description
|
|
|
Purpose
|
|
nag_rngs_von_mises (g05lpc) generates a vector of pseudo-random numbers from a von Mises distribution with concentration argument .
|
|
Error Indicators and Warnings
|
|
"NE_BAD_PARAM"
On entry, argument had an illegal value.
"NE_INT"
On entry, . Constraint: .
"NE_INTERNAL_ERROR"
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please consult NAG for assistance.
"NE_REAL"
On entry, . Constraint: .
|
|
Further Comments
|
|
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.
|
|
|
Examples
|
|
>
|
vk := 1:
n := 5:
igen := 1:
x := Vector(5, datatype=float[8]):
iseed := Vector([1762543, 9324783, 42344, 742355], datatype=integer[kernelopts('wordsize')/8]):
NAG:-g05lpc(vk, n, x, igen, iseed):
|
|
|
See Also
|
|
Best D J and Fisher N I (1979) Efficient simulation of the von Mises distribution Appl. Statist. 28 152–157
Dagpunar J (1988) Principles of Random Variate Generation Oxford University Press
Mardia K V (1972) Statistics of Directional Data Academic Press
g05 Chapter Introduction.
NAG Toolbox Overview.
NAG Web Site.
|
|
Download Help Document
Was this information helpful?