NAG Library Routine Document
G05RKF
Note: before using this routine, please read the Users' Note for your implementation to check the interpretation of bold italicised terms and other implementation-dependent details.
1 Purpose
G05RKF generates pseudorandom uniform variates with joint distribution of a Gumbel–Hougaard Archimedean copula.
2 Specification
INTEGER
N, M, SORDER, STATE(*), LDX, SDX, IFAIL
REAL (KIND=nag_wp)
THETA, X(LDX,SDX)
3 Description
Generates
pseudorandom uniform
-variates whose joint distribution is the Gumbel–Hougaard Archimedean copula
, given by
with the special cases:
- , the product copula;
- , the Fréchet–Hoeffding upper bound.
The generation method uses mixture of powers.
One of the initialization routines
G05KFF (for a repeatable sequence if computed sequentially) or
G05KGF (for a non-repeatable sequence) must be called prior to the first call to G05RKF.
4 References
Marshall A W and Olkin I (1988) Families of multivariate distributions Journal of the American Statistical Association 83 403
Nelsen R B (2006) An Introduction to Copulas (2nd Edition) Springer Series in Statistics
5 Parameters
- 1: N – INTEGERInput
On entry: , the number of pseudorandom uniform variates to generate.
Constraint:
.
- 2: M – INTEGERInput
On entry: , the number of dimensions.
Constraint:
.
- 3: THETA – REAL (KIND=nag_wp)Input
On entry: , the copula parameter.
Constraint:
.
- 4: SORDER – INTEGERInput
On entry: determines the storage order of variates; the
th variate is stored in if , and if , for and .
Constraint:
or .
- 5: STATE() – INTEGER arrayCommunication Array
-
Note: the actual argument supplied must be the array
STATE supplied to the initialization routines
G05KFF or
G05KGF.
On entry: contains information on the selected base generator and its current state.
On exit: contains updated information on the state of the generator.
- 6: X(LDX,SDX) – REAL (KIND=nag_wp) arrayOutput
On exit: the pseudorandom uniform variates with joint distribution described by , with holding the th value for the th dimension if and the th value for the th dimension of .
- 7: LDX – INTEGERInput
On entry: the first dimension of the array
X as declared in the (sub)program from which G05RKF is called.
Constraints:
- if , ;
- if , .
- 8: SDX – INTEGERInput
On entry: the second dimension of the array
X as declared in the (sub)program from which G05RKF is called.
Constraints:
- if , ;
- if , .
- 9: IFAIL – INTEGERInput/Output
On entry:
IFAIL must be set to
,
. If you are unfamiliar with this parameter you should refer to
Section 3.3 in the Essential Introduction for details.
For environments where it might be inappropriate to halt program execution when an error is detected, the value
is recommended. If the output of error messages is undesirable, then the value
is recommended. Otherwise, if you are not familiar with this parameter, the recommended value is
.
When the value 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).
6 Error Indicators and Warnings
If on entry
or
, explanatory error messages are output on the current error message unit (as defined by
X04AAF).
Errors or warnings detected by the routine:
On entry,
STATE vector was not initialized or has been corrupted.
On entry, .
On entry, .
On entry, .
On entry, and .
On entry, and ,
or and .
On entry, and ,
or and .
7 Accuracy
Not applicable.
In practice, the need for numerical stability restricts the range of
such that:
- if , the routine returns pseudorandom uniform variates with joint distribution;
- if , the routine returns pseudorandom uniform variates with joint distribution;
where
is the safe-range parameter, the value of which is returned by
X02AMF.
9 Example
This example generates thirteen four-dimensional variates for copula .
9.1 Program Text
Program Text (g05rkfe.f90)
9.2 Program Data
Program Data (g05rkfe.d)
9.3 Program Results
Program Results (g05rkfe.r)