# cdfwak: Wakeby distribution In lmom: L-Moments

## Description

Distribution function and quantile function of the Wakeby distribution.

## Usage

 ```1 2``` ```cdfwak(x, para = c(0, 1, 0, 0, 0)) quawak(f, para = c(0, 1, 0, 0, 0)) ```

## Arguments

 `x` Vector of quantiles. `f` Vector of probabilities. `para` Numeric vector containing the parameters of the distribution, in the order xi, alpha, beta, gamma, delta.

## Details

The Wakeby distribution with parameters xi, alpha, beta, gamma and delta has quantile function

x(F) = xi + alpha {1-(1-F)^beta}/beta - gamma {1-(1-F)^(-delta)}/delta .

The parameters are restricted as in Hosking and Wallis (1997, Appendix A.11):

• either beta + delta > 0 or beta = gamma = delta = 0;

• if alpha = 0 then beta = 0;

• if gamma = 0 then delta = 0;

• gamma >= 0;

• alpha + gamma >= 0.

The distribution has a lower bound at xi and, if delta<0, an upper bound at xi+alpha/beta-gamma/delta.

The generalized Pareto distribution is the special case alpha=0 or gamma=0. The exponential distribution is the special case beta=gamma=delta=0. The uniform distribution is the special case beta=1, gamma=delta=0.

## Value

`cdfwak` gives the distribution function; `quawak` gives the quantile function.

## Note

The functions expect the distribution parameters in a vector, rather than as separate arguments as in the standard R distribution functions `pnorm`, `qnorm`, etc.

## References

Hosking, J. R. M. and Wallis, J. R. (1997). Regional frequency analysis: an approach based on L-moments, Cambridge University Press, Appendix A.11.

`cdfgpa` for the generalized Pareto distribution.
`cdfexp` for the exponential distribution.
 ```1 2 3``` ```# Random sample from the Wakeby distribution # with parameters xi=0, alpha=30, beta=20, gamma=1, delta=0.3. quawak(runif(100), c(0,30,20,1,0.3)) ```