rF01Frank
:
Generate a vector of random variates $V01 ~ F01$
with Laplace-Stieltjes transform
rej is used
to determine the cut-off point of two algorithms that are involved in
sampling $F01$. If
$
rej < V0*theta_0*(1-e^{-theta0})^(V0-1)$
a rejection from $F01$ 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 $V01 ~ F01$
with Laplace-Stieltjes transform
for the given realizations $V0$ of Joe's $F0$ and
the parameter $alpha in (0,1]$. This distribution
appears on sampling nested Joe copulas. Here,
$alpha = theta0/theta1$, where
$theta0, theta1 in [1,Inf)$ such
that $theta0 <= theta1$.="" the="" parameter="" approx denotes the largest number of summands in the
sum-representation of $V01$ before the asymptotic
is used to sample $V01$.
rF01Frank(V0, theta0, theta1, rej, approx)
rF01Joe(V0, alpha, approx)
integer
s of length n
containing the generated random variates.
rFFrank
, rFJoe
, rSibuya
,
and rnacopula
.## 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)
Run the code above in your browser using DataLab