Generates n
random numbers distributed according to the classical
tempered stable (CTS) distribution.
rCTS(
n,
alpha = NULL,
deltap = NULL,
deltam = NULL,
lambdap = NULL,
lambdam = NULL,
mu = NULL,
theta = NULL,
methodR = "TM",
k = 10000,
c = 1
)
Generates n
random numbers of the CTS distribution.
sample size (integer).
Stability parameter. A real number between 0 and 2.
Scale parameter for the right tail. A real number > 0.
Scale parameter for the left tail. A real number > 0.
Tempering parameter for the right tail. A real number > 0.
Tempering parameter for the left tail. A real number > 0.
A location parameter, any real number.
Parameters stacked as a vector.
A String. Either "TM","AR" or "SR".
integer: the level of truncation, if methodR == "SR"
. 10000
by default.
A real number. Only relevant for methodR == "AR"
.
1 by default.
theta
denotes the parameter vector (alpha, deltap, deltam,
lambdap, lambdam, mu)
. Either provide the parameters individually OR
provide theta
.
"AR" stands for the approximate Acceptance-Rejection Method and "SR" for a
truncated infinite shot noise series representation. "TM" stands for Two
Methods as two different methods are used depending on which will be faster.
"TM" works only for alpha < 1
.
In this method the function copula::retstable()
is called. For
alpha < 1
, "TM" is the default method, while "AR" for alpha > 1
is the default method.
It is recommended to check the generated random numbers once for each distribution using the density function. If the random numbers are shifted, e.g. for the method "SR", it may be worthwhile to increase k.
For more details, see references.
Massing, T. (2023), 'Parametric Estimation of Tempered Stable Laws'
Kawai, R & Masuda, H (2011), 'On simulation of tempered stable random variates' tools:::Rd_expr_doi("10.1016/j.cam.2010.12.014")
Hofert, M (2011), 'Sampling Exponentially Tilted Stable Distributions' tools:::Rd_expr_doi("10.1145/2043635.2043638")
copula::retstable()
as "TM" uses this function.
rCTS(10,0.5,1,1,1,1,1,NULL,"SR",10)
rCTS(10,0.5,1,1,1,1,1,NULL,"aAR")
Run the code above in your browser using DataLab