Learn R Programming

lmomco (version 2.4.14)

supdist: The Support of a Distribution based on the Parameters

Description

This function takes a parameter object, such as that returned by lmom2par, and computes the support (the lower and upper bounds, \(\{L, U\}\)) of the distribution given by the parameters. The computation is based on two calls to par2qua for the parameters in argument para (\(\Theta\)) and nonexceedance probabilities \(F \in \{0, 1\}\):

lower <- par2qua(0, para)
upper <- par2qua(1, para)

The quality of \(\{L, U\}\) is dependent of the handling of \(F \in \{0,1\}\) internal to each quantile function. Across the suite of distributions supported by lmomco, potential applications, and parameter combinations, it difficult to ensure numerical results for the respective \(\{L, U\}\) are either very small, are large, or are (or should be) infinite. The distinction is sometimes difficult depending how fast the tail(s) of a distribution is (are) either approaching a limit as \(F\) respectively approaches \(0^{+}\) or \(1^{-}\).

The intent of this function is to provide a unified portal for \(\{L, U\}\) estimation. Most of the time R (and lmomco) do the right thing anyway and the further overhead within the parameter estimation suite of functions in lmomco is not implemented.

The support returned by this function might be useful in extended application development involving probability density functions pdfCCC (\(f(x,\Theta)\), see dlmomco) and cumulative distribution functions cdfCCC (\(F(x,\Theta)\), see plmomco) functions---both of these functions use as their primary argument a value \(x\) that exists along the real number line.

Usage

supdist(para, trapNaN=FALSE, delexp=0.5, paracheck=TRUE, ...)

Value

An R

list is returned.

type

Three character (minimum) distribution type (for example, type="gev");

support

The support (or range) of the fitted distribution;

nonexceeds

The nonexceedance probabilities at the computed support.

fexpons

A vector indicating how the respective lower and upper boundaries were arrived at (see Note); and

finite

A logical on each entry of the support with a preemptive call by the is.finite function in R.

source

An attribute identifying the computational source of the distribution support: “supdist”.

Arguments

para

The parameters of the distribution.

trapNaN

A logical influencing how NaN are handled (see Note).

delexp

The magnitude of the decrementing of the exponent to search down and up from. A very long-tailed but highly peaked distribution might require this to be smaller than default.

paracheck

A logical controlling whether the parameters are checked for validity.

...

Additional arguments to pass.

Author

W.H. Asquith

See Also

lmom2par

Examples

Run this code
lmr <- lmoms(c(33, 37, 41, 54, 78, 91, 100, 120, 124))
supdist(lmom2par(lmr, type="gov" )) # Lower = 27.41782, Upper = 133.01470
supdist(lmom2par(lmr, type="gev" )) # Lower = -Inf,     Upper = 264.4127

supdist(lmom2par(lmr, type="wak" ))               # Lower = 16.43722, Upper = NaN
supdist(lmom2par(lmr, type="wak" ), trapNaN=TRUE) # Lower = 16.43722, Upper = 152.75126
#$support  16.43722  152.75126
#$fexpons        NA  -16
#$finite       TRUE  TRUE
if (FALSE) {
para <- vec2par(c(0.69, 0.625), type="kmu") # very flat tails and narrow peak!
supdist(para, delexp=1   )$support # [1] 0        NaN
supdist(para, delexp=0.5 )$support # [1] 0.000000 3.030334
supdist(para, delexp=0.05)$support # [1] 0.000000 3.155655
# This distribution appears to have a limit at PI and the delexp=0.5
}

Run the code above in your browser using DataLab