lmrdia46: L-moment Ratio Diagram Components of Tau4 and Tau6

lmrdia46R Documentation

L-moment Ratio Diagram Components of Tau4 and Tau6

Description

This function returns a list of the L-kurtosis (\tau_4 and sixth L-moment ratio \tau_6, respectively) ordinates for construction of L-moment Ratio (L-moment diagrams) that are useful in selecting a distribution to model the data.

Usage

lmrdia46()

Details

The lmrdia46 returns a list of the tables for drawing the trajectories of the distributions by its access of .lmomcohash$t46list created by the inst/doc/SysDataBuilder02.R script for sysdata.rda construction used by the lmomco package itself. The lookup table references below are pointing to the inst/doc/t4t6 subdirectory of the package.

A lookup table for the Exponential Power distribution is provided as PowerExponential.txt (.lmomcohash$tau46list$pwrexp), and this distribution is a special case of the Asymmetric Exponential Power4 (lmomaep4) (.lmomcohash$tau46list$aep4).

A lookup table for the Symmetric Stable distribution is provided as StableDistribution.txt (.lmomcohash$tau46list$symstable).

A lookup table for the Student t distribution is provided as StudentT.txt
(.lmomcohash$tau46list$st2), and this distribution is the same as the Student 3t (lmomst3) (.lmomcohash$tau46list$st3).

A lookup table for the Tukey Lamda distribution is provided as SymTukeyLambda.txt
(.lmomcohash$tau46list$tukeylam), and this distribution is not quite the same as the Generalized Lambda distribution (lmomgld) (.lmomcohash$tau46list$gld).

The normal distribution plots as a point in a Tau4-Tau6 L-moment ratio diagram as
.lmomcohash$tau46list$nor for which \tau_4^\mathrm{nor} = 30/\pi\times \mathrm{atan}(\sqrt{2}) - 9 = 0.1226017 and
\tau_6^\mathrm{nor} = 0.04365901 (numerical integration).

Finally, the Cauchy and Slade distributions are symmetrical and can be plotted as well on Tau4-Tau6 L-moment ratio diagram if we permit their trim=1 TL-moments to be shown instead. These are inserted into the returned list as part of the operation of lmrdia46().

Tukey Lambda Notes—The Tukey Lambda distribution is a simpler formulation than the Generalized Lambda.

Q(F) = \frac{1}{\lambda} \biggl[F^\lambda - (1-F)^\lambda \biggr]\mbox{,}

for nonexceedance probability F and \lambda \ne 0 and

Q(F) = \mathrm{log}\biggl(\frac{F}{1-F}\biggr)\mbox{,}

for \lambda = 0 using the natural logarithm.

Inspection of the distribution formulae inform us that the variation in the distribution, the scaling factor 1/\lambda to far left in the first definition, for instance, implies that the L-scale (\lambda_2) is not constant and varies with \lambda. The second L-moment of the Tukey Lambda (all odd order L-moments are zero) is

\lambda_2 = \frac{2}{\lambda}\biggl[ -\frac{1}{1+\lambda} + \frac{2}{2+\lambda}\biggr]\mbox{, and}

the fourth and sixth L-moments are

\lambda_4 = \frac{2}{\lambda}\biggl[ -\frac{1}{1+\lambda} + \frac{12}{2+\lambda} - \frac{30}{3+\lambda} + \frac{20}{4+\lambda}\biggr]\mbox{,}

\lambda_6 = \frac{2}{\lambda}\biggl[ -\frac{1}{1+\lambda} + \frac{30}{2+\lambda} - \frac{210}{3+\lambda} + \frac{560}{4+\lambda} - \frac{630}{5+\lambda} + \frac{252}{6+\lambda}\biggr]\mbox{\, and}

