W_gamma function

Inverse transformation for skewed Lambert W RVs

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)

Arguments

  • z: a numeric vector of real values; note that W(Inf, branch = 0) = Inf.
  • gamma: skewness parameter; by default gamma = 0, which implies W_gamma(z) = z.
  • branch: either 0 or -1 for the principal or non-principal branch solution.

Returns

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

Details

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

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

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

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

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

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

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

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

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

The derivative of Wγ(z)W_{\gamma}(z) with respect to zz simplifies to

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

deriv_W_gamma implements this derivative (for both branches).

See Also

H_gamma

  • Maintainer: Georg M. Goerg
  • License: GPL (>= 2)
  • Last published: 2023-11-30