Learn R Programming

lmom (version 1.1)

lmr-functions: L-moments of specific probability distributions

Description

Computes the $L$-moments of a probability distribution given its parameters. The following distributions are recognized: ll{ lmrexp exponential lmrgam gamma lmrgev generalized extreme-value lmrglo generalized logistic lmrgpa generalized Pareto lmrgno generalized normal lmrgum Gumbel (extreme-value type I) lmrkap kappa lmrln3 three-parameter lognormal lmrnor normal lmrpe3 Pearson type III lmrwak Wakeby lmrwei Weibull }

Usage

lmrexp(para = c(0, 1), nmom = 2)
lmrgam(para = c(1, 1), nmom = 2)
lmrgev(para = c(0, 1, 0), nmom = 3)
lmrglo(para = c(0, 1, 0), nmom = 3)
lmrgno(para = c(0, 1, 0), nmom = 3)
lmrgpa(para = c(0, 1, 0), nmom = 3)
lmrgum(para = c(0, 1), nmom = 2)
lmrkap(para = c(0, 1, 0, 0), nmom = 4)
lmrln3(para = c(0, 0, 1), nmom = 3)
lmrnor(para = c(0, 1), nmom = 2)
lmrpe3(para = c(0, 1, 0), nmom = 3)
lmrwak(para = c(0, 1, 0, 0, 0), nmom = 5)
lmrwei(para = c(0, 1, 0), nmom = 3)

Arguments

para
Numeric vector containing the parameters of the distribution.
nmom
The number of $L$-moments to be calculated.

Value

  • Numeric vector containing the $L$-moments.

synopsis

lmrexp(para = lmom.dist$exp$pardefaults, nmom = lmom.dist$exp$himom) lmrgam(para = lmom.dist$gam$pardefaults, nmom = lmom.dist$gam$himom) lmrgev(para = lmom.dist$gev$pardefaults, nmom = lmom.dist$gev$himom) lmrglo(para = lmom.dist$glo$pardefaults, nmom = lmom.dist$glo$himom) lmrgno(para = lmom.dist$gno$pardefaults, nmom = lmom.dist$gno$himom) lmrgpa(para = lmom.dist$gpa$pardefaults, nmom = lmom.dist$gpa$himom) lmrgum(para = lmom.dist$gum$pardefaults, nmom = lmom.dist$gum$himom) lmrkap(para = lmom.dist$kap$pardefaults, nmom = lmom.dist$kap$himom) lmrnor(para = lmom.dist$nor$pardefaults, nmom = lmom.dist$nor$himom) lmrpe3(para = lmom.dist$pe3$pardefaults, nmom = lmom.dist$pe3$himom) lmrwak(para = lmom.dist$wak$pardefaults, nmom = lmom.dist$wak$himom)

Details

Numerical methods and accuracy are as described in Hosking (1996, pp. 8--9).

References

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.

See Also

lmrp to compute $L$-moments of a general distribution specified by its cumulative distribution function or quantile function. samlmu to compute $L$-moments of a data sample. pelexp, etc., to compute the parameters of a distribution given its $L$-moments. For individual distributions, see their cumulative distribution functions: ll{ cdfexp exponential cdfgam gamma cdfgev generalized extreme-value cdfglo generalized logistic cdfgpa generalized Pareto cdfgno generalized normal cdfgum Gumbel (extreme-value type I) cdfkap kappa cdfln3 three-parameter lognormal cdfnor normal cdfpe3 Pearson type III cdfwak Wakeby cdfwei Weibull }

Examples

Run this code
# Compare sample L-moments of Ozone from the airquality data
# with the L-moments of a GEV distribution fitted to the data
data(airquality)
smom <- samlmu(airquality$Ozone, nmom=6)
gevpar <- pelgev(smom)
pmom <- lmrgev(gevpar, nmom=6)
print(smom)
print(pmom)

Run the code above in your browser using DataLab