lMoment(x, r = 1, method = "unbiased",
plot.pos.cons = c(a = 0.35, b = 0), na.rm = FALSE)
"unbiased"
(method based on the U-statistic; the default), or "plotting.position"
(method based on the plotting positimethod="plotting.position"
. The default value is
plot.pos.cons=c(a=0.35, b=0)
. If this vector has a names attributex
.
If na.rm=FALSE
(the default) and x
contains missing values,
then a missing value (NA
) is returned. If na.rm=TRUE
,pwMoment
for more information on
probability-weighted moments.
Estimating L-Moments
The two commonly used methods for estimating $L$-moments are the
method="unbiased"
)
Using the relationship between $L$-moments and probability-weighted moments
explained above, the unbiased estimator of the $r$'th $L$-moment is based on
unbiased estimators of probability-weighted moments and is given by:
$$l_r = (-1)^{r-1} \sum^{r-1}_{k=0} p^*_{r-1,k} a_k = \sum^{r-1}_{j=0} p^*_{r-1,j} b_j$$
where
$$a_k = \frac{1}{n} \sum^{n-k}_{i=1} x_{i:n} \frac{{n-i \choose k}}{{n-1 \choose k}}$$
$$b_j = \frac{1}{n} \sum^{n}_{i=j+1} x_{i:n} \frac{{i-1 \choose j}}{{n-1 \choose j}}$$
Plotting-Position Estimators (method="plotting.position"
)
Using the relationship between $L$-moments and probability-weighted moments
explained above, the plotting-position estimator of the $r$'th $L$-moment
is based on the plotting-position estimators of probability-weighted moments and
is given by:
$$\tilde{\lambda}_r = (-1)^{r-1} \sum^{r-1}_{k=0} p^*_{r-1,k} \tilde{\alpha}_k = \sum^{r-1}_{j=0} p^*_{r-1,j} \tilde{\beta}_j$$
where
$$\tilde{\alpha}_k = \frac{1}{n} \sum^n_{i=1} (1 - p_{i:n})^k x_{i:n}$$
$$\tilde{\beta}_j = \frac{1}{n} \sum^{n}_{i=1} p^j_{i:n} x_{i:n}$$
and
$$p_{i:n} = \hat{F}(x_{i:n})$$
denotes the plotting position of the $i$'th order statistic in the random
sample of size $n$, that is, a distribution-free estimate of the cdf of
$X$ evaluated at the $i$'th order statistic. Typically, plotting
positions have the form:
$$p_{i:n} = \frac{i-a}{n+b}$$
where $b > -a > -1$. For this form of plotting position, the
plotting-position estimators are asymptotically equivalent to their
unbiased estimator counterparts.
Estimating $L$-Moment Ratios
$L$-moment ratios are estimated by simply replacing the population
$L$-moments with the estimated $L$-moments. The estimated ratios
based on the unbiased estimators are given by:
$$t_r = \frac{l_r}{l_2}$$
and the estimated ratios based on the plotting-position estimators are given by:
$$\tilde{\tau}_r = \frac{\tilde{\lambda}_r}{\tilde{\lambda}_2}$$
In particular, the $L$-moment skew is estimated by:
$$t_3 = \frac{l_3}{l_2}$$
or
$$\tilde{\tau}_3 = \frac{\tilde{\lambda}_3}{\tilde{\lambda}_2}$$
and the $L$-moment kurtosis is estimated by:
$$t_4 = \frac{l_4}{l_2}$$
or
$$\tilde{\tau}_4 = \frac{\tilde{\lambda}_4}{\tilde{\lambda}_2}$$
Similarly, the $L$-moment coefficient of variation can be estimated using
the unbiased $L$-moment estimators:
$$l = \frac{l_2}{l_1}$$
or using the plotting-position L-moment estimators:
$$\tilde{\lambda} = \frac{\tilde{\lambda}_2}{\tilde{\lambda}_1}$$cv
, skewness
, kurtosis
,
pwMoment
.# Generate 20 observations from a generalized extreme value distribution
# with parameters location=10, scale=2, and shape=.25, then compute the
# first four L-moments.
# (Note: the call to set.seed simply allows you to reproduce this example.)
set.seed(250)
dat <- rgevd(20, location = 10, scale = 2, shape = 0.25)
lMoment(dat)
#[1] 10.59556
lMoment(dat, 2)
#[1] 1.0014
lMoment(dat, 3)
#[1] 0.1681165
lMoment(dat, 4)
#[1] 0.08732692
#----------
# Now compute some L-moments based on the plotting-position estimators:
lMoment(dat, method = "plotting.position")
#[1] 10.59556
lMoment(dat, 2, method = "plotting.position")
#[1] 1.110264
lMoment(dat, 3, method="plotting.position", plot.pos.cons = c(.325,1))
#[1] -0.4430792
#----------
# Clean up
#---------
rm(dat)
Run the code above in your browser using DataLab