lmom-package | R Documentation |

**R** functions for use with the method of `L`

-moments

`L`

-moments are measures of the location, scale, and shape
of probability distributions or data samples.
They are based on linear combinations of order statistics.
Hosking (1990) and Hosking and Wallis (1997, chap. 2) give expositions
of the theory of `L`

-moments and `L`

-moment ratios. Hosking and Wallis
(1997, Appendix) give, for many distributions in common use, expressions
for the `L`

-moments of the distributions and algorithms for estimating
the parameters of the distributions by equating sample and population
`L`

-moments (the “method of `L`

-moments”). This package contains **R** functions
that should facilitate the use of `L`

-moment-based methods.

For each of 13 probability distributions, the package contains
functions to evaluate the cumulative distribution function and quantile
function of the distribution, to calculate the `L`

-moments given the
parameters and to calculate the parameters given the low-order
`L`

-moments. These functions are as follows.

`cdf...`

computes the cumulative distribution function of the distribution.

`qua...`

computes the quantile function (inverse cumulative distribution function)
of the distribution.

`lmr...`

calculates the `L`

-moment ratios of the distribution given its
parameters.

`pel...`

calculates the parameters of the distribution given its `L`

-moments.
When the `L`

-moments are the sample `L`

-moments of a set of data,
the resulting parameters are of course the
“method of `L`

-moments” estimates of the parameters.

Here `...`

is a three-letter code used to identify the distribution,
as given in the table below.
For example the cumulative distribution function of the gamma distribution
is `cdfgam`

.

`exp` | exponential | |

`gam` | gamma | |

`gev` | generalized extreme-value | |

`glo` | generalized logistic | |

`gpa` | generalized Pareto | |

`gno` | generalized normal | |

`gum` | Gumbel (extreme-value type I) | |

`kap` | kappa | |

`ln3` | lognormal | |

`nor` | normal | |

`pe3` | Pearson type III | |

`wak` | Wakeby | |

`wei` | Weibull | |

The following functions are also contained in the package.

`samlmu`

computes the sample `L`

-moments of a data vector.

`lmrp`

and `lmrq`

compute the `L`

-moments of a probability distribution specified
by its cumulative distribution function (for function `lmrp`

)
or its quantile function (for function `lmrq`

).
The computation uses numerical integration applied to
a general expression for the `L`

-moments of a distribution.
Functions `lmrp`

and `lmrq`

can be used for any univariate
distribution. They are slower and usually less accurate than the
computations carried out for specific distributions by the
`lmr...`

functions.

`pelp`

and `pelq`

compute the parameters of a probability distribution
as a function of the `L`

-moments.
The computation uses function `lmrp`

or `lmrq`

to compute
`L`

-moments and numerical optimization to find parameter values
for which the sample and population `L`

-moments are equal.
Functions `pelp`

and `pelq`

can be used for any univariate
distribution. They are slower and usually less accurate than the
computations carried out for specific distributions by the
`pel...`

functions.

`lmrd`

draws an `L`

-moment ratio diagram.

`lmrdpoints`

and `lmrdlines`

add points, or connected line segments, respectively,
to an `L`

-moment ratio diagram.

`evplot`

draws an “extreme-value plot”, i.e. a quantile-quantile plot
in which the horizontal axis is the quantile of an
extreme-value type I (Gumbel) distribution.

`evpoints`

, `evdistp`

, and `evdistq`

add, respectively, a set of points, a cumulative distribution function,
and a quantile function to an extreme-value plot.

`L`

-momentsSome functions support the trimmed `L`

-moments defined by Elamir and Seheult (2003).
Trimmed `L`

-moments are based on linear combinations of order statistics
that give zero weight to the most extreme order statistics and thereby can be
defined for very heavy-tailed distributions that do not have a finite mean.

Function `samlmu`

can compute sample trimmed `L`

-moments.
Functions `lmrp`

and `lmrq`

can compute trimmed `L`

-moments
of probability distributions.
Functions `pelp`

and `pelq`

can calculate parameters
of a probability distribution given its trimmed `L`

-moments.

The distribution-specific functions `lmr...`

and `pel...`

and the
functions for `L`

-moment ratio diagrams (`lmrd`

, etc.) currently
do not support trimmed `L`

-moments.

The functions `cdf...`

(cumulative distribution functions)
and `qua...`

(quantile functions) expect the distribution
parameters to be specified as a single vector.
This differs from the standard **R** convention, in which
each parameter is a separate argument.
There are two reasons for this.
First, the single-vector parametrization is consistent with
the Fortran routines on which these **R** functions are based.
Second, the single-vector parametrization is often easier to use.
For example, consider computing the 80th and 90th percentiles
of a normal distribution fitted to a set of `L`

-moments
stored in a vector `lmom`

.
In the single-vector parametrization, this is achieved by

quanor( c(.8,.9), pelnor(lmom) )

The separate-arguments parametrization would need a more complex expression, such as

do.call( qnorm, c( list(.8,.9), pelnor(lmom) ) )

In functions (`lmrp`

, `lmrq`

, `pelp`

, `pelq`

, `evplot`

,
`evdistp`

, `evdistq`

) that take a cumulative distribution function
or a quantile function as an argument, the cumulative distribution function
or quantile function can use either form of parametrization.

Functions `cdf...`

, `qua...`

, `lmr...`

, `pel...`

,
and `samlmu`

are analogous to Fortran routines from
the LMOMENTS package, version 3.04, available from StatLib at
http://lib.stat.cmu.edu/general/lmoments.
Functions `cdfwak`

and `samlmu`

, and all the `lmr...`

and `pel...`

functions, internally call Fortran code that is derived from the
LMOMENTS package.

J. R. M. Hosking jrmhosking@gmail.com

Elamir, E. A. H., and Seheult, A. H. (2003). Trimmed L-moments.
*Computational Statistics and Data Analysis*, **43**, 299-314.

Hosking, J. R. M. (1990).
`L`

-moments: analysis and estimation of distributions
using linear combinations of order statistics.
*Journal of the Royal Statistical Society, Series B*, **52**, 105-124.

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

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.