Compute the theoretrical L-moments for a vector. A theoretrical L-moment in integral form is
$$ \lambda_r = \frac{1}{r}
\sum^{r-1}_{k=0}{(-1)^k {r-1 \choose k}
\frac{r!\:I_r}{(r-k-1)!\,k!}
} \mbox{,}$$
in which
$$ I_r = \int^1_0 x(F) \times F^{r-k-1}(1-F)^{k}\,\mathrm{d}F \mbox{,}$$
where \(x(F)\) is the quantile function of the random variable \(X\) for nonexceedance probability \(F\), and \(r\) represents the order of the L-moments. This function actually dispatches to theoTLmoms
with trim=0
argument.
theoLmoms(para, nmom=5, minF=0, maxF=1, quafunc=NULL,
nsim=50000, fold=5,
silent=TRUE, verbose=FALSE, ...)
An R
list
is returned.
Vector of the TL-moments. First element is \(\lambda_1\), second element is \(\lambda_2\), and so on.
Vector of the L-moment ratios. Second element is \(\tau_2\), third element is \(\tau_3\) and so on.
Level of symmetrical trimming used in the computation, which will equal zero (the ordinary L-moments) because this function dispatches to theoTLmoms
.
An attribute identifying the computational source of the L-moments: “theoLmoms”.
A distribution parameter object such as from vec2par
.
The number of moments to compute. Default is 5.
The end point of nonexceedance probability in which to perform the integration. Try setting to non-zero (but very small) if the integral is divergent.
The end point of nonexceedance probability in which to perform the integration. Try setting to non-unity (but still very close [perhaps 1 - minF
]) if the integral is divergent.
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.
Simulation size for Monte Carlo integration is such is internally deemed necessary (see silent
argument).
The number of fractions or number of folds of nsim
, which in other words, means that nsim
is divided by folds
and a loop creating folds
integrations of nsim/folds
is used from which the mean and mean absolute error of the integrand are computed. This is to try to recover similar output as integrate()
.
The argument of silent
for the try()
operation wrapped on integrate()
. If set true and the integral is probability divergent, Monte Carlo integration is triggered using nsim
and folds
. The user would have to set verbose=TRUE
to then acquire the returned table in integration_table
of the integration passes including those are or are not Monte Carlo.
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.
Additional arguments to pass.
W.H. Asquith
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.
theoTLmoms
para <- vec2par(c(0,1), type='nor') # standard normal
TL00 <- theoLmoms(para) # compute ordinary L-moments
Run the code above in your browser using DataLab