vec2par
are consistent with the corresponding distribution,
otherwise a list would not have been returned. However, other
functions (quagld
) require consistent parameters to ensure that the
Generalized Lambda Distribution is monotonic increasing on $0 \le F \le 1$,
in which $F$ is nonexceedance probability.are.pargld.valid(para,verbose=FALSE,nowarn=FALSE)
vec2par
.FALSE
.TRUE
then options(warn=-1)
is made and restored on return. This switch is to permit calls in which warnings are not desired as the user knows how to handle the returned value---say in agld
consistent.gld
consistent.$$\alpha(\kappa F^{\kappa - 1} + h(1-F)^{h -1 }) \ge 0 \mbox{.}$$
for all $F \in [0,1]$. The are.pargld.valid
function tests against this condition by incrementing through $[0,1]$ by $dF = 0.0001$. This is a brute force method of course. Further, Karian and Dudewicz (2002) provide a diagrammatic representation of regions in $\kappa$ and $h$ space for suitable $\alpha$ in which the distribution is valid. The are.pargld.valid
function subsequently checks against the 6 valid regions as a secondary check on Theorem 1.3.3. The regions of the distribution are defined for suitably choosen $\alpha$ by
$$\mbox{Region 1: } \kappa \le -1 \mbox{ and } h \ge 1 \mbox{,}$$ $$\mbox{Region 2: } \kappa \ge 1 \mbox{ and } h \le -1 \mbox{,}$$ $$\mbox{Region 3: } \kappa \ge 0 \mbox{ and } h \ge 0 \mbox{,}$$ $$\mbox{Region 4: } \kappa \le 0 \mbox{ and } h \le 0 \mbox{,}$$ $$\mbox{Region 5: } h \ge (-1/\kappa) \mbox{ and } -1 \ge \kappa \le 0 \mbox{, and}$$ $$\mbox{Region 6: } h \le (-1/\kappa) \mbox{ and } h \ge -1 \mbox{ and } \kappa \ge 1 \mbox{.}$$
is.gld
para <- vec2par(c(123,34,4,3),type='gld')
if(are.pargld.valid(para)) Q <- quagld(0.5,para)
Run the code above in your browser using DataLab