pargep: Estimate the Parameters of the Generalized Exponential...

pargepR Documentation

Estimate the Parameters of the Generalized Exponential Poisson Distribution

Description

This function estimates the parameters of the Generalized Exponential Poisson distribution given the L-moments of the data in an L-moment object such as that returned by lmoms. The relations between distribution parameters and L-moments are seen under lmomgep. However, the expectations of order statistic extrema are computed through numerical integration of the quantile function and the fundamental definition of L-moments (theoLmoms.max.ostat). The mean must be \lambda_1 > 0. The implementation here fits the first three L-moments. A distribution having two scale parameters produces more than one solution. The higher L-moments are not consulted as yet in an effort to further enhance functionality. This function has deterministic starting points but on subsequent iterations the starting points do change. If a solution is not forthcoming, try running the whole function again.

Usage

pargep(lmom, checklmom=TRUE, checkdomain=TRUE, maxit=10, verbose=FALSE, ...)

Arguments

lmom

An L-moment object created by lmoms or vec2lmom.

checklmom

Should the lmom be checked for validity using the are.lmom.valid function. Normally this should be left as the default and it is very unlikely that the L-moments will not be viable (particularly in the \tau_4 and \tau_3 inequality). However, for some circumstances or large simulation exercises then one might want to bypass this check.

checkdomain

A logical controlling whether the empirically derived (approximated) boundaries of the GEP in the \tau_2 and \tau_3 domain are used for early exiting if the lmom do not appear compatible with the distribution.

maxit

The maximum number of iterations. The default should be about twice as big as necessary.

verbose

A logical controlling intermediate results, which is useful given the experimental nature of GEP parameter estimation and if the user is evaluating results at each iteration. The verbosity is subject to change.

...

Other arguments to pass.

Value

An R list is returned.

type

The type of distribution: gep.

para

The parameters of the distribution.

convergence

A numeric code on covergence, a value of 0 means solution looks ok.

error

Sum of relative error: \epsilon = |(\lambda'_2 - \hat\lambda'_2)/\hat\lambda'_2| + |(\lambda_3 - \hat\lambda_3)/\hat\lambda_3| for the fitted (prime) and sample (hat, given in lmom) 2nd and 3rd L-moments. A value of 10 means that the \tau_2 and \tau_3 values are outside the domain of the distribution as determined by brute force computations and custom polynomial fits.

its

Iteration count.

source

The source of the parameters: “pargep”.

Note

There are various inequalities and polynomials demarcating the \tau_2 and \tau_3 of the distribution. These were developed during a protracted period of investigation into the numerical limits of the distribution with a specific implementation in lmomco. Some of these bounds may or may not be optimal as empirically-arrived estimates of theoretical bounds. The polynomials where carefully assembled however. The straight inequalities are a bit more ad hoc following supervision of domain exploration. More research is needed but the domain constraint provided should generally produce parameter solutions.

Author(s)

W.H. Asquith

See Also

lmomgep, cdfgep, pdfgep, quagep

Examples

## Not run: 
# Two examples well inside the domain but known to produce difficulty in
# the optimization process; pargep() engineered with flexibility to usually
# hit the proper solutions.
mygepA <- pargep(vec2lmom(c(1,0.305,0.270), lscale=FALSE))
mygepB <- pargep(vec2lmom(c(1,0.280,0.320), lscale=FALSE))

## End(Not run)
## Not run: 
gep1 <- vec2par(c(2708, 3, 52), type="gep")
 lmr <- lmomgep(gep1);  print(lmr$lambdas)
gep2 <- pargep(lmr);    print(lmomgep(gep2)$lambdas)
# Note that we are close on matching the L-moments but we do
# not recover the parameters given because to shape parameters.
gep3 <- pargep(lmr, nk=1, nh=2);
x <- quagep(nonexceeds(), gep1)
x <- sort(c(x, quagep(nonexceeds(), gep2)))
plot(x, pdfgep(x, gep1), type="l", lwd=2)
lines(x, pdfgep(x, gep2), lwd=3, col=2)
lines(x, pdfgep(x, gep3), lwd=2, col=3)

## End(Not run)

wasquith/lmomco documentation built on April 20, 2024, 7:20 p.m.