Learn R Programming

lmom (version 1.1)

samlmu: Sample L-moments

Description

Computes the ``unbiased'' sample $L$-moments and $L$-moment ratios of a data vector.

Usage

samlmu(x, nmom = 4, sort.data = TRUE)
samlmu.s(x, nmom = 4, sort.data = TRUE)

Arguments

x
A numeric vector.
nmom
Number of $L$-moments to be found.
sort.data
Whether the x vector needs to be sorted.

Value

  • A numeric vector containing the $L$-moments and $L$-moment ratios, in the order $\ell_1$, $\ell_2$, $t_3$, $t_4$, etc.

Details

samlmu and samlmu.s are functionally identical. samlmu calls a Fortran routine internally, and is usually faster. samlmu.s is written entirely in the S language; it is provided so that users can conveniently see how the calculations are done.

References

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. (1996). Fortran routines for use with the method of $L$-moments, Version 3. Research Report RC20525, IBM Research Division, Yorktown Heights, N.Y.

Examples

Run this code
data(airquality)
    samlmu(airquality$Ozone,6)

Run the code above in your browser using DataLab