Learn R Programming

lmomco (version 2.4.14)

lmomkap: L-moments of the Kappa Distribution

Description

This function estimates the L-moments of the Kappa distribution given the parameters (\(\xi\), \(\alpha\), \(\kappa\), and \(h\)) from parkap. The L-moments in terms of the parameters are complicated and are solved numerically. If the parameter \(k = 0\) (is small or near zero) then let $$d_r = \gamma + \log(-h) + \mathrm{digamma}(-r/h)\ \mbox{for}\ h < 0$$ $$d_r = \gamma + \log(r)\ \mbox{for}\ h = 0\ \mbox{(is small)}$$ $$d_r = \gamma + \log(h) + \mathrm{digamma}(1+r/h)\ \mbox{for}\ h > 0$$ or if \(k > -1\) (nonzero) then let $$g_r = \frac{\Gamma(1+k)\Gamma(-r/h-k)}{-h^k\,\Gamma(-r/h)}\ \mbox{for}\ h < 0$$ $$g_r = \frac{\Gamma(1+k)}{r^k} \times (1-0.5hk(1+k)/r)\ \mbox{for}\ h = 0\ \mbox{(is small)}$$ $$g_r = \frac{\Gamma(1+k)\Gamma(1+r/h)}{h^g\,\Gamma(1+k+r/h)}\ \mbox{for}\ h > 0$$ where \(r\) is L-moment order, \(\gamma\) is Euler's constant, and for \(h = 0\) the term to the right of the multiplication is not in Hosking (1994) or Hosking and Wallis (1997) for exists within Hosking's FORTRAN code base.

The probability-weighted moments (\(\beta_r\); pwm2lmom) for \(k = 0\) (is small or near zero) are $$r\beta_{r-1} = \xi + (\alpha/\kappa)[1 - d_r]$$ or if \(k > -1\) (nonzero) then $$r\beta_{r-1} = \xi + (\alpha/\kappa)[1 - g_r]$$

Usage

lmomkap(para, nmom=5)

Value

An R

list is returned.

lambdas

Vector of the L-moments. First element is \(\lambda_1\), second element is \(\lambda_2\), and so on.

ratios

Vector of the L-moment ratios. Second element is \(\tau\), third element is \(\tau_3\) and so on.

trim

Level of symmetrical trimming used in the computation, which is 0.

leftrim

Level of left-tail trimming used in the computation, which is NULL.

rightrim

Level of right-tail trimming used in the computation, which is NULL.

source

An attribute identifying the computational source of the L-moments: “lmomkap”.

Arguments

para

The parameters of the distribution.

nmom

The number of moments to compute. Default is 5.

Author

W.H. Asquith

References

Hosking, J.R.M., 1994, The four-parameter kappa distribution: IBM Journal of Reserach and Development, v. 38, no. 3, pp. 251--258.

Hosking, J.R.M., and Wallis, J.R., 1997, Regional frequency analysis---An approach based on L-moments: Cambridge University Press.

See Also

parkap, cdfkap, pdfkap, quakap

Examples

Run this code
lmr <- lmoms(c(123, 34, 4,78, 45, 234, 65, 2, 3, 5, 76, 7, 80))
lmomkap(parkap(lmr))

Run the code above in your browser using DataLab