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

retstable

Sampling Exponentially Tilted Stable Distributions


Description

Generating random variates of an exponentially tilted stable distribution of the form

tS(alpha, 1, (cos(alpha*pi/2)V0)^(1/alpha), V0*1_(alpha==1), h*1_(alpha!=1)),

with parameters alpha in (0,1], V0 in (0,Inf), and h in [0,Inf) and corresponding Laplace-Stieltjes transform

exp(-V0((h+t)^alpha-h^alpha)), t in [0,Inf];

see the references for more details about this distribution.

Usage

retstable(alpha, V0, h = 1, method = NULL)
retstableR(alpha, V0, h = 1)

Arguments

alpha

parameter in (0,1].

V0

vector of values in (0,Inf) (for example, when sampling nested Clayton copulas, these are random variates from F0), that is, the distribution corresponding to psi0.

h

parameter in [0,Inf).

method

a character string denoting the method to use, currently either "MH" (Marius Hofert's algorithm) or "LD" (Luc Devroye's algorithm). By default, when NULL, a smart choice is made to use the fastest of these methods depending on the specific values of V0.

Details

retstableR is a pure R version of "MH", however, not as fast as retstable (implemented in C, based on both methods) and therefore not recommended in simulations when run time matters.

Value

A vector of variates from tS(alpha, 1, .....); see above.

References

Devroye, L. (2009) Random variate generation for exponentially and polynomially tilted stable distributions, ACM Transactions on Modeling and Computer Simulation 19, 18, 1–20.

Hofert, M. (2011) Efficiently sampling nested Archimedean copulas, Computational Statistics & Data Analysis 55, 57–70.

Hofert, M. (2012), Sampling exponentially tilted stable distributions, ACM Transactions on Modeling and Computer Simulation 22, 1.

See Also

rstable1 for sampling stable distributions.

Examples

## Draw random variates from an exponentially tilted stable distribution
## with given alpha, V0, and h = 1
alpha <- .2
V0 <- rgamma(200, 1)
rETS <- retstable(alpha, V0)

## Distribution plot the random variates -- log-scaled
hist(log(rETS), prob=TRUE)
lines(density(log(rETS)), col=2)
rug (log(rETS))

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.