Type: | Package |
Title: | Positive Tempered Stable Distributions and Related Subordinators |
Version: | 1.0 |
Date: | 2023-02-04 |
Description: | Contains methods for the simulation of positive tempered stable distributions and related subordinators. Including classical tempered stable, rapidly deceasing tempered stable, truncated stable, truncated tempered stable, generalized Dickman, truncated gamma, generalized gamma, and p-gamma. For details, see Dassios et al (2019) <doi:10.1017/jpr.2019.6>, Dassios et al (2020) <doi:10.1145/3368088>, Grabchak (2021) <doi:10.1016/j.spl.2020.109015>. |
Suggests: | statmod |
Imports: | copula, gsl, stats, tweedie |
License: | GPL (≥ 3) |
NeedsCompilation: | yes |
Packaged: | 2023-02-17 00:40:03 UTC; lcao2 |
Author: | Michael Grabchak [aut, cre], Lijuan Can [aut] |
Maintainer: | Michael Grabchak <mgrabcha@uncc.edu> |
Repository: | CRAN |
Date/Publication: | 2023-02-17 10:00:12 UTC |
Positive Tempered Stable Distributions and Related Subordinators
Description
Contains methods for the simulation of positive tempered stable distributions and related subordinators. Including classical tempered stable, rapidly deceasing tempered stable, truncated stable, truncated tempered stable, generalized Dickman, truncated gamma, generalized gamma, and p-gamma. For details, see Dassios et al (2019) <doi:10.1017/jpr.2019.6>, Dassios et al (2020) <doi:10.1145/3368088>, Grabchak (2021) <doi:10.1016/j.spl.2020.109015>.
Details
The DESCRIPTION file:
Package: | SubTS |
Type: | Package |
Title: | Positive Tempered Stable Distributions and Related Subordinators |
Version: | 1.0 |
Date: | 2023-02-04 |
Authors@R: | c(person("Michael", "Grabchak", role = c("aut", "cre"), email = "mgrabcha@uncc.edu"), person("Lijuan", "Can", role = "aut") ) |
Description: | Contains methods for the simulation of positive tempered stable distributions and related subordinators. Including classical tempered stable, rapidly deceasing tempered stable, truncated stable, truncated tempered stable, generalized Dickman, truncated gamma, generalized gamma, and p-gamma. For details, see Dassios et al (2019) <doi:10.1017/jpr.2019.6>, Dassios et al (2020) <doi:10.1145/3368088>, Grabchak (2021) <doi:10.1016/j.spl.2020.109015>. |
Suggests: | statmod |
Imports: | copula, gsl, stats, tweedie |
License: | GPL (>= 3) |
Author: | Michael Grabchak [aut, cre], Lijuan Can [aut] |
Maintainer: | Michael Grabchak <mgrabcha@uncc.edu> |
Index of help topics:
SubTS-package Positive Tempered Stable Distributions and Related Subordinators dF1 Pdf for f_1 dF2 Pdf for f_2 dGGa Pdf of the generalized gamma distribution dSubCTS PDF of CTS subordinator getk1 Constant K_1 getk2 Constant K_2 rDickman Simulation from the generalized Dickman distribution rF1 Simulation from f_1 rF2 Simulation from f_2 rGGa Simulates from the generalized gamma distribution rPGamma Simulation from p-gamma distributions. rPRDTS Simulation from p-RDTS distributions. rSubCTS Simulates of CTS subordinators rTrunGamma Simulation from the truncated gamma distribution rTrunS Simulation from the truncated stable distribution rTrunTS Simulation from the truncated tempered stable distribution. simCondS Simulation from a conditioned stable distribution. simTandW Simulation of hitting time and overshoot.
Author(s)
NA
Maintainer: NA
References
A. Dassios, Y. Qu, J.W. Lim (2019). Exact simulation of generalised Vervaat perpetuities. Journal of Applied Probability, 56(1):57-75.
A. Dassios, Y. Qu, J.W. Lim (2020). Exact simulation of a truncated Levy subordinator. ACM Transactions on Modeling and Computer Simulation, 30(10), 17.
M. Grabchak (2016). Tempered Stable Distributions: Stochastic Models for Multiscale Processes. Springer, Cham.
M. Grabchak (2021). An exact method for simulating rapidly decreasing tempered stable distributions. Statistics and Probability Letters, 170: Article 109015.
Examples
rPRDTS(20, 2, 1, .7, 2)
rPRDTS(20, 2, 1, 0, 2)
rPRDTS(20, 2, 1, -.7, 2)
rDickman(10, 1)
rTrunGamma(10, 2, 1)
rPGamma(20, 2, 2, 2)
rTrunS(10, 2, .6)
rTrunTS(10, 2, 2, .6)
Pdf for f_1
Description
Evaluates the pdf f_1(x) intruduced in Grabchak (2021).
Usage
dF1(x, a, p)
Arguments
x |
Vector of real numbers. |
a |
Parameter >=0. |
p |
Parameter >1. |
Details
Evaluates the pdf
f_1(x) = exp(-x^p)*x^(-1-a)/K_1, x>1
where K_1 is a normalizing constant. This is distribution is needed to simulate p-RDTS random variables.
Value
Returns a vector of real numbers corresponding to the values of f_1(x).
Author(s)
Michael Grabchak and Lijuan Cao
References
M. Grabchak (2021). An exact method for simulating rapidly decreasing tempered stable distributions. Statistics and Probability Letters, 170: Article 109015.
Examples
x = (10:20)/10
dF1(x, .5, 2)
Pdf for f_2
Description
Evaluates the pdf f_2(x) intruduced in Grabchak (2021).
Usage
dF2(x, a, p)
Arguments
x |
Vector of real numbers. |
a |
Parameter in [0,1). |
p |
Parameter >1. |
Details
Evaluates the pdf
f_2(x) = (exp(-x^p) - exp(-x))*x^(-1-a)/K_2, 0<x<1
where K_2 is a normalizing constant. This distribution is needed to simulate p-RDTS random variables.
Value
Returns a vector of real numbers corresponding to the values of f_2(x).
Author(s)
Michael Grabchak and Lijuan Cao
References
M. Grabchak (2021). An exact method for simulating rapidly decreasing tempered stable distributions. Statistics and Probability Letters, 170: Article 109015.
Examples
x = (0:10)/10
dF2(x, .5, 1.5)
Pdf of the generalized gamma distribution
Description
Evaluates the pdf of the generalized gamma distribution.
Usage
dGGa(x, a, p, b)
Arguments
x |
Vector of real numbers. |
a |
Parameter >0. |
p |
Parameter >0. |
b |
Parameter >0. |
Details
Evaluates the pdf of the generalized gamma distribution with density
g(x) = exp(-b*x^p)*x^(a-1)/K_3, x>0,
where K_3 is a normalizing constant. This distribution is needed to simulate p-RDTS random variables with negative alpha values.
Value
Returns a vector of real numbers corresponding to the values of g(x).
Author(s)
Michael Grabchak and Lijuan Cao
References
M. Grabchak (2021). An exact method for simulating rapidly decreasing tempered stable distributions. Statistics and Probability Letters, 170: Article 109015.
E.W. Stacy (1962) A generalization of the gamma distribution. Annals of Mathematical Statistics, 33(3):1187-1192.
Examples
x = (0:20)/10
dGGa(x, 2.5, 1.5, 3.1)
PDF of CTS subordinator
Description
Evaluates the pdf of the classical tempered stable (CTS) subordinator. When alpha=0 this is the pdf of the gamma distribution.
Usage
dSubCTS(x, alpha, c, ell)
Arguments
x |
Vector of real numbers. |
alpha |
Parameter in [0,1). |
c |
Parameter >0 |
ell |
Tempering parameter >0 |
Details
Returns the pdf of a classical tempered stable subordinator. The distribution has Laplace transform
L(z) = exp( c int_0^infty (e^(-xz)-1)e^(-x/ell) x^(-1-alpha) dx), z>0
and Levy measure
M(dx) = c e^(-x/ell) x^(-1-alpha) 1(x>0)dx.
Value
Returns a vector of real numbers corresponding to the values of pdf.
Note
Uses the method dtweedie in the Tweedie package.
Author(s)
Michael Grabchak and Lijuan Cao
References
M. Grabchak (2016). Tempered Stable Distributions: Stochastic Models for Multiscale Processes. Springer, Cham.
Examples
x = (0:20)/10
dSubCTS(x, .5, 1, 1.5)
Constant K_1
Description
Evaluates the constant K_1, which is the normalizing constant for f_1.
Usage
getk1(alpha, p)
Arguments
alpha |
Parameter >=0. |
p |
Parameter >1. |
Details
Evaluates
K_1 = int_1^infty exp(-x^p)*x^(-1-alpha) dx.
This is needed to simulate p-RDTS random variables.
Value
Returns a positive real number.
Author(s)
Michael Grabchak and Lijuan Cao
References
M. Grabchak (2021). An exact method for simulating rapidly decreasing tempered stable distributions. Statistics and Probability Letters, 170: Article 109015.
Examples
getk1(1.5,2.5)
Constant K_2
Description
Evaluates the constant K_2, which is the normalizing constant for f_2.
Usage
getk2(alpha, p)
Arguments
alpha |
Parameter in [0,1). |
p |
Parameter >1. |
Details
Evaluates
K_2 = int_0^1 ( exp(-x^p) - exp(-x) )*x^(-1-alpha) dx.
This is needed to simulate p-RDTS random variables.
Value
Returns a positive real number.
Author(s)
Michael Grabchak and Lijuan Cao
References
M. Grabchak (2021). An exact method for simulating rapidly decreasing tempered stable distributions. Statistics and Probability Letters, 170: Article 109015.
Examples
getk2(0.5,2.5)
Simulation from the generalized Dickman distribution
Description
Simulates from the generalized Dickman distribution using Algorithm 3.1 in Dassios, Qu, and Lim (2019).
Usage
rDickman(n, t, b = 1)
Arguments
n |
Number of observations. |
t |
Parameter > 0. |
b |
Parameter > 0. |
Details
Simulates from the generalized Dickman distribution by using Algorithm 3.1 in Dassios, Qu, and Lim (2019). This distribution has Laplace transform
L(z) = exp( t int_0^b (e^(-xz)-1) x^(-1) dx), z>0
and Levy measure
M(dx) = t x^(-1) 1(0<x<b) dx.
When b=1 and t=1, this is the Dickman distribution.
Value
Returns a vector of n random numbers.
Author(s)
Michael Grabchak and Lijuan Cao
References
A. Dassios, Y. Qu, J.W. Lim (2019). Exact simulation of generalised Vervaat perpetuities. Journal of Applied Probability, 56(1):57-75.
M. Penrose and A. Wade (2004). Random minimal directed spanning trees and Dickman-type distributions. Advances in Applied Probability, 36(3):691-714.
Examples
rDickman(10, 1)
Simulation from f_1
Description
Simulates from the pdf f_1(x) intruduced in Grabchak (2021).
Usage
rF1(n, a, p)
Arguments
n |
Number of observations. |
a |
Parameter >=0. |
p |
Parameter >1. |
Details
Uses Algorithm 1 in Grabchak (2021) to simulate from the pdf
f_1(x) = exp(-x^p)*x^(-1-a)/K_1, x>1,
where K_1 is a normalizing constant. This is needed to simulate p-RDTS random variables.
Value
Returns a vector of n random numbers.
Author(s)
Michael Grabchak and Lijuan Cao
References
M. Grabchak (2021). An exact method for simulating rapidly decreasing tempered stable distributions. Statistics and Probability Letters, 170: Article 109015.
Examples
rF1(10, .7, 2.5)
Simulation from f_2
Description
Simulates from the pdf f_2(x) intruduced in Grabchak (2021).
Usage
rF2(n, a, p)
Arguments
n |
Number of observations. |
a |
Parameter in [0,1). |
p |
Parameter >1. |
Details
Uses Algorithm 2 in Grabchak (2021) to simulate from the pdf
f_2(x) = (exp(-x^p) - exp(-x))*x^(-1-a)/K_2, 0<x<1
where K_2 is a normalizing constant. This is needed to simulate p-RDTS random variables.
Value
Returns a vector of n random numbers.
Author(s)
Michael Grabchak and Lijuan Cao
References
M. Grabchak (2021). An exact method for simulating rapidly decreasing tempered stable distributions. Statistics and Probability Letters, 170: Article 109015.
Examples
rF2(10, .7, 2.5)
Simulates from the generalized gamma distribution
Description
Simulates from the generalized gamma distribution.
Usage
rGGa(n, a, p, b)
Arguments
n |
Number of observations. |
a |
Parameter >0. |
p |
Parameter >0. |
b |
Parameter >0. |
Details
Simulates from the generalized gamma distribution with density
g(x) = exp(-b*x^p)*x^(a-1)/K_3, x>0,
where K_3 is a normalizing constant. The mathodology is explained in Section 4 of Grabchak (2021). This distribution is needed to simulate p-RDTS random variables with negative alpha values.
Value
Returns a vector of n random numbers.
Author(s)
Michael Grabchak and Lijuan Cao
References
M. Grabchak (2021). An exact method for simulating rapidly decreasing tempered stable distributions. Statistics and Probability Letters, 170: Article 109015.
E.W. Stacy (1962) A generalization of the gamma distribution. Annals of Mathematical Statistics, 33(3):1187-1192.
Examples
rGGa(20, .5, 2, 2)
Simulation from p-gamma distributions.
Description
Simulates from p-gamma distributions. These are p-RDTS distributions with alpha=0.
Usage
rPGamma(n, t, mu, p, step = 1)
Arguments
n |
Number of observations. |
t |
Parameter >0. |
mu |
Parameter >0. |
p |
Parameter >1. |
step |
Tuning parameter. The larger the step, the slower the rejection sampling, but the fewer the number of terms. See Hoefert (2011) or Section 4 in Grabchak (2019). |
Details
Uses Theorem 1 in Grabchak (2021) to simulate from a p-Gamma distribution. This distribution has Laplace transform
L(z) = exp( t int_0^infty (e^(-xz)-1)e^(-(mu*x)^p) x^(-1) dx ), z>0
and Levy measure
M(dx) = t e^(-(mu*x)^p) x^(-1) 1(x>0)dx.
Value
Returns a vector of n random numbers.
Author(s)
Michael Grabchak and Lijuan Cao
References
M. Grabchak (2019). Rejection sampling for tempered Levy processes. Statistics and Computing, 29(3):549-558
M. Grabchak (2021). An exact method for simulating rapidly decreasing tempered stable distributions. Statistics and Probability Letters, 170: Article 109015.
M. Hofert (2011). Sampling exponentially tilted stable distributions. ACM Transactions on Modeling and Computer Simulation, 22(1), 3.
Examples
rPGamma(20, 2, 2, 2)
Simulation from p-RDTS distributions.
Description
Simulates from p-rapidly decreasing tempered stable (p-RDTS) distributions.
Usage
rPRDTS(n, t, mu, alpha, p, step = 1)
Arguments
n |
Number of observations. |
t |
Parameter >0. |
mu |
Parameter >0. |
alpha |
Parameter in (-infty,1) |
p |
Parameter >1 if 0<=alpha<1, >0 if alpha<0. |
step |
Tuning parameter. The larger the step, the slower the rejection sampling, but the fewer the number of terms. See Hoefert (2011) or Section 4 in Grabchak (2019). |
Details
Simulates from a p-RDTS distribution. When alpha >=0, uses Theorem 1 in Grabchak (2021) and when alpha<0 uses the method in Section 4 of Grabchak (2021). This distribution has Laplace transform
L(z) = exp( t int_0^infty (e^(-xz)-1)e^(-(mu*x)^p) x^(-1-alpha) dx ), z>0
and Levy measure
M(dx) = t e^(-(mu*x)^p) x^(-1-alpha) 1(x>0)dx.
Value
Returns a vector of n random numbers.
Author(s)
Michael Grabchak and Lijuan Cao
References
M. Grabchak (2019). Rejection sampling for tempered Levy processes. Statistics and Computing, 29(3):549-558
M. Grabchak (2021). An exact method for simulating rapidly decreasing tempered stable distributions. Statistics and Probability Letters, 170: Article 109015.
M. Hofert (2011). Sampling exponentially tilted stable distributions. ACM Transactions on Modeling and Computer Simulation, 22(1), 3.
Examples
rPRDTS(20, 2, 1, .7, 2)
rPRDTS(20, 2, 1, 0, 2)
rPRDTS(20, 2, 1, -.7, 2)
Simulates of CTS subordinators
Description
Simulates from classical tempered stable (CTS) distributions. When alpha=0 this is the gamma distribution.
Usage
rSubCTS(n, alpha, c, ell, method = NULL)
Arguments
n |
Number of observations. |
alpha |
Parameter in [0,1). |
c |
Parameter >0 |
ell |
Tempering parameter >0 |
method |
Parameter used by retstable in the copula package. When NULL restable selects the best method. |
Details
Simulates a CTS subordinator. The distribution has Laplace transform
L(z) = exp( c int_0^infty (e^(-xz)-1)e^(-x/ell) x^(-1-alpha) dx), z>0
and Levy measure
M(dx) = c e^(-x/ell) x^(-1-alpha) 1(x>0)dx.
Value
Returns a vector of n random numbers.
Note
Uses the method retstable in the copula package.
Author(s)
Michael Grabchak and Lijuan Cao
References
M. Grabchak (2016). Tempered Stable Distributions: Stochastic Models for Multiscale Processes. Springer, Cham.
Examples
rSubCTS(20, .7, 1, 1)
Simulation from the truncated gamma distribution
Description
Simulates from the truncated gamma distribution.
Usage
rTrunGamma(n, t, mu, b = 1, step = 1)
Arguments
n |
Number of observations. |
t |
Parameter > 0. |
mu |
Parameter > 0. |
b |
Parameter > 0. |
step |
Tuning parameter. The larger the step, the slower the rejection sampling, but the fewer the number of terms. See Hoefert (2011) or Section 4 in Grabchak (2019). |
Details
Simulates from the truncated gamma distribution. This distribution has Laplace transform
L(z) = exp( t int_0^b (e^(-xz)-1) x^(-1)e^(-mu*x) dx), z>0
and Levy measure
M(dx) = t x^(-1) e^(-mu*x) 1(0<x<b) dx.
The simulation is performed by applying rejection sampling (Algorithm 4.4 in Dassios, Qu, Lim (2020)) to the generalized Dickman distribution. We simulate from the latter using Algorithm 3.1 in Dassios, Qu, Lim (2019).
Value
Returns a vector of n random numbers.
Author(s)
Michael Grabchak and Lijuan Cao
References
A. Dassios, Y. Qu, J.W. Lim (2019). Exact simulation of generalised Vervaat perpetuities. Journal of Applied Probability, 56(1):57-75.
A. Dassios, Y. Qu, J.W. Lim (2020). Exact simulation of a truncated Levy subordinator. ACM Transactions on Modeling and Computer Simulation, 30(10), 17.
M. Grabchak (2019). Rejection sampling for tempered Levy processes. Statistics and Computing, 29(3):549-558
M. Hofert (2011). Sampling exponentially tilted stable distributions. ACM Transactions on Modeling and Computer Simulation, 22(1), 3.
Examples
rTrunGamma(10, 2, 1)
Simulation from the truncated stable distribution
Description
Simulates from the truncated stable distribution.
Usage
rTrunS(n, t, alpha, b = 1, step = 1)
Arguments
n |
Number of observations. |
t |
Parameter > 0. |
alpha |
Parameter in the open interval (0,1). |
b |
Parameter > 0. |
step |
Tuning parameter. The larger the step, the slower the rejection sampling, but the fewer the number of terms. See Hoefert (2011) or Section 4 in Grabchak (2019). |
Details
Simulates from the truncated stable distribution using Algorithm 4.3 in Dassios, Qu, and Lim (2020). This distribution has Laplace transform
L(z) = exp( t * (alpha/Gamma(1-alpha)) * int_0^b (e^(-xz)-1) x^(-1-alpha) dx), z>0
and Levy measure
M(dx) = t * (alpha/Gamma(1-alpha)) * x^(-1-alpha) 1(0<x<b) dx.
Here Gamma() is the gamma function.
Value
Returns a vector of n random numbers.
Author(s)
Michael Grabchak and Lijuan Cao
References
A. Dassios, Y. Qu, J.W. Lim (2020). Exact simulation of a truncated Levy subordinator. ACM Transactions on Modeling and Computer Simulation, 30(10), 17.
M. Grabchak (2019). Rejection sampling for tempered Levy processes. Statistics and Computing, 29(3):549-558
M. Hofert (2011). Sampling exponentially tilted stable distributions. ACM Transactions on Modeling and Computer Simulation, 22(1), 3.
Examples
rTrunS(10, 2, .6)
Simulation from the truncated tempered stable distribution.
Description
Simulates from the truncated tempered stable distribution.
Usage
rTrunTS(n, t, mu, alpha, b = 1, step = 1)
Arguments
n |
Number of observations. |
t |
Parameter > 0. |
mu |
Parameter > 0. |
alpha |
Parameter in the open interval (0,1). |
b |
Parameter > 0. |
step |
Tuning parameter. The larger the step, the slower the rejection sampling, but the fewer the number of terms. See Hoefert (2011) or Section 4 in Grabchak (2019). |
Details
Simulates from the truncated stable distribution using Algorithm 4.3 in Dassios, Qu, and Lim (2020). This distribution has Laplace transform
L(z) = exp( t * (alpha/Gamma(1-alpha)) * int_0^b (e^(-xz)-1) x^(-1-alpha) e^(-mu*x) dx), z>0
and Levy measure
M(dx) = t * (alpha/Gamma(1-alpha)) * x^(-1-alpha) e^(-mu*x) 1(0<x<b) dx.
Here Gamma() is the gamma function.
Value
Returns a vector of n random numbers.
Author(s)
Michael Grabchak and Lijuan Cao
References
A. Dassios, Y. Qu, J.W. Lim (2020). Exact simulation of a truncated Levy subordinator. ACM Transactions on Modeling and Computer Simulation, 30(10), 17.
M. Grabchak (2019). Rejection sampling for tempered Levy processes. Statistics and Computing, 29(3):549-558
M. Hofert (2011). Sampling exponentially tilted stable distributions. ACM Transactions on Modeling and Computer Simulation, 22(1), 3.
Examples
rTrunTS(10, 2, 2, .6)
Simulation from a conditioned stable distribution.
Description
Implements Algorithm 4.2 in Dassios, Qu, and Lim (2020) to simulate from a stable distribution conditioned on an appropriate event.
Usage
simCondS(t, alpha)
Arguments
t |
Parameter > 0. |
alpha |
Parameter in the open interval (0,1). |
Details
Implements Algorithm 4.2 in Dassios, Qu, and Lim (2020) to simulate from a stable distribution conditioned on an appropriate event. There are some typos in this algorithm, which are corrected in Grabchak (2021). These random variables are needed to simulate truncated stable, truncated tempered stable, and p-RDTS random variables.
Value
Returns one random number.
Author(s)
Michael Grabchak and Lijuan Cao
References
A. Dassios, Y. Qu, J.W. Lim (2020). Exact simulation of a truncated Levy subordinator. ACM Transactions on Modeling and Computer Simulation, 30(10), 17.
M. Grabchak (2021). An exact method for simulating rapidly decreasing tempered stable distributions. Statistics and Probability Letters, 170: Article 109015.
Examples
simCondS(2, .7)
Simulation of hitting time and overshoot.
Description
Simulates the hitting time T and the overshoot W of a stable process by implimenting Algorithm 4.1 in Dassios, Qu, and Lim (2020). This is important for simulating other distribution.
Usage
simTandW(alpha)
Arguments
alpha |
Parameter in the open interval (0,1). |
Value
Returns one pair of random numbers. The first is T and the second is W.
Author(s)
Michael Grabchak and Lijuan Cao
References
A. Dassios, Y. Qu, J.W. Lim (2020). Exact simulation of a truncated Levy subordinator. ACM Transactions on Modeling and Computer Simulation, 30(10), 17.
Examples
simTandW(.6)