W_gamma: Inverse transformation for skewed Lambert W RVs

View source: R/0_W_gamma.R

W_gammaR Documentation

Inverse transformation for skewed Lambert W RVs


Inverse transformation for skewed Lambert W RVs and its derivative.


W_gamma(z, gamma = 0, branch = 0)

deriv_W_gamma(z, gamma = 0, branch = 0)



a numeric vector of real values; note that W(Inf, branch = 0) = Inf.


skewness parameter; by default gamma = 0, which implies W_gamma(z) = z.


either 0 or -1 for the principal or non-principal branch solution.


A skewed Lambert W\times F RV Z (for simplicity assume zero mean, unit variance input) is defined by the transformation (see H_gamma)

z = U \exp(γ U) =: H_{γ}(U), \quad γ \in \mathbf{R},

where U is a zero-mean and/or unit-variance version of the distribution F.

The inverse transformation is W_{γ}(z) := \frac{W(γ z)}{γ}, where W is the Lambert W function.

W_gamma(z, gamma, branch = 0) (and W_gamma(z, gamma, branch = -1)) implement this inverse.

If γ = 0, then z = u and the inverse also equals the identity.

If γ \neq 0, the inverse transformation can be computed by

W_{γ}(z) = \frac{1}{γ} W(γ z).

Same holds for W_gamma(z, gamma, branch = -1).

The derivative of W_{γ}(z) with respect to z simplifies to

\frac{d}{dz} W_{γ}(z) = \frac{1}{γ} \cdot W'(γ z) \cdot γ = W'(γ z)

deriv_W_gamma implements this derivative (for both branches).


numeric; if z is a vector, so is the output.

See Also


LambertW documentation built on Sept. 22, 2022, 5:07 p.m.