Learn R Programming

mixSSG (version 2.1.1)

rpstable: Simulating positive stable random variable.

Description

The cumulative distribution function of positive stable distribution is given by $$ F_{P}(x)=\frac{1}{\pi}\int_{0}^{\pi}\exp\Bigl\{-x^{-\frac{\alpha}{2-\alpha}}a(\theta)\Bigr\}d\theta, $$ where \(0<\alpha \leq 2\) is tail thickness or index of stability and $$ a(\theta)=\frac{\sin\Bigl(\bigl(1-\frac{\alpha}{2}\bigr)\theta\Bigr)\Bigl[\sin \bigl(\frac{\alpha \theta}{2}\bigr)\Bigr]^{\frac{\alpha}{2-\alpha}}}{[\sin(\theta)]^{\frac{2}{2-\alpha}}}. $$ Kanter (1975) used the above integral transform to simulate positive stable random variable as $$P\mathop=\limits^d\Bigl( \frac{a(\theta)}{W} \Bigr)^{\frac{2-\alpha}{\alpha}},$$ in which \(\theta\sim U(0,\pi)\) and \(W\) independently follows an exponential distribution with mean unity.

Usage

rpstable(n, alpha)

Value

simulated realizations of size \(n\) from positive \(\alpha\)-stable distribution.

Arguments

n

the number of samples required.

alpha

the tail thickness parameter.

Author

Mahdi Teimouri

References

M. Kanter, 1975. Stable densities under change of scale and total variation inequalities, Annals of Probability, 3(4), 697-707.

Examples

Run this code
 rpstable(10, alpha = 1.2) 

Run the code above in your browser using DataLab