quagep: Quantile Function of the Generalized Exponential Poisson...

quagepR Documentation

Quantile Function of the Generalized Exponential Poisson Distribution

Description

This function computes the quantiles of the Generalized Exponential Poisson distribution given parameters (\beta, \kappa, and h) of the distribution computed by pargep. The quantile function of the distribution is

x(F) = \eta^{-1} \log[1 + h^{-1}\log(1 - F^{1/\kappa}[1 - \exp(-h)])]\mbox{,}

where F(x) is the nonexceedance probability for quantile x > 0, \eta = 1/\beta, \beta > 0 is a scale parameter, \kappa > 0 is a shape parameter, and h > 0 is another shape parameter.

Usage

quagep(f, para, paracheck=TRUE)

Arguments

f

Nonexceedance probability (0 \le F \le 1).

para

The parameters from pargep or vec2par.

paracheck

A logical controlling whether the parameters are checked for validity. Overriding of this check might be extremely important and needed for use of the quantile function in the context of TL-moments with nonzero trimming.

Details

If f = 1 or is so close to unity that NaN in the computations of the quantile function, then the function enters into an infinite loop for which an “order of magnitude decrement” on the value of
.Machine$double.eps is made until a numeric hit is encountered. Let \eta be this machine value, then F = 1 - \eta^{1/j} where j is the iteration in the infinite loop. Eventually F becomes small enough that a finite value will result. This result is an estimate of the maximum numerical value the function can produce on the current running platform. This feature assists in the numerical integration of the quantile function for L-moment estimation (see expect.max.ostat). The expect.max.ostat was zealous on reporting errors related to lack of finite integration. However with the “order magnitude decrementing,” then the errors in expect.max.ostat become fewer and are either

Error in integrate(fnb, lower, upper, subdivisions = 200L) : 
  extremely bad integrand behaviour

or

Error in integrate(fnb, lower, upper, subdivisions = 200L) : 
  maximum number of subdivisions reached

and are shown here to aid in research into Generalized Exponential Power implementation.

Value

Quantile value for nonexceedance probability F.

Author(s)

W.H. Asquith

References

Barreto-Souza, W., and Cribari-Neto, F., 2009, A generalization of the exponential-Poisson distribution: Statistics and Probability, 79, pp. 2493–2500.

See Also

cdfgep, pdfgep, lmomgep, pargep

Examples

gep <- list(para=c(2, 1.5, 3), type="gep")
quagep(0.5, gep)
## Not run: 
  pdf("gep.pdf")
  F <- nonexceeds(f01=TRUE)
  K <- seq(-1,2,by=.2); H <- seq(-1,2,by=.2)
  K <- 10^(K); H <- 10^(H)
  for(i in 1:length(K)) {
    for(j in 1:length(H)) {
      gep <- vec2par(c(2,K[i],H[j]), type="gep")
      message("(K,H): ",K[i]," ",H[j])
      plot(F, quagep(F, gep), lty=i, col=j, type="l", ylim=c(0,4),
           xlab="NONEXCEEDANCE PROBABILITY", ylab="X(F)")
      mtext(paste("(K,H): ",K[i]," ",H[j]))
    }
  }
  dev.off()

## End(Not run)

wasquith/lmomco documentation built on Nov. 13, 2024, 4:53 p.m.