PDF version (NAG web site
, 64-bit version, 64-bit version)
NAG Toolbox: nag_rand_copula_gumbel (g05rk)
Purpose
nag_rand_copula_gumbel (g05rk) generates pseudorandom uniform variates with joint distribution of a Gumbel–Hougaard Archimedean copula.
Syntax
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 functions
nag_rand_init_repeat (g05kf) (for a repeatable sequence if computed sequentially) or
nag_rand_init_nonrepeat (g05kg) (for a non-repeatable sequence) must be called prior to the first call to
nag_rand_copula_gumbel (g05rk).
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
Parameters
Compulsory Input Parameters
- 1:
– int64int32nag_int scalar
-
, the number of pseudorandom uniform variates to generate.
Constraint:
.
- 2:
– int64int32nag_int scalar
-
, the number of dimensions.
Constraint:
.
- 3:
– double scalar
-
, the copula parameter.
Constraint:
.
- 4:
– int64int32nag_int scalar
-
Determines the storage order of variates; the
th variate is stored in if , and if , for and .
Constraint:
or .
- 5:
– int64int32nag_int array
-
Note: the actual argument supplied
must be the array
state supplied to the initialization routines
nag_rand_init_repeat (g05kf) or
nag_rand_init_nonrepeat (g05kg).
Contains information on the selected base generator and its current state.
Optional Input Parameters
None.
Output Parameters
- 1:
– int64int32nag_int array
-
Contains updated information on the state of the generator.
- 2:
– double array
-
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 .
- 3:
– int64int32nag_int scalar
unless the function detects an error (see
Error Indicators and Warnings).
Error Indicators and Warnings
Errors or warnings detected by the function:
-
-
On entry, corrupt
state argument.
-
-
Constraint: .
-
-
Constraint: .
-
-
Constraint: .
-
-
On entry, invalid
sorder.
Constraint:
or
.
-
-
On entry, ldx is too small: .
-
-
On entry, sdx is too small: .
-
An unexpected error has been triggered by this routine. Please
contact
NAG.
-
Your licence key may have expired or may not have been installed correctly.
-
Dynamic memory allocation failed.
Accuracy
Not applicable.
Further Comments
In practice, the need for numerical stability restricts the range of
such that:
- if , the function returns pseudorandom uniform variates with joint distribution;
- if , the function returns pseudorandom uniform variates with joint distribution;
where
is the safe-range parameter, the value of which is returned by
nag_machine_real_safe (x02am).
Example
This example generates thirteen four-dimensional variates for copula .
Open in the MATLAB editor:
g05rk_example
function g05rk_example
fprintf('g05rk example results\n\n');
seed = [int64(1762543)];
genid = int64(1);
subid = int64(1);
[state, ifail] = g05kf( ...
genid, subid, seed);
n = int64(13);
m = int64(4);
sorder = int64(1);
theta = 2.4;
[state, x, ifail] = g05rk( ...
n, m, theta, sorder, state);
disp('Variates from a Gumbel–Hougaard copula');
disp(x);
g05rk example results
Variates from a Gumbel–Hougaard copula
0.9369 0.8676 0.9713 0.8854
0.1139 0.3063 0.8625 0.2743
0.4418 0.2211 0.5042 0.4985
0.7902 0.6007 0.7493 0.6474
0.8362 0.9847 0.8807 0.9079
0.1781 0.4610 0.1283 0.1329
0.1272 0.1760 0.1805 0.0383
0.4473 0.2171 0.1662 0.1300
0.8899 0.9005 0.8844 0.8879
0.9069 0.8681 0.8450 0.8804
0.2222 0.5499 0.4965 0.6488
0.3807 0.5967 0.5096 0.3577
0.8445 0.7755 0.8661 0.8948
PDF version (NAG web site
, 64-bit version, 64-bit version)
© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2015