rF01FrankJoe {copula} | R Documentation |
Sample Univariate Distributions Involved in Nested Frank and Joe Copulas
Description
rF01Frank
:
Generate a vector of random variates
with Laplace-Stieltjes transform
for the given realizations of Frank's
and the
parameters
such that
. This distribution
appears on sampling nested Frank copulas. The parameter
rej
is used
to determine the cut-off point of two algorithms that are involved in
sampling . If
a rejection from
of Joe is applied (see
rF01Joe
; the meaning of the parameter approx
is
explained below), otherwise a sum is sampled with a logarithmic
envelope for each summand.
rF01Joe
:
Generate a vector of random variates
with Laplace-Stieltjes transform
for the given realizations of Joe's
and
the parameter
. This distribution
appears on sampling nested Joe copulas. Here,
, where
such
that
. The parameter
approx
denotes the largest number of summands in the
sum-representation of before the asymptotic
is used to sample .
Usage
rF01Frank(V0, theta0, theta1, rej, approx)
rF01Joe(V0, alpha, approx)
Arguments
V0 |
a vector of random variates from |
theta0 , theta1 , alpha |
parameters
|
rej |
parameter value as described above. |
approx |
parameter value as described above. |
Value
A vector of positive integer
s of length n
containing the generated random variates.
References
Hofert, M. (2011). Efficiently sampling nested Archimedean copulas. Computational Statistics & Data Analysis 55, 57–70.
See Also
rFFrank
, rFJoe
, rSibuya
,
and rnacopula
.
Examples
## Sample n random variates V0 ~ F0 for Frank and Joe with parameter
## chosen such that Kendall's tau equals 0.2 and plot histogram
n <- 1000
theta0.F <- copFrank@iTau(0.2)
V0.F <- copFrank@V0(n,theta0.F)
hist(log(V0.F), prob=TRUE); lines(density(log(V0.F)), col=2, lwd=2)
theta0.J <- copJoe@iTau(0.2)
V0.J <- copJoe@V0(n,theta0.J)
hist(log(V0.J), prob=TRUE); lines(density(log(V0.J)), col=2, lwd=2)
## Sample corresponding V01 ~ F01 for Frank and Joe and plot histogram
## copFrank@V01 calls rF01Frank(V0, theta0, theta1, rej=1, approx=10000)
## copJoe@V01 calls rF01Joe(V0, alpha, approx=10000)
theta1.F <- copFrank@iTau(0.5)
V01.F <- copFrank@V01(V0.F,theta0.F,theta1.F)
hist(log(V01.F), prob=TRUE); lines(density(log(V01.F)), col=2, lwd=2)
theta1.J <- copJoe@iTau(0.5)
V01.J <- copJoe@V01(V0.J,theta0.J,theta1.J)
hist(log(V01.J), prob=TRUE); lines(density(log(V01.J)), col=2, lwd=2)