Last chance! 50% off unlimited learning
Sale ends in
rF01Frank
:
Generate a vector of random variates $V_{01}\sim F_{01}$
with Laplace-Stieltjes transform
rej
is used
to determine the cut-off point of two algorithms that are involved in
sampling $F_{01}$. If
$\code{rej} < V_0\theta_0(1-e^{-\theta_0})^{V_0-1}$
a rejection from $F_{01}$ 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 $V_{01}\sim F_{01}$
with Laplace-Stieltjes transform
approx
denotes the largest number of summands in the
sum-representation of $V_{01}$ before the asymptotic
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@tauInv(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@tauInv(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@tauInv(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@tauInv(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