\tau_4 = \lambda_4 / \lambda_2 and \tau_6 = \lambda_6 / \lambda_2. The Tukey Lambda is not separately implemented in the lmomco package. It is provided herein for theoretical completeness, but it is possible to implement the Tukey Lambda by the following example:

  tukeylam <- .lmomcohash$tau46list$gld_byt6tukeylam
  lmr1 <- tukeylam[tukeylam$lambda2 == 1, ] # L-scale equal to one (for instance)
  lmr1 <- vec2lmom(c(0, lmr1$lambda2, 0, lmr1$tau4, 0, lmr1$tau6))
  tuk1 <- pargld(lmr1, aux="tau6")
  print(tuk1$para, 12)
  #                 xi              alpha              kappa                  h
  #  2.50038766315e-04 -5.82180675380e+03 -1.71745206920e-04 -1.71702273015e-04
  lambda <- mean(tuk1$para[3:4]) # remember optimization is used for parameters in
  # GLD parlance and so the two shape parameters are not constrained in pargld()
  # to be numerically identical. So, here, let us compute a mean of the two and then
  # use that as the Lambda in the distribution.
  eps <- 1/tuk1$para[2] - lambda
  message("EPS should be very close to zero, eps = ", eps, " !!!!!")
  tuk2 <- vec2par(c(0, 1/lambda, lambda, lambda), type="gld") # now Tukey Lambda
  lmr2 <- lmomgld(tuk2)

  "ofunc" <- function(lambda, lambda2=NA) {
    tukeyL2 <- ( 2 / lambda ) * ( -1 / (1+lambda) + 2 / (2+lambda) )
    return(lambda2 - tukeyL2)
  }
  lam  <- uniroot(ofunc, interval=c(-1, 1), lambda2=1)$root
  tuk3 <- vec2par(c(0, 20/lam, lam, lam), type="gld")
  lmr3 <- lmomgld(tuk3)

  gld5 <- pargld(lmr3, aux="tau5"); gldlmr5 <- theoLmoms(gld5, nmom=6)
  gld6 <- pargld(lmr3, aux="tau6"); gldlmr6 <- theoLmoms(gld6, nmom=6)
  plotlmrdia46(lmrdia46(), nogld_byt5opt=FALSE)
  points(gldlmr5$ratios[4], gldlmr5$ratios[6], pch=16, col="purple")
  points(gldlmr6$ratios[4], gldlmr6$ratios[6], pch=21, col="purple", bg="white")
  # See how GLD by tau5 optimization, which leaves Tau6 to float plots on the
  # "gld_byt5opt" trajectory, but GLD by tau6 optimization, plots on the Tukey
  # Lambda line, and gld6$para[2] / (1/gld6$para[3]) is equal to the 20 in the
  # parameter setting for tuk3.

The finally differences in the L-moments between the two lmr objects are all are reasonably close to zero with the recognition that optim() has been involved getting us close to the Tukey Lambda that we desire as a GLD with fixed shape parameters and scale factor equal to the inverse of the shape parameter. The demonstration to how to thus acquire a Tukey Lambda from GLD implementation in the lmomco package is thus shown.

Value

An R list is returned.

aep4

\tau_4 and \tau_6 of the 4-parameter Asymmetric Exponential Power (AEP4) distribution given L-skew set as \tau_3 = 0. This becomes then the (Symmetrical) Exponential Power. The complementary entry pwrexp are the effectively the same curve for the power exponential distribution based on lookup table archived in the lmomco package. The table stems from inst/doc/SysDataBuilder02.R. The aep4 and not pwrexp is used in the line drawing by plotlmrdia46.

gld_byt5opt

\tau_4 and \tau_6 of the Generalized Lambda (GLD) distribution given L-skew set as \tau_3 = 0 and optimized by pargld with pargld(..., aux="tau5") with \tau_5 = 0. The table stems from inst/doc/SysDataBuilder02.R. The table gld_byt5opt is used in the line drawing by plotlmrdia46 in relation to the argument therein of nogld_byt5opt. This is the trajectory of the symmetrical GLD having constant L-scale (\lambda_2); this is different than the structurally similar by not identical Tukey Lambda distribution.

