rGTS {TempStable} | R Documentation |
Function to generate random variates of GTS distribution.
Description
Generates n
random numbers distributed according to the generalized
classical tempered stable (GTS) distribution.
Usage
rGTS(
n,
alphap = NULL,
alpham = NULL,
deltap = NULL,
deltam = NULL,
lambdap = NULL,
lambdam = NULL,
mu = NULL,
theta = NULL,
methodR = "AR",
k = 10000,
c = 1
)
Arguments
n |
sample size (integer). |
alphap , alpham |
Stability parameter. A real number between 0 and 2. |
deltap |
Scale parameter for the right tail. A real number > 0. |
deltam |
Scale parameter for the left tail. A real number > 0. |
lambdap |
Tempering parameter for the right tail. A real number > 0. |
lambdam |
Tempering parameter for the left tail. A real number > 0. |
mu |
A location parameter, any real number. |
theta |
Parameters stacked as a vector. |
methodR |
A String. Either "TM","AR" or "SR". |
k |
integer: the level of truncation, if |
c |
A real number. Only relevant for |
Details
theta
denotes the parameter vector (alphap, alpham, 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.
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.
Value
Generates n
random numbers of the CTS distribution.
References
Massing, T. (2023), 'Parametric Estimation of Tempered Stable Laws'
Kawai, R & Masuda, H (2011), 'On simulation of tempered stable random variates' doi:10.1016/j.cam.2010.12.014
Hofert, M (2011), 'Sampling Exponentially Tilted Stable Distributions' doi:10.1145/2043635.2043638
See Also
copula::retstable()
as "TM" uses this function and rCTS()
.
Examples
rGTS(2,1.5,0.5,1,1,1,1,0,NULL,"SR")
rGTS(2,1.5,0.5,1,1,1,1,1,NULL,"aAR")