dCTS {TempStable} | R Documentation |
Density function of the classical tempered stable (CTS) distribution
Description
The probability density function (PDF) of the classical tempered stable distributions is not available in closed form. Relies on fast Fourier transform (FFT) applied to the characteristic function.
Usage
dCTS(
x,
alpha = NULL,
deltap = NULL,
deltam = NULL,
lambdap = NULL,
lambdam = NULL,
mu = NULL,
theta = NULL,
dens_method = "FFT",
a = -20,
b = 20,
nf = 2048,
...
)
Arguments
x |
A numeric vector of quantiles. |
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. |
dens_method |
Algorithm for numerical evaluation. Choose between |
a |
Starting point of FFT, if |
b |
Ending point of FFT, if |
nf |
Pieces the transformation is divided in. Limited to power-of-two size. 2048 by default. |
... |
Possibility to modify |
Details
theta
denotes the parameter vector (alpha, deltap, deltam,
lambdap, lambdam, mu)
. Either provide the parameters individually OR
provide theta
. Methods include the FFT or alternatively by convolving
two totally positively skewed tempered stable distributions, see Massing
(2022).
The "FFT" method is automatically selected for Mac users, as the "Conv" method causes problems.
Value
As x
is a numeric vector, the return value is also a numeric
vector of densities.
References
Massing, T. (2023), 'Parametric Estimation of Tempered Stable Laws'
Examples
x <- seq(0,15,0.25)
y <- dCTS(x,0.6,1,1,1,1,1,NULL,"FFT",-20,20,2048)
plot(x,y)