gld_byt6tukeylam

\tau_4 and \tau_6 of the Generalized Lambda distribution given L-skew set as \tau_3 = 0 and optimized by pargld with pargld(..., aux="tau6") with \tau_6(\tau_4) (\tau_6 as a function of \tau_4, see gld_byt6tukeylam table). The table stems from inst/doc/
SysDataBuilder02.R. The gld_byt6tukeylam is used in the line drawing by plotlmrdia46 in relation to the argument therein of notukey. This relation between \{\tau_4, \tau_6\} is that of the Tukey Lambda distribution; this is the trajectory of the symmetrical GLD having nonconstant L-scale (\lambda_2).

nor

\tau_4 and \tau_6 of the Normal distribution. The table stems from inst/doc/
SysDataBuilder02.R. The nor is used in the point drawing by
plotlmrdia46.

pdq4

\tau_4 and \tau_6 of the Polynomial Density-Quantile4 distribution, which implicitly is symmetrical, and therefore L-skew set as \tau_3 = 0. The table stems from inst/doc/SysDataBuilder02.R. The pdq4 is used in the line drawing by
plotlmrdia46.

pwrexp

\tau_4 and \tau_6 of the Power Exponential distribution of which the Asymmetric Exponential Power distribution (see also lmomaep4). The lookup table archive in the lmomco package for the Power Exponential (PowerExponential.txt) is confirmed to match the computation in aep4 based on the AEP4 instead. The table stems from inst/doc/
SysDataBuilder02.R.

st2

\tau_4 and \tau_6 of the well-known Student t distribution. The lookup table archive in the lmomco package for the Student t (StudentT.txt) is confirmed to match the computation in st3 based on the ST3 instead. The table stems from
inst/doc/SysDataBuilder02.R. The st3 and not st2 is used in the line drawing by plotlmrdia46.

st3

\tau_4 and \tau_6 of the Student 3t distribution (lmomst3). The table stems from
inst/doc/SysDataBuilder02.R. The st3 and not st2 is used in the line drawing by plotlmrdia46.

symstable

\tau_4 and \tau_6 of the Stable distribution, which is not otherwise supported in lmomco. The lookup table archive in the lmomco package for the Symmetrical Stable distribution is StableDistribution.txt. The table stems from
inst/doc/SysDataBuilder02.R. The symstable is used in the line drawing by plotlmrdia46.

tukeylam

(reference copy of gld_byt6tukeylam) \tau_4 and \tau_6 of the Tukey Lambda distribution (https://en.wikipedia.org/wiki/Tukey_lambda_distribution) that is not supported per se in lmomco because the Generalized Lambda distribution is instead. The SymTukeyLambda.txt is the lookup table archive in the lmomco package for the Tukey Lambda distribution confirmed to match the mathematics shown herein. The measure L-scale or the second L-moment is not constant for the Symmetric Tukey Lambda as formulated. So, the trajectory of this distribution is not for a constant L-scale, which is unlike that for the Generalized Lambda. The table stems from inst/doc/SysDataBuilder02.R. The tukeylam is used in the line drawing by plotlmrdia46.

cau

\tau^{(1)}_4 = 0.34280842 and \tau^{(1)}_6 = 0.20274358 (trim=1 TL-moments) of the Cauchy distribution (TL-moment [trim=1]) (see Examples lmomcau for source).

sla

\tau^{(1)}_4 = 0.30420472 and \tau^{(1)}_6 = 0.18900723 (trim=1 TL-moments) of the Slash distribution (TL-moment [trim=1]) (see Examples lmomsla for source).

Author(s)

W.H. Asquith

See Also

plotlmrdia46, lmrdia

Examples

lratios <- lmrdia46()

wasquith/lmomco documentation built on Nov. 13, 2024, 4:53 p.m.