Data & AI Literacy Month
Hear from leaders powering AI transformation

lmomco (version 0.92)

TLmom: A Sample Trimmed L-moment

Description

A sample trimmed L-moment (TL-moment) is computed for a vector. The $r \ge 1$ order of the L-moment is specified as well as the level of symmetrical trimming. A trimmed TL-moment is

λ^r(t)=1ri=t+1nt[k=0r1(1)k(r1k)(i1r+t1k)(nit+k)(nr+2t)]xi:n,

where $t$ represents the trimming level of the $t$-largest or $t$-smallest values, $r$ represents the order of the L-moments, $n$ represents the sample size, and $x_{i:n}$ represents the $i$th sample order statistic ($x_{1:n} \le x_{2:n} \le \dots \le x_{n:n}$).

Usage

TLmom(x,order,trim=NULL,leftrim=NULL,rightrim=NULL,sortdata)

Arguments

x
A vector of data values.
order
L-moment order to use in the computations. Default is 1 (the mean).
trim
Level of symmetrical trimming to use in the computations. Although NULL in the argument list, the default is 0---the usual L-moment is returned.
leftrim
Level of trimming of the left-tail of the sample.
rightrim
Level of trimming of the right-tail of the sample.
sortdata
A logical switch on whether the data should be sorted. The default is TRUE.

Value

  • An R list is returned.
  • lambdaThe TL-moment of order=order and trimming=trim.
  • orderL-moment order computed. Default is 1 (the mean).
  • trimLevel of symmetrical trimming used in the computation, which will equal NULL if asymmetrical trimming was used.
  • leftrimLevel of left-tail trimming used in the computation.
  • rightrimLevel of right-tail trimming used in the computation.

References

Elamir, E.A.H., and Seheult, A.H., 2003, Trimmed L-moments: Computational statistics and data analysis, vol. 43, pp. 299-314.

See Also

TLmoms

Examples

Run this code
X1 <- rcauchy(30)
TL <- TLmom(X1,order=2,trim=1)

Run the code above in your browser using DataLab