lmomgam: L-moments of the Gamma Distribution

Description Usage Arguments Value Author(s) References See Also Examples

Description

This function estimates the L-moments of the Gamma distribution given the parameters (α and β) from pargam. The L-moments in terms of the parameters are complicated and solved numerically. This function is adaptive to the 2-parameter and 3-parameter Gamma versions supported by this package. For legacy reasons, lmomco continues to use a port of Hosking's FORTRAN into R if the 2-parameter distribution is used but the 3-parameter generalized Gamma distribution calls upon theoLmoms.max.ostat. Alternatively, the theoTLmoms could be used: theoTLmoms(para) is conceptually equivalent to the internal calls to theoLmoms.max.ostat made for the lmomgam implementation.

Usage

1
lmomgam(para, ...)

Arguments

para

The parameters of the distribution.

...

Additional arguments to pass to theoLmoms.max.ostat.

Value

An R list is returned.

lambdas

Vector of the L-moments. First element is λ_1, second element is λ_2, and so on.

ratios

Vector of the L-moment ratios. Second element is τ, third element is τ_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: “lmomgam”.

Author(s)

W.H. Asquith

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, v. 52, p. 105–124.

Hosking, J.R.M., 1996, FORTRAN routines for use with the method of L-moments: Version 3, IBM Research Report RC20525, T.J. Watson Research Center, Yorktown Heights, New York.

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

See Also

pargam, cdfgam, pdfgam, quagam

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
lmomgam(pargam(lmoms(c(123,34,4,654,37,78))))

## Not run: 
# 3-p Generalized Gamma Distribution and comparisons of 3-p Gam parameterization.
#     1st parameter A[lmomco] = A[gamlss] =  exp(A[flexsurv])
#     2nd parameter B[lmomco] = B[gamlss] =      B[flexsurv]
#     3rd parameter C[lmomco] = C[gamlss] -->    C[flexsurv] = B[lmomco]/C[lmomco]
lmomgam(vec2par(c(7.4, 0.2, 14), type="gam"), nmom=5)$lambdas      # numerics
lmoms(gamlss.dist::rGG(50000, mu=7.4, sigma=0.2, nu=14))$lambdas   # simulation
lmoms(flexsurv::rgengamma(50000, log(7.4), 0.2, Q=0.2*14))$lambdas # simulation
#[1]  5.364557537  1.207492689 -0.110129217  0.067007941 -0.006747895
#[1]  5.366707749  1.209455502 -0.108354729  0.066360223 -0.006716783
#[1]  5.356166684  1.197942329 -0.106745364  0.069102821 -0.008293398#
## End(Not run)

Example output

$lambdas
[1] 155.00000 118.59947  73.13057  41.28022        NA

$ratios
[1]        NA 0.7651579 0.6166180 0.3480641        NA

$source
[1] "lmomgam"

[1]  5.364557537  1.207492689 -0.110129217  0.067007941 -0.006747895
[1]  5.360521393  1.204652262 -0.109914019  0.067884936 -0.006589123
[1]  5.369523333  1.205553662 -0.112122923  0.067157627 -0.006508236

lmomco documentation built on Sept. 21, 2018, 6:40 p.m.