Learn R Programming

lmomco (version 0.88)

vec2TLmom: Convert a Vector of TL-moments to a TL-moment Object

Description

This function converts a vector of trimmed L-moments (TL-moments) to a TL-moment object of this package. The object is an R list. This function is intended to facilitate the use of TL-moments that the user might have from other sources. The first five TL-moments are supported ($\lambda^{(t)}_1$, $\lambda^{(t)}_2$, $\lambda^{(t)}_3$, $\lambda_4$, $\lambda^{(t)}_5$, $\tau^{(t)}$, $\tau^{(t)}_3$, $\tau^{(t)}_4$, and $\tau^{(t)}_5$). Because in typical practice, the $k \ge 3$ order L-moments are dimensionless ratios ($\tau^{(t)}_3$, $\tau^{(t)}_4$, and $\tau^{(t)}_5$), this function computes $\lambda^{(t)}_3$, $\lambda^{(t)}_4$, $\lambda^{(t)}_5$ from $\lambda^{(t)}_2$ and the ratios. However, typical practice is not set on the use of $\lambda^{(t)}_2$ or $\tau^{(t)}$ as measure of dispersion. Therefore, this function takes an lscale optional logical (TRUE|FALSE) argument---if $\lambda^{(t)}_2$ is provided and lscale=TRUE, then $\tau$ is computed by the function and if $\tau$ is provided, then $\lambda^{(t)}_2$ is computed by the function. The trim level of the TL-moment is required.

Usage

vec2TLmom(vec,trim,lscale)

Arguments

vec
A vector of L-moment values in $\lambda^{(t)}_1$, $\lambda^{(t)}_2$ or $\tau^{(t)}$, $\tau^{(t)}_3$, $\tau^{(t)}_4$, and $\tau^{(t)}_5$ order.
trim
The trimming level of the TL-moments (can be zero for the ordinary L-moments.)
lscale
A logical switch on the type of the second value of first argument. L-scale ($\lambda_2$) or LCV ($\tau$). Default is TRUE, the second value in the first argument is $\lambda_2$.

Value

  • An R list is returned where $t$ represents the trim level.
  • lambdasVector of the TL-moments. First element is $\lambda^{(t)}_1$, second element is $\lambda^{(t)}_2$, and so on.
  • ratiosVector of the L-moment ratios. Second element is $\tau^{(t)}$, third element is $\tau^{(t)}_3$ and so on.
  • trimLevel of symmetrical trimming used in the computation. Default is 0---the usual L-moments are returned.
  • sourceAn attribute identifying the computational source of the L-moments: TLmoms.

See Also

lmom.ub, TLmoms, vec2lmom

Examples

Run this code
TL <- vec2TLmom(c(12,0.6,0.34,0.20,0.05),lscale=FALSE,trim=1)

Run the code above in your browser using DataLab