Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rF01FrankJoe

Sample Univariate Distributions Involved in Nested Frank and Joe Copulas


Description

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.

Usage

rF01Frank(V0, theta0, theta1, rej, approx)
rF01Joe(V0, alpha, approx)

Arguments

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.

Value

A vector of positive integers 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

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)

copula

Multivariate Dependence with Copulas

v1.0-1
GPL (>= 3) | file LICENCE
Authors
Marius Hofert [aut] (<https://orcid.org/0000-0001-8009-4665>), Ivan Kojadinovic [aut] (<https://orcid.org/0000-0002-2903-1543>), Martin Maechler [aut, cre] (<https://orcid.org/0000-0002-8685-9910>), Jun Yan [aut] (<https://orcid.org/0000-0003-4401-7296>), Johanna G. Nešlehová [ctb] (evTestK(), <https://orcid.org/0000-0001-9634-4796>), Rebecca Morger [ctb] (fitCopula.ml(): code for free mixCopula weight parameters)
Initial release
2020-12-07

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.