retstable {copula}R Documentation

Sampling Exponentially Tilted Stable Distributions

Description

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

\tilde{S}(\alpha, 1, (\cos(\alpha\pi/2)V_0)^{1/\alpha}, V_0\mathbf{1}_{\{\alpha=1\}}, h\mathbf{1}_{\{\alpha\ne 1\}}; 1),

with parameters \alpha\in(0,1], V_0\in(0,\infty), and h\in[0,\infty) and corresponding Laplace-Stieltjes transform

\exp(-V_0((h+t)^\alpha-h^\alpha)),\ t\in[0,\infty];

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,\infty) (for example, when sampling nested Clayton copulas, these are random variates from F_0), that is, the distribution corresponding to \psi_0.

h

parameter in [0,\infty).

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 V_0.

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 \tilde{S}(\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))

[Package copula version 1.1-3 Index]