Definition
Parameters (4): \(\xi\) (location), \(\alpha\) (scale), \(k\), \(h\).
Range of \(x\): upper bound is \(\xi + \alpha/k\) if \(k>0\), \(\infty\) if \(k \le 0\);
lower bound is \(\xi + \alpha(1-h^{-k})/k\) if \(h>0\), \(\xi + \alpha/k\) if \(h \le 0\) and \(k<0\) and \(-\infty\) if \(h \le 0\) and \(k \ge 0\)
Probability density function:
$$f(x)=\alpha^{-1} [1-k(x-\xi)/\alpha]^{1/k-1} [F(x)]^{1-h}$$
Cumulative distribution function:
$$F(x)=\{1-h[1-k(x-\xi)/\alpha]^{1/k}\}^{1/h}$$
Quantile function:
$$x(F)= \xi + \frac{\alpha}{k} \left[ 1-\left( \frac{1-F^h}{h} \right)^k \right]$$
\(h=-1\) is the generalized logistic distribution;
\(h=0\) is the generalized eztreme value distribution;
\(h=1\) is the generalized Pareto distribution.
L-moments
L-moments are defined for \(h \ge 0\) and \(k>-1\), or if \(h<0\) and \(-1<k<-1/h\).
$$\lambda_1 = \xi + \alpha(1-g_1)/k$$
$$\lambda_2 = \alpha(g_1 - g_2)/k$$
$$\tau_3 = (-g_1 + 3g_2 - 2g_3)/(g_1 - g_2)$$
$$\tau_4 = (-g_1 + 6g_2 - 10g_3 + 5g_4)/(g_1 - g_2)$$
where
\(g_r = \frac{r\Gamma(1+k)\Gamma(r/h)}{h^{1+k}\Gamma(1+k+r/h)}\) if \(h>0\);
\(g_r = \frac{r \Gamma(1+k)\Gamma(-k-r/h)}{(-h)^{1+k}\Gamma(1-r/h)}\) if \(h<0\);
Here \(\Gamma\) denote the gamma function
$$\Gamma (x) = \int_0^{\infty} t^{x-1} e^{-t} dt$$
Parameters
There are no simple expressions for the parameters in terms of the L-moments.
However they can be obtained with a numerical algorithm considering the formulations of \(\tau_3\) and \(\tau_4\) in terms of \(k\) and \(h\).
Here we use the function optim
to minimize \((t_3-\tau_3)^2 + (t_4-\tau_4)^2\) where \(t_3\) and \(t_4\) are the sample L-moment ratios.
Lmom.kappa
and par.kappa
accept input as vectors of equal length. In f.kappa
, F.kappa
,
invF.kappa
and rand.kappa
parameters (xi
, alfa
, k
, h
) must be atomic.