distr-g: The g distribution

Description Usage Arguments Value References

Description

Density (dg), distribution function (pg), quantile function (qg), random generation (rg), and bounds of the support (infg and supg) of the g distribution \insertCitetukey1977tukeyGH. All functions with the exception of rg are vectorized with respect to all arguments on the g distribution (x, q, p, a, b, g). The functions are wrappers of the g-and-h family with h = 0.

Usage

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

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

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

rg(n, a = 0, b = 1, g = 0)

infg(a = 0, b = 1, g = 0)

supg(a = 0, b = 1, g = 0)

Arguments

x, q

vector of quantiles.

a

location parameter(s).

b

scale parameter(s).

g

skewness parameter(s).

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.

Value

dg gives the density, pg gives the distribution function, qg gives the quantile function, and rg generates random numbers.

The length of the result is determined by n for rg, 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.