L-moment Ratio Diagram Components of Tau4 and Tau6
Description
This function returns a list of the L-kurtosis (τ4 and sixth L-moment ratio τ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 τ4nor=30/π×atan(2)−9=0.1226017 and τ6nor=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)=λ1[Fλ−(1−F)λ]\mbox,
for nonexceedance probability F and λ=0 and
Q(F)=log(1−FF)\mbox,
for λ=0 using the natural logarithm.
Inspection of the distribution formulae inform us that the variation in the distribution, the scaling factor 1/λ to far left in the first definition, for instance, implies that the L-scale (λ2) is not constant and varies with λ. The second L-moment of the Tukey Lambda (all odd order L-moments are zero) is
τ4=λ4/λ2 and τ6=λ6/λ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 Rlist is returned.
aep4
τ4 and τ6 of the 4-parameter Asymmetric Exponential Power (AEP4) distribution given L-skew set as τ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
τ4 and τ6 of the Generalized Lambda (GLD) distribution given L-skew set as τ3=0 and optimized by pargld with pargld(..., aux="tau5") with τ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 (λ2); this is different than the structurally similar by not identical Tukey Lambda distribution.
gld_byt6tukeylam
τ4 and τ6 of the Generalized Lambda distribution given L-skew set as τ3=0 and optimized by pargld with pargld(..., aux="tau6") with τ6(τ4) (τ6 as a function of τ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 {τ4,τ6} is that of the Tukey Lambda distribution; this is the trajectory of the symmetrical GLD having nonconstant L-scale (λ2).
nor
τ4 and τ6 of the Normal distribution. The table stems from inst/doc/ SysDataBuilder02.R. The nor is used in the point drawing by plotlmrdia46.
pdq4
τ4 and τ6 of the Polynomial Density-Quantile4 distribution, which implicitly is symmetrical, and therefore L-skew set as τ3=0. The table stems from inst/doc/SysDataBuilder02.R. The pdq4 is used in the line drawing by plotlmrdia46.
pwrexp
τ4 and τ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
τ4 and τ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
τ4 and τ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
τ4 and τ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) τ4 and τ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
τ4(1)=0.34280842 and τ6(1)=0.20274358 (trim=1 TL-moments) of the Cauchy distribution (TL-moment [trim=1]) (see Exampleslmomcau for source).
sla
τ4(1)=0.30420472 and τ6(1)=0.18900723 (trim=1 TL-moments) of the Slash distribution (TL-moment [trim=1]) (see Exampleslmomsla for source).