The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

Package {TukeyGH77}


Type: Package
Title: Tukey g-&-h Distribution
Version: 0.2.0
Date: 2026-07-16
Description: Density, cumulative density, quantile and simulation of the 4-parameter Tukey g-and-h (1977) distributions. The quantile-based transformation (Hoaglin 1985 <doi:10.1002/9781118150702.ch11>) and its reverse transformation.
License: GPL-2
Encoding: UTF-8
Language: en-US
Depends: R (≥ 4.6.0)
Imports: rstpm2
Config/roxygen2/version: 8.0.0
Config/roxygen2/markdown: TRUE
NeedsCompilation: no
Packaged: 2026-07-16 15:16:12 UTC; tingtingzhan
Author: Tingting Zhan ORCID iD [aut, cre]
Maintainer: Tingting Zhan <tingtingzhan@gmail.com>
Repository: CRAN
Date/Publication: 2026-07-16 20:50:02 UTC

TukeyGH77: Tukey g-&-h Distribution

Description

Density, cumulative density, quantile and simulation of the 4-parameter Tukey g-and-h (1977) distributions. The quantile-based transformation (Hoaglin 1985 doi:10.1002/9781118150702.ch11) and its reverse transformation.

Author(s)

Maintainer: Tingting Zhan tingtingzhan@gmail.com (ORCID)

Authors:

References

Tukey, J.W. (1977): Modern Techniques in Data Analysis. In: NSF-sponsored Regional Research Conference at Southeastern Massachusetts University, North Dartmouth, MA.

Hoaglin, D.C. (1985): Summarizing shape numerically: The g-and-h distributions. Exploring data tables, trends, and shapes, pp. 461–513. John Wiley & Sons, Ltd, New York.


Tukey g-&-h Distribution

Description

Density, distribution, quantile and simulation for Tukey g-&-h distribution with location parameter A, scale parameter B, skewness g and elongation h.

Usage

dGH(x, A = 0, B = 1, g = 0, h = 0, log = FALSE, ...)

rGH(n, A = 0, B = 1, g = 0, h = 0)

qGH(p, A = 0, B = 1, g = 0, h = 0, lower.tail = TRUE, log.p = FALSE)

pGH(q, A = 0, B = 1, g = 0, h = 0, lower.tail = TRUE, log.p = FALSE, ...)

Arguments

x

double vector, quantiles x, missingness is allowed for function fitdistrplus::fitdist()

A

double scalar, location parameter A, default A=0,

B

double scalar, scale parameter B>0, default B=1

g

double scalar, skewness parameter g, default g=0 (i.e., no skewness)

h

double scalar, elongation parameter h\geq 0, default h=0 (i.e., no elongation)

log, log.p

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

...

additional parameters of function gh2z()

n

integer scalar, number of observations

p

double vector, probabilities p, missingness is not allowed

lower.tail

logical scalar, if TRUE (default), probabilities are Pr(X\le x) otherwise, Pr(X>x).

q

double vector, quantiles q, missingness is not allowed

Value

Density function dGH() returns double vector.

Distribution function pGH() returns double vector.

Quantile function qGH() returns double vector.

Random generator function rGH() returns double vector.

Examples

curve(pGH(x, g = .3, h = .1), from = -2.5, to = 3.5)



Derivative of z2gh() against z, on the log-scale

Description

Derivative of z2gh() against z, on the log-scale

Usage

d_z2GH(z, g, h)

Arguments

z

double vector, missingness allowed

g, h

double scalars


Tukey g-&-h Transformation

Description

The function z2gh() (not compute intensive) transforms standard normal quantiles z_q to Tukey g-&-h quantiles.

The function gh2z() (compute intensive!!) transforms Tukey g-&-h quantiles to standard normal quantiles z_q.

Usage

z2gh(z, g = 0, h = 0)

gh2z(q, g = 0, h = 0, ...)

Arguments

z

double scalar or vector, standard normal quantiles z_q, missingness is not allowed

g, h

double scalars

q

double vector, Tukey g-&-h quantiles q, with location parameter A=0 and scale parameter B=1, missingness is not allowed

...

parameters of function vuniroot, other than interval, lower and upper

Details

Domain of standard normal quantile z to search for the function gh2z() is hard coded as (-8.3, 8.3), because stopifnot(identical(pnorm(8.3), 1)).

Value

The functions z2gh() and gh2z() both return double scalar, vector or matrix.

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.