retstable | R Documentation |
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.
retstable(alpha, V0, h = 1, method = NULL)
retstableR(alpha, V0, h = 1)
alpha |
parameter in |
V0 |
vector of values in |
h |
parameter in |
method |
a character string denoting the method to use, currently
either |
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.
A vector of variates from \tilde{S}(\alpha, 1, .....)
; see above.
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.
rstable1
for sampling stable distributions.
## 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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.