g05yrf generates a quasi-random sequence from a log-normal distribution. It must be preceded by a call to one of the initialization routines
g05ylf or
g05ynf.
g05yrf generates a quasi-random sequence, for a specified subset of dimensions, from a log-normal distribution by first generating a uniform quasi-random sequence, for the specified subset of dimensions, which is then transformed into a log-normal sequence using the exponential of the inverse of the Normal CDF. The type of uniform sequence used depends on the initialization routine called and can include the low-discrepancy sequences proposed by Sobol, Faure or Niederreiter. If the initialization routine
g05ynf was used then the underlying uniform sequence is first scrambled prior to being transformed (see
Section 3 in
g05ynf for details).
Bratley P and Fox B L (1988) Algorithm 659: implementing Sobol's quasirandom sequence generator ACM Trans. Math. Software 14(1) 88–100
Fox B L (1986) Algorithm 647: implementation and relative efficiency of quasirandom sequence generators ACM Trans. Math. Software 12(4) 362–376
Wichura (1988) Algorithm AS 241: the percentage points of the Normal distribution Appl. Statist. 37 477–484
Note: the following variables are used in the parameter descriptions:
- , the number of dimensions required, see g05ylf or g05ynf;
- , the length of iref as supplied to the initialization routines g05ylf or g05ynf.
-
1:
– Integer
Input
-
On entry: the order in which the generated values are returned.
Constraint:
or .
-
2:
– Integer
Input
-
On entry: the number of quasi-random numbers required.
Constraint:
and .
-
3:
– Real (Kind=nag_wp) array
Input
Note: the dimension of the array
xmean
must be at least
.
On entry: specifies, for each dimension, the mean of the underlying Normal distribution.
Constraint:
, for .
-
4:
– Real (Kind=nag_wp) array
Input
Note: the dimension of the array
std
must be at least
.
On entry: specifies, for each dimension, the standard deviation of the underlying Normal distribution.
Constraint:
, for .
-
5:
– Integer
Input
-
On entry: the first dimension to return.
Constraint:
.
-
6:
– Integer
Input
-
On entry: the last dimension to return.
Constraint:
.
-
7:
– Real (Kind=nag_wp) array
Output
Note: the second dimension of the array
quas
must be at least
if
and at least
if
.
On exit: contains the
n quasi-random numbers for the required dimensions of a sequence with
idim dimensions.
For
,
and
, the
th value for the
th dimension is held in
- , if ,
- , if .
-
8:
– Integer
Input
-
On entry: the first dimension of the array
quas as declared in the (sub)program from which
g05yrf is called.
Constraints:
- if , ;
- if , .
-
9:
– Integer array
Communication Array
Note: the dimension of the array
iref
must be at least
.
On entry: contains information on the current state of the sequence.
On exit: contains updated information on the state of the sequence.
-
10:
– Integer
Input/Output
-
On entry:
ifail must be set to
,
or
to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of means that an error message is printed while a value of means that it is not.
If halting is not appropriate, the value
or
is recommended. If message printing is undesirable, then the value
is recommended. Otherwise, the value
is recommended.
When the value or is used it is essential to test the value of ifail on exit.
On exit:
unless the routine detects an error or a warning has been flagged (see
Section 6).
If on entry
or
, explanatory error messages are output on the current error message unit (as defined by
x04aaf).
Not applicable.
Background information to multithreading can be found in the
Multithreading documentation.
Please consult the
X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this routine. Please also consult the
Users' Note for your implementation for any additional implementation-specific information.
None.