lmomtri {lmomco}R Documentation

L-moments of the Asymmetric Triangular Distribution

Description

This function estimates the L-moments of the Asymmetric Triangular distribution given the parameters (ν\nu, ω\omega, and ψ\psi) from partri. The first three L-moments in terms of the parameters are

λ1=(ν+ω+ψ)3\mbox,\lambda_1 = \frac{(\nu+\omega+\psi)}{3}\mbox{,}

λ2=115[(νω)2(ψν)1(ν+ω)+2ψ]\mbox,and\lambda_2 = \frac{1}{15}\biggl[\frac{(\nu-\omega)^2}{(\psi-\nu)^{\phantom{1}}} - (\nu+\omega) + 2\psi\biggr] \mbox{, and}

λ3=G+H1+H2+J\mbox,\lambda_3 = G + H_1 + H_2 + J \mbox{,}

where GG is dependent on the integral definining the L-moments in terms of the quantile function (Asquith, 2011, p. 92) with limits of integration of [0,P][0,P], H1H_1 and H2H_2 are dependent on the integral defining the L-moment in terms of the quantile function with limits of integration of [P,1][P,1], and JJ is dependent on the λ2\lambda_2 and λ1\lambda_1. Finally, the variables GG, H1H_1, H2H_2, and JJ are

G=27(ν+6ω)(ων)3(ψν)3\mbox,G = \frac{2}{7}\frac{(\nu+6\omega)(\omega-\nu)^3}{(\psi-\nu)^3}\mbox{,}

H1=127(ωψ)4(νψ)32ψ(νω)3(νψ)3+2ψ\mbox,H_1 = \frac{12}{7}\frac{(\omega-\psi)^4}{(\nu-\psi)^3} - 2\psi\frac{(\nu-\omega)^3}{(\nu-\psi)^3} + 2\psi\mbox{,}

H2=45(5ν6ω+ψ)(ωψ)2(νψ)2\mbox,andH_2 = \frac{4}{5}\frac{(5\nu-6\omega+\psi)(\omega-\psi)^2}{(\nu-\psi)^2}\mbox{, and}

J=115[3(νω)2(ψν)+7(ν+ω)+16ψ]\mbox.J = -\frac{1}{15}\biggl[\frac{3(\nu-\omega)^2}{(\psi-\nu)} + 7(\nu+\omega) + 16\psi\biggl]\mbox{.}

The higher L-moments are even more ponderous and simpler expressions for the L-moment ratios appear elusive. Bounds for τ3\tau_3 and τ4\tau_4 are τ30.14285710|\tau_3| \le 0.14285710 and 0.04757138<τ4<0.090136050.04757138 < \tau_4 < 0.09013605. An approximation for τ4\tau_4 is

τ4=0.090121801.777361τ3217.89864τ34+920.4924τ3637793.50τ38\mbox,\tau_4 = 0.09012180 - 1.777361\tau_3^2 - 17.89864\tau_3^4 + 920.4924\tau_3^6 - 37793.50\tau_3^8 \mbox{,}

where the residual standard error is <1.750×105{<}1.750\times 10^{-5} and the absolute value of the maximum residual is <9.338×105<9.338\times 10^{-5}. The L-moments of the Symmetrical Triangular distribution for τ3=0\tau_3 = 0 are considered by Nagaraja (2013) and therein for a symmetric triangular distribution having λ1=0.5\lambda_1 = 0.5 then λ4=0.0105\lambda_4 = 0.0105 and τ4=0.09\tau_4 = 0.09. These L-kurtosis values agree with results of this function that are based on the theoLmoms.max.ostat function. The 4th and 5th L-moments λ4\lambda_4 and λ5\lambda_5, respectively, are computed using expectations of order statistic maxima (expect.max.ostat) and are defined (Asquith, 2011, p. 95) as

λ4=5E[X4:4]10E[X3:3]+6E[X2:2]E[X1:1]\lambda_4 = 5\mathrm{E}[X_{4:4}] - 10\mathrm{E}[X_{3:3}] + 6\mathrm{E}[X_{2:2}] - \mathrm{E}[X_{1:1}]

and

λ5=14E[X5:5]35E[X4:4]+30E[X3:3]10E[X2:2]+E[X1:1]\mbox.\lambda_5 = 14\mathrm{E}[X_{5:5}] - 35\mathrm{E}[X_{4:4}] + 30\mathrm{E}[X_{3:3}] - 10\mathrm{E}[X_{2:2}] + \mathrm{E}[X_{1:1}]\mbox{.}

These expressions are solved using the expect.max.ostat function to compute the E[Xr:r]\mathrm{E}[X_{r:r}].

For the symmetrical case of ω=(ψ+ν)/2\omega = (\psi + \nu)/2, then

λ1=(ν+ψ)2\mbox and\lambda_1 = \frac{(\nu+\psi)}{2}\mbox{\ and}

