| W_gamma | R Documentation |
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)
z |
a numeric vector of real values; note that |
gamma |
skewness parameter; by default |
branch |
either |
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(\gamma U) =: H_{\gamma}(U), \quad \gamma \in \mathbf{R},
where U is a zero-mean and/or unit-variance version of the distribution F.
The inverse transformation is W_{\gamma}(z) := \frac{W(\gamma z)}{\gamma}, where
W is the Lambert W function.
W_gamma(z, gamma, branch = 0) (and W_gamma(z, gamma, branch = -1))
implement this inverse.
If \gamma = 0, then z = u and the inverse also equals the identity.
If \gamma \neq 0, the inverse transformation can be computed by
W_{\gamma}(z) = \frac{1}{\gamma} W(\gamma z).
Same holds for W_gamma(z, gamma, branch = -1).
The derivative of W_{\gamma}(z) with respect to z simplifies to
\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).
numeric; if z is a vector, so is the output.
H_gamma
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.