Sample Univariate Distributions Involved in Nested Frank and Joe Copulas
rF01Frank
:
Generate a vector of random variates V01 ~ F01
with Laplace-Stieltjes transform
psi01(t;V0) = ((1-(1-exp(-t)*(1-e^-theta1))^(theta0/theta1))/ (1-e^-theta0))^V0.
for the given realizations V0 of Frank's F0 and the
parameters theta0, theta1 in (0,Inf)
such that theta0 <= theta1. 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 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
psi01(t;V0) = (1-(1-exp(-t))^alpha)^V0.
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
V01 = V0^(1/alpha) S(alpha,1, cos^(1/alpha)(alpha*pi/2), 1_(alpha==1); 1)
is used to sample V01.
rF01Frank(V0, theta0, theta1, rej, approx) rF01Joe(V0, alpha, approx)
V0 |
a vector of random variates from F0. |
theta0, theta1, alpha |
parameters theta0, theta1 and alpha as described above. |
rej |
parameter value as described above. |
approx |
parameter value as described above. |
A vector of positive integer
s of length n
containing the generated random variates.
Hofert, M. (2011). Efficiently sampling nested Archimedean copulas. Computational Statistics & Data Analysis 55, 57–70.
## 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)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.