plotlmrdia | R Documentation |
Plot the Tau3-Tau4 L-moment ratio diagram of L-skew and L-kurtosis from a Tau3-Tau4 L-moment ratio diagram object returned by lmrdia
. This diagram is useful for selecting a distribution to model the data. The application of L-moment diagrams is well documented in the literature. This function is intended to function as a demonstration of L-moment ratio diagram plotting with enough user settings for many practical applications.
plotlmrdia(lmr=NULL, nopoints=FALSE, nolines=FALSE, nolimits=FALSE,
noaep4=FALSE, nogev=FALSE, noglo=FALSE, nogno=FALSE, nogov=FALSE,
nogpa=FALSE, nope3=FALSE, nopdq3=FALSE, nowei=TRUE,
nocau=TRUE, noexp=FALSE, nonor=FALSE, nogum=FALSE,
noray=FALSE, nosla=TRUE, nouni=FALSE,
xlab="L-skew (Tau3), dimensionless",
ylab="L-kurtosis (Tau4), dimensionless", add=FALSE, empty=FALSE,
autolegend=FALSE, xleg=NULL, yleg=NULL, legendcex=0.9,
ncol=1, text.width=NULL, lwd.cex=1, expand.names=FALSE, ...)
lmr |
L-moment diagram object from |
nopoints |
If |
nolines |
If |
nolimits |
If |
noaep4 |
If |
nogev |
If |
noglo |
If |
nogno |
If |
nogov |
If |
nogpa |
If |
nope3 |
If |
nopdq3 |
If |
nowei |
If |
nocau |
If |
noexp |
If |
nonor |
If |
nogum |
If |
noray |
If |
nouni |
If |
nosla |
If |
xlab |
Horizonal axis label passed to |
ylab |
Vertical axis label passed to |
add |
A logical to toggle a call to |
empty |
A logical to return before any trajectories are plotted but after the condition of the |
autolegend |
Generate the legend by built-in algorithm. |
xleg |
X-coordinate of the legend. This argument is checked for being a character versus a numeric. If it is a character, then |
yleg |
Y-coordinate of the legend. |
legendcex |
The |
ncol |
The number of columns in which to set the legend items (default is 1, which differs from |
text.width |
Argument of the same name for |
lwd.cex |
Expansion factor on the line widths. |
expand.names |
Expand the distribution names in the legend. |
... |
Additional arguments passed into |
This function provides hardwired calls to lines
and points
to produce the diagram. The plot symbology for the shown distributions is summarized here. The Asymmetric Exponential Power and Kappa (four parameter) and Wakeby (five parameter) distributions are not well represented on the diagram as each constitute an area (Kappa) or hyperplane (Wakeby) and not a line (3-parameter distributions) or a point (2-parameter distributions). However, the Kappa demarks the area bounded by the Generalized Logistic (glo
) on the top and the
theoretical L-moment limits on the bottom. The Asymmetric Exponential Power demarks its own unique lower boundary and extends up in the \tau_4
direction to \tau_4 = 1
. However, parameter estimation with L-moments has lost considerable accuracy for \tau_4
that large (see Asquith, 2014).
GRAPHIC TYPE | GRAPHIC NATURE |
L-moment Limits | line width 2 and color a medium-dark grey |
Asymmetric Exponential Power (4-p) | line width 1, line type 4 (dot), and color red |
Generalized Extreme Value (GEV) | line width 1, line type 1 (solid), and color darkred |
Generalized Logistic | line width 1 and color green |
Generalized Normal | line width 1, line type 2 (dash), and color blue |
Govindarajulu | line width 1, line type 2 (dash), and color 6 (magenta) |
Generalized Pareto | line width 1, line type 1 (solid), and color blue |
Pearson Type III | line width 1, line type 1 (solid), and color 6 (purple) |
Polynomial Density-Quantile3 | line width 1.3, line type 2 (dash), and color darkgreen |
Weibull (reversed GEV) | line width 1, line type 1 (solid), and color darkorange |
Exponential | symbol 16 (filled circle) and color red |
Normal | symbol 15 (filled square) and color red |
Gumbel | symbol 17 (filled triangle) and color red) |
Rayleigh | symbol 18 (filled diamond) and color red |
Uniform | symbol 12 (square and a plus sign) and color red |
Cauchy | symbol 13 (circle with over lapping \times ) and color turquoise4 |
Slash | symbol 10 (cicle containing + ) and color turquoise4 |
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.
Asquith, W.H., 2014, Parameter estimation for the 4-parameter asymmetric exponential power distribution by the method of L-moments using R: Computational Statistics and Data Analysis, v. 71, pp. 955–970.
Hosking, J.R.M., 1986, The theory of probability weighted moments: Research Report RC12210, IBM Research Division, Yorkton Heights, N.Y.
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.
Hosking, J.R.M., and Wallis, J.R., 1997, Regional frequency analysis–An approach based on L-moments: Cambridge University Press.
Vogel, R.M., and Fennessey, N.M., 1993, L moment diagrams should replace product moment diagrams: Water Resources Research, v. 29, no. 6, pp. 1745–1752.
lmrdia
, plotlmrdia46
, plotradarlmr
plotlmrdia(lmrdia()) # simplest of all uses
## Not run:
# A more complex example follows: for a given mean, L-scale, L-skew, and L-kurtosis,
# use sample size of 30, use 500 simulations, set L-moments, fit the Kappa distribution
T3 <- 0.34; T4 <- 0.21; n <- 30; nsim <- 500
lmr <- vec2lmom(c(10000, 7500, T3, T4)); kap <- parkap(lmr)
# create vectors for storing simulated L-skew (t3) and L-kurtosis (t4)
t3 <- t4 <- vector(mode="numeric")
# perform nsim simulations by randomly drawing from the Kappa distribution
# and compute the L-moments in sim.lmr and store the t3 and t4 of each sample
for(i in 1:nsim) {
sim.lmr <- lmoms(rlmomco(n, kap))
t3[i] <- sim.lmr$ratios[3]; t4[i] <- sim.lmr$ratios[4]
}
# plot the diagram and "zoom" by manually setting the axis limits
plotlmrdia(xlim=c(-0.1, 0.5), ylim=c(-0.1, 0.4), las=1, empty=TRUE)
# Follow up by plotting the {t3, t4} values and the mean of the values
points(t3, t4, pch=21, bg="white", lwd=0.8) # plot each simulation
# plot crossing dashed lines at true values of L-skew and L-kurtosis
abline(v=T3, col="salmon4", lty=2, lwd=3) # Theoretical values for the
abline(h=T4, col="salmon4", lty=2, lwd=3) # distribution as fit
points(mean(t3), mean(t4), pch=16, cex=3) # mean of simulations and
# should plot reasonably close to the salmon4-colored crossing lines
# plot the trajectories of the distributions
plotlmrdia(lmrdia(), add=TRUE, nopoints=TRUE, inset=0.01,
autolegend=TRUE, xleg="topleft", lwd.cex=1.5) #
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.