Learn R Programming

lmomco (version 0.88)

TLmoms: The Sample Trimmed L-moments and L-moment Ratios

Description

Compute the sample trimmed L-moments (TL-moments) for a vector. The level of symmetrical trimming is specified. A TL-moment is

$$\hat{\lambda}^{(t_1,t_2)}_r = \frac{1}{r}\sum^{n-t_2}_{i=t_1+1} \left[ \frac{\sum\limits^{r-1}_{k=0}{ (-1)^k {r-1 \choose k} {i-1 \choose r+t_1-1-k} {n-i \choose t_2+k} }}{{n \choose r+t_1+t_2}} \right] x_{i:n} \mbox{,}$$

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}$). This function loops across the above equation for each nmom set in the argument list.

Usage

TLmoms(x,nmom,trim=NULL,leftrim=NULL,rightrim=NULL)

Arguments

x
A vector of data values.
nmom
The number of moments to compute. Default is 5.
trim
Level of symmetrical trimming to use in the computations, which will equal NULL if asymmetrical trimming was used. 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.

Value

  • An R list is returned.
  • lambdasVector of the TL-moments. First element is $\hat{\lambda}^{(t_1,t_2)}_1$, second element is $\hat{\lambda}^{(t_1,t_2)}_2$, and so on.
  • ratiosVector of the L-moment ratios. Second element is $\hat{\tau}^{(t_1,t_2)}$, third element is $\hat{\tau}^{(t_1,t_2)}_3$ and so on.
  • 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.
  • sourceAn attribute identifying the computational source of the L-moments: TLmoms.

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

TLmom, lmoms, and lmorph

Examples

Run this code
X1 <- rcauchy(30)
TL <- TLmoms(X1,nmom=6,trim=1)

Run the code above in your browser using DataLab