The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

Type: Package
Title: The Discrete Stable Distribution Functions
Version: 0.1.0
Maintainer: Krutto Annika <annikakrutto@gmail.com>
Description: Probability generating function, formulae for the probabilities (discrete density) and random generation for discrete stable random variables.
License: GPL-3
Encoding: UTF-8
Imports: stabledist, stats, Rdpack
RdMacros: Rdpack
RoxygenNote: 7.2.3
NeedsCompilation: no
Packaged: 2023-05-02 19:57:13 UTC; annikakrutto
Author: Krutto Annika ORCID iD [aut, cre]
Repository: CRAN
Date/Publication: 2023-05-03 18:50:05 UTC

dstabledist: The Discrete Stable Distribution Functions

Description

Probability generating function, formulae for the probabilities (discrete density) and random generation for discrete stable random variables.

Author(s)

Maintainer: Krutto Annika annikakrutto@gmail.com (ORCID)


The discrete stable distribution: formulae for the probabilities (density)

Description

Computes the value of the formulae for the probabilities (density) of a discrete stable distribution DS(alpha,lambda), by combining the explicit and fast asymptotic formulae.

Usage

ddstable(x, alpha, lambda)

Arguments

x

a vector of non-negative integer quantiles, k>=0

alpha

tail index parameter alpha in the interval= (0, 1]

lambda

positive location parameter lambda>0

Value

Returns the value of the formulae for the probabilities (density) of DS(alpha,lambda).

References

Christoph G, Schreiber K (1998). “Discrete stable random variables.” Statistics & Probability Letters, 37(3), 243-247. ISSN 0167-7152, doi:10.1016/S0167-7152(97)00123-5.

Examples

ddstable(c(0,1,2,100),1,lambda=1)#This is Poisson with lambda=1
dpois(c(0,1,2,100),1)#Checking with dpois
ddstable(c(0,1,2,100),0.5,lambda=1) # tail is heavier
ddstable(c(0,1,2,3,6,100),0.5,lambda=3) # change in location

The discrete stable distribution: probability generating function

Description

Computes probability generating function of a discrete stable distribution DS(alpha,lambda).

Usage

pgdstable(z, alpha, lambda = 1)

Arguments

z

argument of probability generating function, z in the interval= [-1, 1].

alpha

tail index parameter alpha in the interval= (0, 1].

lambda

positive location parameter lambda>0.

Value

Returns value of probability generating function of DS(alpha,lambda). A warning is displayed for invalid parameter values.

References

Steutel FW, van Harn K (1979). “Discrete Analogues of Self-Decomposability and Stability.” The Annals of Probability, 7(5), 893 – 899. doi:10.1214/aop/1176994950.

Examples

pgdstable(c(-1,0,1),0.5,1)
pgdstable(c(-1,0,1),1,1) #This is Poisson
 curve(pgdstable(x,1,lambda=1), c(-1,1),col=1,ylab='prob. gen. fun.',xlab='z')
 curve(pgdstable(x,0.5,lambda=1), c(-1,1),col=2,add=TRUE)
 curve(pgdstable(x,0.2,lambda=1), c(-1,1),col=4,add=TRUE)
legend('topleft',legend=c(1,0.5,0.1), col=c(1,2,4), lty = 1, title='alpha')

The discrete stable distribution: random generation

Description

Generates random variates from a discrete stable distribution DS(alpha,lambda).

Usage

rdstable(n, alpha, lambda = 1)

Arguments

n

number of random values to return.

alpha

tail index parameter alpha in the interval= (0, 1]

lambda

positive location parameter lambda>0

Value

returns random variates from DS(alpha,lambda). A warning is displayed for invalid parameter values.

References

Devroye L (1993). “A triptych of discrete distributions related to the stable law.” Statistics & Probability Letters, 18(5), 349-351. ISSN 0167-7152, doi:10.1016/0167-7152(93)90027-G.

Examples

rdstable(10,alpha=1,lambda=1) #this is Poisson
rdstable(10,alpha=0.5,lambda=1) # heavier tail more prone to extremes
rdstable(10,alpha=0.1,lambda=1) # heavier tail more prone to extremes

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.