rKRTS {TempStable} | R Documentation |
Function to generate random variates of KRTS distribution.
Description
Generates n
random numbers distributed according to the Kim-Rachev
tempered stable (KRTS) distribution.
Usage
rKRTS(
n,
alpha = NULL,
kp = NULL,
km = NULL,
rp = NULL,
rm = NULL,
pp = NULL,
pm = NULL,
mu = NULL,
theta = NULL,
methodR = "SR",
k = 10000
)
Arguments
n |
sample size (integer). |
alpha |
Stability parameter. A real number between 0 and 2. |
kp , km , rp , rm |
Parameter of KR-distribution. A real number |
pp , pm |
Parameter of KR-distribution. A real number |
mu |
A location parameter, any real number. |
theta |
Parameters stacked as a vector. |
methodR |
A String. Only "SR" is available here. |
k |
integer: the level of truncation, if |
Details
theta
denotes the parameter vector (alpha, kp, km,
rp, rm, pp. pm, mu)
. Either provide the parameters individually OR
provide theta
.
"SR" stands for a truncated infinite shot noise series representation.
Currently, this method is the only implemented to generate random variates.
The series representation is given by Bianchi et a. (2010).
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 KRTS distribution.
References
Bianchi, M. L.; Rachev, S. T.; Kim, Y. S. & Fabozzi, F. J. (2010), 'Tempered stable distributions and processes in finance: Numerical analysis' doi:10.1007/978-88-470-1481-7
Examples
rKRTS(1,0.5,1,1,1,1,1,1,0,NULL,"SR")