Last chance! 50% off unlimited learning
Sale ends in
Estimate the
lMoment(x, r = 1, method = "unbiased",
plot.pos.cons = c(a = 0.35, b = 0), na.rm = FALSE)
numeric vector of observations.
positive integer specifying the order of the moment.
character string specifying what method to use to compute the
"unbiased"
(method based on the U-statistic; the default), or "plotting.position"
(method based on the plotting position formula). See the DETAILS section for
more information.
numeric vector of length 2 specifying the constants used in the formula for the
plotting positions when method="plotting.position"
. The default value is
plot.pos.cons=c(a=0.35, b=0)
. If this vector has a names attribute with
the value c("a","b")
or c("b","a")
, then the elements will be
matched by name in the formula for computing the plotting positions. Otherwise,
the first element is mapped to the name "a"
and the second element to the
name "b"
. See the DETAILS section for more information. This argument is
ignored if method="ubiased"
.
logical scalar indicating whether to remove missing values from x
.
If na.rm=FALSE
(the default) and x
contains missing values,
then a missing value (NA
) is returned. If na.rm=TRUE
, missing
values are removed from x
prior to computing the
A numeric scalar--the value of the
Definitions:
Hosking (1990) shows that the above equation can be rewritten as:
Hosking (1990) defines the
Relationship Between pwMoment
for more information on
probability-weighted moments.
Estimating L-Moments
The two commonly used methods for estimating
Unbiased Estimators (method="unbiased"
)
Using the relationship between
Plotting-Position Estimators (method="plotting.position"
)
Using the relationship between
Estimating
Fill, H.D., and J.R. Stedinger. (1995).
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 52(1), 105--124.
Hosking, J.R.M., and J.R. Wallis (1995). A Comparison of Unbiased and
Plotting-Position Estimators of
Vogel, R.M., and N.M. Fennessey. (1993).
# NOT RUN {
# 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