# are.pargld.valid: Are the Distribution Parameters Consistent with the... In lmomco: L-Moments, Censored L-Moments, Trimmed L-Moments, L-Comoments, and Many Distributions

 are.pargld.valid R Documentation

## Are the Distribution Parameters Consistent with the Generalized Lambda Distribution

### Description

Is the distribution parameter object consistent with the corresponding distribution? The distribution functions (cdfgld, pdfgld, quagld, and lmomgld) require consistent parameters to return the cumulative probability (nonexceedance), density, quantile, and L-moments of the distribution, respectively. These functions internally use the are.pargld.valid function.

### Usage

are.pargld.valid(para, verbose=FALSE, nowarn=FALSE)


### Arguments

 para A distribution parameter list returned by pargld or vec2par. verbose A logical switch on additional output to the user—default is FALSE. nowarn A logical switch on warning suppression. If 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 an optimization algorithm.

### Details

Karian and Dudewicz (2000) outline valid parameter space of the Generalized Lambda distribution. First, according to Theorem 1.3.3 the distribution is valid if and only if

α(κ F^{κ - 1} + h(1-F)^{h -1 }) ≥ 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 κ and h space for suitable α 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 α by

\mbox{Region 1: } κ ≤ -1 \mbox{ and } h ≥ 1 \mbox{,}

\mbox{Region 2: } κ ≥ 1 \mbox{ and } h ≤ -1 \mbox{,}

\mbox{Region 3: } κ ≥ 0 \mbox{ and } h ≥ 0 \mbox{,}

\mbox{Region 4: } κ ≤ 0 \mbox{ and } h ≤ 0 \mbox{,}

\mbox{Region 5: } h ≥ (-1/κ) \mbox{ and } -1 ≥ κ ≤ 0 \mbox{, and}

\mbox{Region 6: } h ≤ (-1/κ) \mbox{ and } h ≥ -1 \mbox{ and } κ ≥ 1 \mbox{.}

### Value

 TRUE If the parameters are gld consistent. FALSE If the parameters are not gld consistent.

### Note

This function calls is.gld to verify consistency between the distribution parameter object and the intent of the user.

W.H. Asquith

### References

Asquith, W.H., 2007, L-moments and TL-moments of the generalized lambda distribution: Computational Statistics and Data Analysis, v. 51, no. 9, pp. 4484–4496.

Karian, Z.A., and Dudewicz, E.J., 2000, Fitting statistical distributions—The generalized lambda distribution and generalized bootstrap methods: CRC Press, Boca Raton, FL, 438 p.

is.gld, pargld

### Examples

## Not run:
para <- vec2par(c(123,34,4,3),type='gld')
if(are.pargld.valid(para)) Q <- quagld(0.5,para)

# The following is an example of inconsistent L-moments for fitting but
# prior to lmomco version 2.1.2 and untrapped error was occurring.
lmr <- lmoms(c(33, 37, 41, 54, 78, 91, 100, 120, 124))
para <- pargld(lmr); are.pargld.valid(para)
## End(Not run)


lmomco documentation built on Aug. 27, 2022, 1:06 a.m.