λ2=760[ψν]\mbox,\lambda_2 = \frac{7}{60}\biggl[\psi - \nu\biggr]\mbox{,}

which might be useful for initial parameter estimation through

ψ=λ1+307λ2\mbox and\psi = \lambda_1 + \frac{30}{7}\lambda_2 \mbox{\ and}

ν=λ1307λ2\mbox.\nu = \lambda_1 - \frac{30}{7}\lambda_2 \mbox{.}

Usage

lmomtri(para, paracheck=TRUE, nmom=c("3", "5"))

Arguments

para

The parameters of the distribution.

paracheck

A logical controlling whether the parameters and checked for validity. Overriding of this check might help in numerical optimization of parameters for modes near either the minimum or maximum. The argument here makes code base within partri a little shorter.

nmom

The L-moments greater the r>3r > 3 require numerical integration using the expectations of the maxima order statistics of the fitted distribution. If this argument is set to "3" then executation of lmomtri is stopped at r=3r = 3 and the first three L-moments returned, otherwise the 4th and 5th L-moments are computed.

Value

An R list is returned.

lambdas

Vector of the L-moments. First element is λ1\lambda_1, second element is λ2\lambda_2, and so on.

ratios

Vector of the L-moment ratios. Second element is τ\tau, third element is τ3\tau_3 and so on.

trim

Level of symmetrical trimming used in the computation, which is 0.

leftrim

Level of left-tail trimming used in the computation, which is NULL.

rightrim

Level of right-tail trimming used in the computation, which is NULL.

E33err

A percent error between the expectation of the X3:3X_{3:3} order statistic by analytical expression versus a theoretical by numerical integration using the
expect.max.ostat function. This will be NA if nmom == "3".

source

An attribute identifying the computational source of the L-moments: “lmomtri”.

Note

The expression for τ4\tau_4 in terms of τ3\tau_3 is

  "tau4tri" <- function(t3) {
     t3[t3 < -0.14285710 | t3 >  0.14285710] <- NA
     b <- 0.09012180
     a <- c(0, -1.777361, 0, -17.89864, 0,  920.4924, 0, -37793.50)
     t4 <- b + a[2]*t3^2 + a[4]*t3^4 + a[6]*t3^6 + a[8]*t3^8
     return(t4)
  }

Author(s)

W.H. Asquith

References

Asquith, W.H., 2011, Distributional analysis with L-moment statistics using the R environment for statistical computing: Createspace Independent Publishing Platform, ISBN 978–146350841–8.

Nagaraja, H.N., 2013, Moments of order statistics and L-moments for the symmetric triangular distribution: Statistics and Probability Letters, v. 83, no. 10, pp. 2357–2363.

See Also

partri, cdftri, pdftri, quatri

Examples

lmr <- lmoms(c(46, 70, 59, 36, 71, 48, 46, 63, 35, 52))
lmr
lmomtri(partri(lmr), nmom="5")

par <- vec2par(c(-405, -390, -102), type="tri")
lmomtri(par, nmom="5")$lambdas
# -299           39.4495050    5.5670228    1.9317914    0.8007511
theoLmoms.max.ostat(para=par, qua=quatri, nmom=5)$lambdas
# -299.0000126   39.4494885    5.5670486    1.9318732    0.8002989
# The -299 is the correct by exact solution as are 39.4495050 and 5.5670228, the 4th and
# 5th L-moments diverge from theoLmoms.max.ostat() because the exact solutions and not
# numerical integration of the quantile function was used for E11, E22, and E33.
# So although E44 and E55 come from expect.max.ostat() within both lmomtri() and
# theoLmoms.max.ostat(), the Lambda4 and Lambda5 are not the same because the E11, E22,
# and E33 values are different.

## Not run: 
# At extreme limit of Tau3 for the triangular distribution, L-moment ratio diagram
# shows convergence to the trajectory of the Generalized Pareto distribution.
"tau4tri" <- function(t3) { t3[t3 < -0.14285710 | t3 >  0.14285710] <- NA
   b <- 0.09012180; a <- c(0, -1.777361, 0, -17.89864, 0,  920.4924, 0, -37793.50)
   t4 <- b + a[2]*t3^2 + a[4]*t3^4 + a[6]*t3^6 + a[8]*t3^8; return(t4)
}
F <- seq(0,1, by=0.001)
lmr  <- vec2lmom(c(10,9,0.142857, tau4tri(0.142857)))
parA <- partri(lmr); parB <- pargpa(lmr)
xA <- qlmomco(F,  parA); xB <- qlmomco(F, parB); x <- sort(unique(c(xA,xB)))
plot(x,  pdftri(x,parA), type="l", col=8, lwd=4) # Compare Asym. Tri. to 
lines(x, pdfgpa(x,parB),           col=2)        # Gen. Pareto

## End(Not run)

[Package lmomco version 2.5.1 Index]