Learn R Programming

TempStable (version 0.1.0)

rTSS: 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 = "AR",
  k = 10000
)

Value

Generates n random numbers.

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

k

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

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. "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
rTSS(100,0.5,1,1)
rTSS(100,0.5,1,1,NULL,"SR",50)

Run the code above in your browser using DataLab