Learn R Programming

TempStable (version 0.2.2)

rMTS: Function to generate random variates of MTS distribution

Description

Generates n random numbers distributed according to the modified tempered stable (MTS) distribution.

Usage

rMTS(
  n,
  alpha = NULL,
  delta = NULL,
  lambdap = NULL,
  lambdam = NULL,
  mu = NULL,
  theta = NULL,
  methodR = "SR",
  k = 10000
)

Value

Generates n random numbers of the CTS distribution.

Arguments

n

sample size (integer).

alpha

Stability parameter. A real number between 0 and 2.

delta

Scale parameter. A real number > 0.

lambdap, lambdam

Tempering parameter. 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 methodR == "SR". 10000 by default.

Details

Currently, random variants can only be generated using the series representation given by Bianchi et al. (2011).

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.

References

Bianchi, M. L.; Rachev, S. T.; Kim, Y. S. & Fabozzi, F. J. (2011), 'Tempered infinitely divisible distributions and processes' tools:::Rd_expr_doi("10.1137/S0040585X97984632")

Examples

Run this code
rMTS(2,0.5,1,1,1,0,NULL,"SR")

Run the code above in your browser using DataLab