Learn R Programming

Rsubbotools (version 0.0.1)

qsep: Returns quantile from the Skewed Exponential Power distribution

Description

The qsep returns the Cumulative Distribution Function at point x for the Skewed Exponential Power distribution with parameters \(a\), \(b\).

Usage

qsep(
  x,
  m = 0,
  a = 2,
  b = 1,
  lambda = 0,
  method = 0L,
  step_size = 1e-04,
  tol = 1e-10,
  max_iter = 100L,
  verb = 0L
)

Value

a vector containing the values for the densities.

Arguments

x

(numeric) - vector with values to evaluate CDF.

m

(numeric) - the location parameter.

a

(numeric) - the scale parameter.

b

(numeric) - the shape parameter

lambda

(numeric) - the skewness parameter.

method

(numeric) - If 0, uses the Newton-Raphson procedure for optimization. If 1, uses Steffensen.

step_size

(numeric) - the size of the step in the numerical optimization (gradient descent). Default is 1e-4.

tol

(numeric) - error tolerance (default is 1e-10).

max_iter

(numeric) - maximum number of iterations for the optimization procedure (default is 100).

verb

(numeric) - verbosity level of the process (default 0).

Details

The SEP is a exponential power distribution controlled by four parameters, with formula: $$ f(x; m, b, a, \lambda) = 2 \Phi(w) e^{-|z|^b/b}/(c)$$ where: $$z = (x-m)/a$$ $$w = sign(z) |z|^{(b/2)} \lambda \sqrt{2/b}$$ $$c = 2 ab^{(1/b)-1} \Gamma(1/b)$$ with \(\Phi\) the cumulative normal distribution with mean zero and variance one. The CDF is calculated through numerical integration using the GSL suite and the quantile is solved by inversion using a root-finding algorithm (Newton-Raphson by default).