pstable2_and_dstable2: PDF and CDF of a skew stable distribution.

pstable2_and_dstable2R Documentation

PDF and CDF of a skew stable distribution.

Description

Wrappers for stabledist::pstable and stabledist::dstable

Usage

dstable2(x, alpha, beta, gamma, delta, pm = 0L, tol = 1e-12, ...)

Arguments

x

Vector of points where the pdf will be evaluated.

alpha

shape / stability parameter, with 0 < alpha <= 2.

beta

skewness parameter, with -1 <= beta <= 1.

gamma

scale parameter, with 0 < sigma.

delta

location parameter, with delta real. For the '2' version, one can have out of bound parameters and an automatic adjustment will be performed to set the parameter to the nearest bound to avoid error message and returning NA.

pm

Parametrization used for the skew stable distribution, as defined by JP Nolan (1997). By default, parametrization = 0.

tol

Relative error tolerance (precision) of the calculated values. By default, tol = 1e-12.

...

Other stabledist::[dp]stable() arguments.

Value

A numeric vector.

Author(s)

Javier Royuela del Val, Federico Simmross Wattenberg and Carlos Alberola López

Maintainer: Javier Royuela del Val <jroyval@lpi.tel.uva.es>

References

Nolan JP (1997). Numerical Calculation of Stable Densities and Distribution Functions. Stochastic Models, 13(4) 759-774.

Examples

##take out of bound pars and force them in bounds
## ***internally***
pars <- c(2.5, 0.9, 1, 0)
x <- seq(-5, 10, 0.001)

pdf <- dstable2(x, pars[1], pars[2], pars[3], pars[4])
cdf <- pstable2(x, pars[1], pars[2], pars[3], pars[4])

## following would error:
## because pars[1] (alpha > 2)
## Not run: 
pdf <- dstable(x, pars[1], pars[2], pars[3], pars[4])
cdf <- pstable(x, pars[1], pars[2], pars[3], pars[4])

## End(Not run)

swihart/gnlrim documentation built on Oct. 18, 2023, 8:29 p.m.