Learn R Programming

TukeyGH77 (version 0.1.4)

GH2z: Inverse of Tukey \(g\)-&-\(h\) Transformation

Description

To transform Tukey \(g\)-&-\(h\) quantiles to standard normal quantiles.

Usage

GH2z(q, q0 = (q - A)/B, A = 0, B = 1, ...)

Value

Function GH2z() returns a double

vector of the same length as input q.

Arguments

q

double vector, quantiles \(q\)

q0

(optional) double vector, standardized quantiles \(q_0=(q-A)/B\)

A, B

(optional) double scalars, location and scale parameters of Tukey \(g\)-&-\(h\) transformation. Ignored if q0 is provided.

...

parameters of internal helper function .GH2z()

Details

Unfortunately, function GH2z(), the inverse of Tukey \(g\)-&-\(h\) transformation, does not have a closed form and needs to be solved numerically.

For compute intensive jobs, use internal helper function .GH2z().

Examples

Run this code
z = rnorm(1e3L)
all.equal.numeric(.GH2z(z2GH(z, g = .3, h = .1), g = .3, h = .1), z)
all.equal.numeric(.GH2z(z2GH(z, g = 0, h = .1), g = 0, h = .1), z)
all.equal.numeric(.GH2z(z2GH(z, g = .2, h = 0), g = .2, h = 0), z)

Run the code above in your browser using DataLab