50% off: Unlimited data and AI learning.
State of Data and AI Literacy Report 2025

lmomco (version 2.3.6)

parkap: Estimate the Parameters of the Kappa Distribution

Description

This function estimates the parameters of the Kappa distribution given the L-moments of the data in an L-moment object such as that returned by lmoms. The relations between distribution parameters and L-moments are seen under lmomkap, but of relevance to this documentation, the upper bounds of L-kurtosis (τ4) and a function of L-skew (τ3) is given by τ4<5τ32+16 This bounds is equal to the Generalized Logistic distribution (parglo) and failure occurs if this upper bounds is exceeded. However, the argument snap.tau4, if set, will set τ4 equal to the upper bounds of τ4 of the distribution to the relation above. This value of τ4 should be close enough numerically The argument nudge.tau4 is provided to offset τ4 downward just a little. This keeps the relation operator as “<” in the bounds above to match Hosking's tradition as his sources declare “” as above the GLO. The nudge here hence is not zero, which is a little different compared to the conceptually similar snapping in paraep4.

Usage

parkap(lmom, checklmom=TRUE,
             snap.tau4=FALSE, nudge.tau4=sqrt(.Machine$double.eps), ...)

Arguments

lmom

An L-moment object created by lmoms or vec2lmom.

checklmom

Should the lmom be checked for validity using the are.lmom.valid function. Normally this should be left as the default and it is very unlikely that the L-moments will not be viable (particularly in the τ4 and τ3 inequality). However, for some circumstances or large simulation exercises then one might want to bypass this check.

snap.tau4

A logical to “snap” the τ4 downwards to the lower boundary if the given τ4 is greater than the boundary described as above.

nudge.tau4

An offset to the snapping of τ4 intended to move τ4 just below the upper bounds. (The absolute value of the nudge is made internally to ensure only downward adjustment by a subtraction operation.)

...

Other arguments to pass.

Value

An R list is returned.

type

The type of distribution: kap.

para

The parameters of the distribution.

source

The source of the parameters: “parkap”.

support

The support (or range) of the fitted distribution.

ifail

A numeric failure code.

ifailtext

A text message for the failure code.

References

Hosking, J.R.M., 1994, The four-parameter kappa distribution: IBM Journal of Reserach and Development, v. 38, no. 3, pp. 251--258.

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

See Also

lmomkap, cdfkap, pdfkap, quakap

Examples

Run this code
# NOT RUN {
lmr <- lmoms(rnorm(20))
parkap(lmr)

# }
# NOT RUN {
parkap(vec2lmom(c(0,1,.3,.8)), snap.tau4=TRUE) # Tau=0.8 is way above the GLO.
# }

Run the code above in your browser using DataLab