Compute the sample L-moments. The mathematical expression for sample L-moment computation is shown under TLmoms
. The formula jointly handles sample L-moment computation and sample TL-moment (Elamir and Seheult, 2003) computation. A description of the most common L-moments is provided under lmom.ub
.
lmoms(x, nmom=5, no.stop=FALSE, vecit=FALSE)
An R
list
is returned.
Vector of the L-moments. First element is \(\hat{\lambda}^{(0,0)}_1\), second element is \(\hat{\lambda}^{(0,0)}_2\), and so on.
Vector of the L-moment ratios. Second element is \(\hat{\tau}^{(0,0)}\), third element is \(\hat{\tau}^{(0,0)}_3\) and so on.
Level of symmetrical trimming used in the computation, which will equal NULL
if asymmetrical trimming was used.
Level of left-tail trimming used in the computation.
Level of right-tail trimming used in the computation.
An attribute identifying the computational source of the L-moments: “lmoms”.
A vector of data values.
The number of moments to compute. Default is 5.
A logical to return NULL
instead of issuing a stop()
if nmom
is greater than the sample size or if all the values are equal. This is a very late change (decade+) to the foundational function in the package. Auxiliary coding to above this function to avoid the internal stop()
became non-ignorable in large data mining exercises. It was a design mistake to have the stop()
and not a warning()
instead.
A logical to return the first two \(\lambda_i \in 1,2\) and then the \(\tau_i \in 3,\cdots\) where the length of the returned vector is controlled by the nmom
argument. This argument will store the trims (see TLmoms
) as NULL
used (see the Example that follows).
W.H. Asquith
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.
Elamir, E.A.H., and Seheult, A.H., 2003, Trimmed L-moments: Computational statistics and data analysis, vol. 43, pp. 299-314.
Hosking, J.R.M., 1990, L-moments---Analysis and estimation of distributions using linear combinations of order statistics: Journal of the Royal Statistical Society, Series B, v. 52, pp. 105--124.
lmom.ub
, TLmoms
, lmorph
, lmoms.bernstein
, vec2lmom
lmoms(rnorm(30),nmom=4)
vec2lmom(lmoms(rexp(30), nmom=3, vecit=TRUE)) # re-vector
Run the code above in your browser using DataLab