Title: | The Discrete Stable Distribution Functions |
---|---|
Description: | Probability generating function, formulae for the probabilities (discrete density) and random generation for discrete stable random variables. |
Authors: | Krutto Annika [aut, cre] |
Maintainer: | Krutto Annika <[email protected]> |
License: | GPL-3 |
Version: | 0.1.0 |
Built: | 2024-11-27 06:36:20 UTC |
Source: | CRAN |
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.
ddstable(x, alpha, lambda)
ddstable(x, alpha, lambda)
x |
a vector of non-negative integer quantiles, |
alpha |
tail index parameter |
lambda |
positive location parameter |
Returns the value of the formulae for the probabilities (density) of DS(alpha,lambda)
.
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.
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
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
Computes probability generating function of a discrete stable distribution DS(alpha,lambda)
.
pgdstable(z, alpha, lambda = 1)
pgdstable(z, alpha, lambda = 1)
z |
argument of probability generating function, |
alpha |
tail index parameter |
lambda |
positive location parameter |
Returns value of probability generating function of DS(alpha,lambda)
. A warning is displayed for invalid parameter values.
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.
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')
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')
Generates random variates from a discrete stable distribution DS(alpha,lambda)
.
rdstable(n, alpha, lambda = 1)
rdstable(n, alpha, lambda = 1)
n |
number of random values to return. |
alpha |
tail index parameter |
lambda |
positive location parameter |
returns random variates from DS(alpha,lambda)
. A warning is displayed for invalid parameter values.
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.
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
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