rStable: Generate Data From Stable Distributions

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Generate data from stable distribution with infinite variance.

Usage

1
    rStable(n, Alpha, Beta, Scale = NULL, Location = NULL)

Arguments

n

length of the series.

Alpha

index stability parameters, each in the range (0,2].

Beta

skewness parameters, each in the range [-1, 1].

Scale

scale parameters.

Location

location parameters.

Details

Alpha, Beta, Scale, and Location should have the same length. This length, k, represents the number of the variables that we need to generate. The code in the function rStable extends that one given in the package fBasics to the multivariate case. Many thanks to Diethelm Wuertz for putting his code under the GPL license.

Value

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

Author(s)

Esam Mahdi and A.I. McLeod.

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.

Wuertz, D., core team members R (2014). "fBasics: Rmetrics - Markets and Basic Statistics". R package version 3011.87. https://CRAN.R-project.org/package=fBasics

See Also

There is also a function rstable in the fBasics package for the univariate case only. See also fitstable, varima.sim

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Generate Univariate Data
n <- 500
Alpha <- 1.75
Beta <- 0
Scale <- 1.5
Location <- 0
rStable(n, Alpha, Beta, Scale, Location)                
## Generate Bivariate Data  
n <- 500
Alpha <- c(1.3,1.5)
Beta <- c(0.3,-0.6)
rStable(n, Alpha, Beta)  
## Generate Multivariate Data
n <- 500
Alpha <- c(1.3,1.5,1.7)
Beta <- c(0.3,-0.6,0)
Scale <- c(3,1,6)
rStable(n, Alpha, Beta,Scale)  

portes documentation built on Jan. 13, 2021, 6:28 p.m.