Compute the theoretrical trimmed L-moments (TL-moments) for a vector. The level of symmetrical or asymmetrical trimming is specified. A theoretrical TL-moment in integral form is
$$ \lambda^{(t_1,t_2)}_r = \underbrace{\frac{1}{r}}_{\stackrel{\mbox{average}}{\mbox{of terms}}} \sum^{r-1}_{k=0} \overbrace{(-1)^k}^{\mbox{differences}} \underbrace{ r-1 \choose k }_{\mbox{combinations}} \frac{\overbrace{(r+t_1+t_2)!}^{\mbox{sample size}}\: I^{(t_1,t_2)}_r} {\underbrace{(r+t_1-k-1)!}_{\mbox{left tail}} \underbrace{(t_2+k)!}_{\mbox{right tail}}} \mbox{, in which }$$
$$ I^{(t_1,t_2)}_r = \int^1_0 \underbrace{x(F)}_{\stackrel{\mbox{quantile}}{\mbox{function}}} \times \overbrace{F^{r+t_1-k-1}}^{\mbox{left tail}} \overbrace{(1-F)^{t_2+k}}^{\mbox{right tail}} \,\mathrm{d}F \mbox{,}$$
where \(x(F)\) is the quantile function of the random variable \(X\) for nonexceedance probability \(F\), \(t_1\) represents the trimming level of the \(t_1\)-smallest, \(t_2\) represents the trimming level of the \(t_2\)-largest values, \(r\) represents the order of the L-moments. This function loops across the above equation for each nmom
set in the argument list. The function \(x(F)\) is computed through the par2qua
function. The distribution type is determined using the type
attribute of the para
argument---the parameter object.
As of version 1.5.2 of lmomco, there exists enhanced error trapping on integration failures in
theoTLmoms
. The function now abandons operations should any of the integrations for the \(r\)th L-moment fail for reasons such as divergent integral or round off problems. The function returns NAs for all L-moments in lambdas
and ratios
.
theoTLmoms(para, nmom=5, trim=NULL, leftrim=NULL,
rightrim=NULL, verbose=FALSE, minF=0, maxF=1, quafunc=NULL)
An R
list
is returned.
Vector of the TL-moments. First element is \(\lambda^{(t_1,t_2)}_1\), second element is \(\lambda^{(t_1,t_2)}_2\), and so on.
Vector of the L-moment ratios. Second element is \(\tau^{(t_1,t_2)}\), third element is \(\tau^{(t_1,t_2)}_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: “theoTLmoms”.
A distribution parameter object of this package such as by vec2par
.
The number of moments to compute. Default is 5.
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.
Level of trimming of the left-tail of the sample.
Level of trimming of the right-tail of the sample.
Toggle verbose output. Because the R function integrate
is used to perform the numerical integration, it might be useful to see selected messages regarding the numerical integration.
The end point of nonexceedance probability in which to perform the integration. Try setting to non-zero (but small) if you have a divergent integral.
The end point of nonexceedance probability in which to perform the integration. Try setting to non-unity (but close) if you have a divergent integral.
An optional and arbitrary quantile function that simply needs to except a nonexceedance probability and the parameter object in para
. This is a feature that permits computation of the L-moments of a quantile function that does not have to be implemented in the greater overhead hassles of the lmomco style. This feature might be useful for estimation of quantile function mixtures or those distributions not otherwise implemented in this package.
W.H. Asquith
Elamir, E.A.H., and Seheult, A.H., 2003, Trimmed L-moments: Computational Statistics and Data Analysis, v. 43, pp. 299--314.
theoLmoms
, TLmoms
, tlmr2par