cdfwak.RdDistribution function and quantile function of the Wakeby distribution.
The Wakeby distribution with parameters \(\xi\), \(\alpha\), \(\beta\), \(\gamma\) and \(\delta\) has quantile function $$x(F)=\xi+{\alpha\over\beta}\lbrace1-(1-F)^\beta\rbrace-{\gamma\over\delta}\lbrace1-(1-F)^{-\delta}\rbrace.$$
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\ge0\);
\(\alpha+\gamma\ge0\).
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\).
cdfwak gives the distribution function;
quawak gives the quantile function.
The functions expect the distribution parameters in a vector,
rather than as separate arguments as in the standard R
distribution functions pnorm, qnorm, etc.
Hosking, J. R. M. and Wallis, J. R. (1997). Regional frequency analysis: an approach based on L-moments, Cambridge University Press, Appendix A.11.
# 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))
#> [1] 4.44010691 5.02755175 2.14513510 1.85840677 1.88064813 5.25219778
#> [7] 5.76014173 2.82228077 1.99776801 2.45187482 2.21920091 2.45370997
#> [13] 1.85356647 3.27875011 1.76135335 2.10504555 2.16923148 2.99856138
#> [19] 1.85503626 3.36789094 2.47419302 0.55676591 3.36765869 1.11821409
#> [25] 0.67198832 3.16484410 2.53286209 2.88817701 3.13324850 2.17927579
#> [31] 2.78200408 0.02943681 8.36732917 1.74780237 1.88557884 3.11236699
#> [37] 1.56103656 1.42382484 1.65847679 2.61278380 2.87285424 3.49473282
#> [43] 1.73629814 3.50574833 2.53065358 2.57543293 1.47614287 1.70563886
#> [49] 0.20556464 5.95308428 1.20626209 1.57167009 1.92982412 2.24542389
#> [55] 1.66178258 1.17618381 2.15842685 2.01279300 5.01514702 0.71395061
#> [61] 1.70416818 2.85611710 3.20379417 2.73214576 1.28343751 2.55346817
#> [67] 4.44804246 3.11497066 1.30177887 3.86658667 4.24094787 3.01394855
#> [73] 3.26484855 1.52312055 1.70216942 1.89850549 1.57349813 4.03016512
#> [79] 2.23477468 2.19991699 3.49833528 1.89652835 1.88957575 1.95110179
#> [85] 3.82327946 1.83360024 2.11401487 2.08545600 1.56358270 2.88666217
#> [91] 1.65994162 5.37390940 2.60087441 1.90091114 3.65031715 4.86565516
#> [97] 1.53348762 2.44721055 1.54166739 2.64973139