rTSS {TempStable} | R Documentation |
Function to generate random variates of the TSS distribution.
Description
Generates n
random numbers distributed according
of the tempered stable subordinator distribution.
Usage
rTSS(
n,
alpha = NULL,
delta = NULL,
lambda = NULL,
theta = NULL,
methodR = "TM",
k = 10000
)
Arguments
n |
sample size (integer). |
alpha |
Stability parameter. A real number between 0 and 1. |
delta |
Scale parameter. A real number > 0. |
lambda |
Tempering parameter. A real number > 0. |
theta |
Parameters stacked as a vector. |
methodR |
A String. Either "TM", "AR" or "SR". |
k |
integer: the level of truncation, if |
Details
theta
denotes the parameter vector (alpha, delta, lambda)
.
Either provide the parameters alpha
, delta
, lambda
individually OR provide theta
.
"AR" stands for the 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. In this
method the function copula::retstable()
is called. "TM" is the standard
method used.
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.
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.
Examples
rTSS(100,0.5,1,1)
rTSS(100,0.5,1,1,NULL,"SR",50)