Learn R Programming

BayesBridge (version 0.6)

retstable.ld: Sampling exponentially tilted stable distributions

Description

From the copula package:

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]$, $V0 in (0,Inf)$, and $h in [0,Inf)$ 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.ld(num=1, alpha=1, V0=1, h=1)

Arguments

num
Number of random variates to generate
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)$.

Value

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

References

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, page numbers: to be announced.

Examples

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

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

Run the code above in your browser using DataLab