Learn R Programming

TempStable (version 0.1.0)

rCTS: Function to generate random variates of CTS distribution.

Description

Generates n random numbers distributed according to the classic tempered stable (CTS) distribution.

Usage

rCTS(
  n,
  alpha = NULL,
  deltap = NULL,
  deltam = NULL,
  lambdap = NULL,
  lambdam = NULL,
  mu = NULL,
  theta = NULL,
  methodR = "AR",
  k = 10000,
  c = 1
)

Value

Generates n random numbers.

Arguments

n

sample size (integer).

alpha

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 "AR" or "SR".

k

integer: the level of truncation, if methodR == "SR". 10000 by default.

c

A real number. Only relevant for methodR == "AR". 1 by default.

Details

theta denotes the parameter vector (alpha, 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. "AR" is the standard method used. For more details, see references.

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")

Examples

Run this code
rCTS(10,0.5,1,1,1,1,1,NULL,"SR",10)
rCTS(10,0.5,1,1,1,1,1,NULL,"aAR")

Run the code above in your browser using DataLab