Generates pseudorandom uniform bivariates
whose joint distribution is the Clayton/Cook–Johnson Archimedean copula
with parameter
, given by
with the special cases:
- , the Fréchet–Hoeffding lower bound;
- , the product copula;
- , the Fréchet–Hoeffding upper bound.
The generation method uses conditional sampling.
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_clayton_bivar (g05re).
None.
Not applicable.
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;
- 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); and
is the
machine precision returned by
nag_machine_precision (x02aj).
function g05re_example
fprintf('g05re example results\n\n');
seed = [int64(1762543)];
genid = int64(1);
subid = int64(1);
[state, ifail] = g05kf( ...
genid, subid, seed);
n = int64(13);
sorder = int64(1);
theta = -0.8;
[state, x, ifail] = g05re( ...
n, theta, sorder, state);
disp('Variates from bivariate Clayton/Cook–Johnson copula');
disp(x);