AlphaStableDistributions.AlphaSubGaussian
— TypeGenerate alpha-sub-Gaussian (aSG) random numbers.
The implementation is based on https://github.com/ahmd-mahm/alpha-SGNm/blob/master/asgn.m
Reference: A. Mahmood and M. Chitre, "Generating random variates for stable sub-Gaussian processes with memory", Signal Processing, Volume 131, Pages 271-279, 2017. (https://doi.org/10.1016/j.sigpro.2016.08.016.)
Arguments
α
: characteristic exponent associated with the aSGN(m) process. This is
a scalar input and should lie within collect(1.1:0.01:1.98)
.
R
: covariance matrix of any adjacentm+1
samples in an aSGN(m) process.
The dimension of R
is equal to m+1
. It should be a symmetric toeplitz matrix. The maximum acceptable size of R
is 10x10
n
: number of samples required
Examples
julia> x = rand(AlphaSubGaussian(n=1000))
AlphaStableDistributions.subgausscondprobtabulate
— MethodGenerates the conditional probability f(X2|X1) if [X1, X2] is a sub-Gaussian stable random vector such that X1(i)~X2~S(alpha,delta) and rho is the correlation coefficient of the underlying Gaussian vector. We assume the joint-probabiluty is given by f(X1,X2).
Base.rand
— MethodGenerate independent stable random numbers.
:param α: characteristic exponent (0.1 to 2.0) :param β: skew (-1 to +1) :param scale: scale parameter :param loc: location parameter (mean for α > 1, median/mode when β=0)
This implementation is based on the method in J.M. Chambers, C.L. Mallows and B.W. Stuck, "A Method for Simulating Stable Random Variables," JASA 71 (1976): 340-4. McCulloch's MATLAB implementation (1996) served as a reference in developing this code.
StatsAPI.fit
— Methodfit(d::Type{<:AlphaStable}, x; alg=QuickSort)
Fit an α stable distribution to data.
returns AlphaStable
α∈[0.6,2.0], β∈[-1,1] , c∈[0,∞] and δ∈[-∞,∞] are the characteristic exponent, skewness parameter, scale parameter (dispersion^1/α) and location parameter respectively.
α, β, c and δ are computed based on McCulloch (1986) fractile.
StatsAPI.fit
— Methodfit(d::Type{<:AlphaSubGaussian}, x, m; p=1.0)
Fit an aSGN(m) model to data via the covariation method.
The covariation method requires an additional parameter p
. Ideally, 1 < p < α. In most practical impulsive scenarios p=1.0 is sufficient. m
is the number of lags in the covariance matrix.
The implementation is based on https://github.com/ahmd-mahm/alpha-SGNm/blob/master/param_est/asgnfit.m
Reference: A. Mahmood and M. Chitre, "Generating random variates for stable sub-Gaussian processes with memory", Signal Processing, Volume 131, Pages 271-279, 2017. (https://doi.org/10.1016/j.sigpro.2016.08.016.)
StatsAPI.fit
— Methodfit(d::Type{<:SymmetricAlphaStable}, x; alg=QuickSort)
Fit a symmetric α stable distribution to data.
returns SymmetricAlphaStable
α∈[1,2], c∈[0,∞] and δ∈[-∞,∞] are the characteristic exponent, scale parameter (dispersion^1/α) and location parameter respectively.
α is computed based on McCulloch (1986) fractile. scale is computed based on Fama & Roll (1971) fractile. location is the 50% trimmed mean of the sample.