pargep | R Documentation |
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.
pargep(lmom, checklmom=TRUE, checkdomain=TRUE, maxit=10, verbose=FALSE, ...)
lmom |
An L-moment object created by |
checklmom |
Should the |
checkdomain |
A logical controlling whether the empirically derived (approximated) boundaries of the GEP in the |
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. |
An R list
is returned.
type |
The type of distribution: |
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: |
its |
Iteration count. |
source |
The source of the parameters: “pargep”. |
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.
W.H. Asquith
lmomgep
, cdfgep
, pdfgep
, quagep
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.