| 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 |
| 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:
Tingting Zhan tingtingzhan@gmail.com (ORCID)
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 |
A |
double scalar, location parameter |
B |
double scalar, scale parameter |
g |
double scalar, skewness parameter |
h |
double scalar, elongation parameter |
log, log.p |
logical scalar, if |
... |
additional parameters of function |
n |
integer scalar, number of observations |
p |
|
lower.tail |
logical scalar, if |
q |
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 |
|
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 |
g, h |
double scalars |
q |
double vector, Tukey |
... |
parameters of function vuniroot, other than |
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.