Learn R Programming

portes (version 1.04)

rstable: Generate Data From Stable Distributions

Description

Generate data from stable distribution with infinite variance.

Usage

rstable(n, ALPHA, BETA, GAMMA = NULL, DELTA = NULL)

Arguments

n
length of the series.
ALPHA
index parameters, each in the range (0,2].
BETA
skewness parameters, each in the range [-1, 1].
GAMMA
scale parameters.
DELTA
location parameters.

Value

  • A vector of dimension $n\times k$ from independent stable distributions.

Details

ALPHA, BETA, GAMMA, and DELTA should have the same length. This length, $k$, represents the number of the variables that we need to generate.

References

Chambers, J.M., Mallows, C.L., and Stuck, B.W. (1976). "A Method for Simulating Stable Random Variables". Journal of American Statistical Association, 71, 340-344.

See Also

There is also a function rstable in the fBasics package for the univariate case only. See also FitStable, simvarma

Examples

Run this code
## Generate Univariate Data
n <- 500
ALPHA <- 1.75
BETA <- 0
GAMMA <- 1.5
DELTA <- 0
rstable(n, ALPHA, BETA, GAMMA, DELTA)                
## Generate Bivariate Data  
n <- 500
ALPHA <- c(1.3,1.5)
BETA <- c(0.3,-0.6)
rstable(n, ALPHA, BETA)  
## Generate Multivariate Data with 
n <- 500
ALPHA <- c(1.3,1.5,1.7)
BETA <- c(0.3,-0.6,0)
GAMMA <- c(3,1,6)
rstable(n, ALPHA, BETA,GAMMA)

Run the code above in your browser using DataLab