Generates n
random numbers distributed according
of the normal tempered stable distribution.
rNTS(
n,
alpha = NULL,
beta = NULL,
delta = NULL,
lambda = NULL,
mu = NULL,
theta = NULL,
methodR = "TM",
k = 10000
)
Generates n
random numbers.
sample size (integer).
A real number between 0 and 1.
A gap holder.
A real number > 0.
A real number > 0.
A location parameter, any real number.
A vector of all other arguments.
A String. Either "TM","AR" or "SR". "TM" by default.
integer: the number of replications, if methodR == "SR"
. 10000
by default.
theta
denotes the parameter vector (alpha, beta, delta, lambda,
mu)
. Either provide the parameters individually OR provide theta
.
Works by a normal variance-mean mixture with a TSS distribution. Method
parameter is for the method of simulating the TSS random variable, see the
rTSS()
function.
"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. For more details, see references.
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")
See also the rTSS()
function.
copula::retstable()
as "TM" uses this function.
rNTS(100, 0.5, 1,1,1,1)
rNTS(10, 0.6, 0,1,1,0)
rNTS(10, 0.5, 1,1,1,1, NULL, "SR", 100)
Run the code above in your browser using DataLab