distr-gh: The Tukey's g-and-h distribution

Description Usage Arguments Details Value References

Description

Density (dgh), distribution function (pgh), quantile function (qgh), random generation (rgh), and bounds of the support (infgh and supgh) of the Tukey's g-and-h distribution \insertCitetukey1977tukeyGH. All functions with the exception of rgh are vectorized with respect to all arguments on the Tukey's distribution (x, q, p, a, b, g, h).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
dgh(x, a = 0, b = 1, g = 0, h = 0.2, log = FALSE, ...)

pgh(q, a = 0, b = 1, g = 0, h = 0.2, lower.tail = TRUE, log.p = FALSE, ...)

qgh(p, a = 0, b = 1, g = 0, h = 0.2, lower.tail = TRUE, log.p = FALSE)

rgh(n, a = 0, b = 1, g = 0, h = 0.2)

infgh(a = 0, b = 1, g = 0, h = 0.2)

supgh(a = 0, b = 1, g = 0, h = 0.2)

Arguments

x, q

vector of quantiles.

a

location parameter(s).

b

scale parameter(s).

g

skewness parameter(s).

h

heavy-taildness parameter(s). Only non-negative values will be accepted (see Details).

log, log.p

logical; if TRUE, probabilities p are given as log(p).

...

arguments passed to rootSolve::uniroot.all().

lower.tail

logical; if TRUE (default), probabilities are P[X ≤ x] otherwise, P[X > x].

p

vector of probabilities.

n

number of observations. If length(n) > 1, the length is taken to be the number required.

Details

Given a Gaussian random variable Z\sim\mathcal{N}(0, 1), the following transformation:

X=a+b\,\frac{e^{gZ}-1}{g}\,e^{\frac{hZ^2}{2}}

defines the Tukey's g-and-h distribution. Hence X\sim gh(a, b, g, h) denotes a random variable distributed according to the Tukey's g-and-h distribution function, where a\in\mathbf{R} is the location parameter, b\in\mathbf{R}^+ is the scale parameter, g\in\mathbf{R} is the skewness parameter, and h\in\mathbf{R}^+ is the shape parameter.

In principle, the shape parameter h may also take negative values, however, in such a case, the above transformation is not monotone. All functions on this page require that h≥q0.

Note that, when g=0, the limit for g\to 0 of the previous transformation is considered:

X=\lim_{g\to0}≤ft(a+b\,\frac{e^{gZ}-1}{g}\,e^{\frac{hZ^2}{2}}\right)= a+b\,Z\,e^{\frac{hZ^2}{2}}

so that X\sim gh(a, b, 0, h).

Value

dgh gives the density, pgh gives the distribution function, qgh gives the quantile function, and rgh generates random numbers.

The length of the result is determined by n for rgh, and is the maximum of the lengths of the numerical arguments for the other functions.

The numerical arguments other than n are recycled to the length of the result. Only the first elements of the logical arguments are used.

References

\insertAllCited
tukeyGH documentation built on April 10, 2021, 9:06 a.m.