are.pargam.valid: Are the Distribution Parameters Consistent with the Gamma...

are.pargam.validR Documentation

Are the Distribution Parameters Consistent with the Gamma Distribution

Description

Is the distribution parameter object consistent with the corresponding distribution? The distribution functions (cdfgam, pdfgam, quagam, and lmomgam) require consistent parameters to return the cumulative probability (nonexceedance), density, quantile, and L-moments of the distribution, respectively. These functions internally use the are.pargam.valid function. The parameters are restricted to the following conditions.

\alpha > 0 \mbox{ and } \beta > 0\mbox{.}

Alternatively, a three-parameter version is available following the parameterization of the Generalized Gamma distribution used in the gamlss.dist package and and for lmomco is documented under pdfgam. The parameters for this version are

\mu > 0;\;\; \sigma > 0;\;\; -\infty < \nu < \infty

for parameters number 1, 2, 3, respectively.

Usage

are.pargam.valid(para, nowarn=FALSE)

Arguments

para

A distribution parameter list returned by pargam or vec2par.

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.

Value

TRUE

If the parameters are gam consistent.

FALSE

If the parameters are not gam consistent.

Note

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

Author(s)

W.H. Asquith

References

Hosking, J.R.M., and Wallis, J.R., 1997, Regional frequency analysis—An approach based on L-moments: Cambridge University Press.

See Also

is.gam, pargam

Examples

para <- pargam(lmoms(c(123,34,4,654,37,78)))
if(are.pargam.valid(para)) Q <- quagam(0.5,para)

lmomco documentation built on May 29, 2024, 10:06 a.m.