Learn R Programming

lmomco (version 1.3.3)

quatexp: Quantile Function of the Truncated Exponential Distribution

Description

This function computes the quantiles of the Truncated Exponential distribution given parameters ($\xi$ and $\alpha$) of the distribution computed by partexp. The quantile function of the distribution is

$$x(F) = -\alpha\log[1-F(1-\mathrm{exp}(-\xi/\alpha))]\mbox{,}$$

where $x(F)$ is the quantile for nonexceedance probability $F$, $\xi$ is a location parameter, $\alpha$ is a scale parameter, $0 \le x \le \xi$. The distribution has $0 < \tau_2 <= 1="" 2$,="" $\xi=""> 0$, and $1/\alpha \ne 0$.

Usage

quatexp(f, para)

Arguments

f
Nonexceedance probability ($0 \le F \le 1$).
para
The parameters from partexp or similar.

Value

  • Quantile value for nonexceedance probability $F$.

References

Vogel, R.M., Hosking, J.R.M., Elphick, C.S., Roberts, D.L., and Reed, J.M., 2008, Goodness of fit of probability distributions for sightings as species approach extinction: Bulletin of Mathematial Biology, v. 71, no. 3, pp. 701--719.

See Also

pdftexp, cdftexp, partexp

Examples

Run this code
lmr <- vec2lmom(c(40,0.38), lscale=FALSE)
  quatexp(0.5,partexp(lmr))

F <- nonexceeds()
  L1 <- 50; T2 <- seq(0.51,0.005,by=-.001)
  PAR <- partexp(vec2lmom(c(L1,1/3), lscale=FALSE))
  plot(F, quatexp(F, PAR),
       type="l", lwd=2, col=2,
       xlab="NONEXCEEDANCE PROBABILITY",
       ylab="SIGHTING TIMES",
       ylim=c(0,300)) # uniform distribution

  for(t2 in T2) {
    PAR <- partexp(vec2lmom(c(L1,t2), lscale=FALSE))
    if(is.null(PAR)) next
    if(PAR$is.uni) {
      # For the T2 near 1/3 a kick over to uniform solution is
      # needed.  For the -0.001 steps shown above no uniform
      # distribution solutions will be "used" and no output.
      print(PAR$para) # by this print() will be seen.
    }
    lines(F, quatexp(F,PAR), col=rgb(0,0,0,.1))
  }
  # Because T2 started at > 1/2, ten warnings of LCV > 1/2
  # will result during execution of the for() loop.

Run the code above in your browser using DataLab