plotlmrdia {lmomco} | R Documentation |
Plot the L-moment ratio diagram of L-skew and L-kurtosis from an 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 diagram plotting. It is expected that users will “roll their own” version
of this function for their own specific purposes.
plotlmrdia(lmr, nopoints=FALSE, nolines=FALSE, nolimits=FALSE, nogev=FALSE, noglo=FALSE, nogpa=FALSE, nope3=FALSE, nogno=FALSE, noexp=FALSE, nonor=FALSE, nogum=FALSE, noray=FALSE, nouni=FALSE, xlab="L-SKEW", ylab="L-KURTOSIS", autolegend=FALSE, xleg=NULL, yleg=NULL, ...)
lmr |
L-moment diagram object from lmrdia . |
nopoints |
If TRUE then point distributions are not drawn. |
nolines |
If TRUE then line distributions are not drawn. |
nolimits |
If TRUE then theoretical limits of L-moments are not drawn. |
nogev |
If TRUE then line of Generalized Extreme Value distribution is not drawn. |
noglo |
If TRUE then line of Generalized Logistic distribution is not drawn. |
nogno |
If TRUE then line of Generalized Normal (log-Normal) distribution is not drawn. |
nogpa |
If TRUE then line of Generalized Pareto distribution is not drawn. |
nope3 |
If TRUE then line of Pearson Type III distribution is not drawn. |
noexp |
If TRUE then point of Exponential distribution is not drawn. |
nonor |
If TRUE then point of Normal distribution is not drawn. |
nogum |
If TRUE then point of Gumbel distribution is not drawn. |
noray |
If TRUE then point of Rayleigh distribution is not drawn. |
nouni |
If TRUE then point of Uniform distribution is not drawn. |
xlab |
Horizonal axis label passed to xlab of the plot function. |
ylab |
Vertical axis label passed to ylab of the plot function. |
autolegend |
Generate the legend by built-in algorithm. |
xleg |
X-coordinate of the legend. |
yleg |
Y-coordinate of the legend. |
... |
Additional arguments passed onto the plot function. |
This function provides hardwired calls to lines
and points
to
produce the diagram. The plot symbology for the shown distributions is summarized here.
The 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 (three-parameter distributions) or a point (two-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.
GRAPHIC TYPE | GRAPHIC NATURE |
L-moment Limits | line width 2 and color 8 (grey) |
Generalized Extreme Value | line width 1, line type 2 (dash), and color 2 (red) |
Generalized Logistic | line width 1 and color 3 (green) |
Generalized Normal | line width 1, line type 2 (dash), and color 4 (blue) |
Generalized Pareto | line width 1 and color 4 (blue) |
Pearson Type III | line width 1 and color 6 (purple) |
Exponential | symbol 16 (filled circle) and color 2 (red) |
Normal | symbol 15 (filled square) and color 2 (red) |
Gumbel | symbol 17 (filled triangle) and color 2 (red) |
Rayleigh | symbol 18 (filled diamond) and color 2 (red) |
Uniform | symbol 12 (square and a plus sign) and color 2 (red) |
W.H. Asquith
Asquith, W.H., 1998, Depth-duration frequency of precipitation for Texas: U.S. Geological Survey Water-Resources Investigations Report 98-4044, 107 p.
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, vol. 52, p. 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, vol. 29, no. 6, pp. 1745-1752.
plotlmrdia(lmrdia()) # A more complex example follows. # For a given mean, L-scale, L-skew and L-kurtosis, a sample size # of 30 and using 50 simulations, set the L-moments in lmr and fit # a Kappa distribution T3 <- 0.34; T4 <- 0.21; n <- 30; nsim <- 50; lmr <- vec2lmom(c(10000,7500,T3,T4)); kap <- parkap(lmr) # Next, create vectors for storage of simulated L-skew (t3) # and L-kurtosis (t4) t3 <- vector(mode = "numeric"); t4 <- t3; # Next, perform nsim simulations by randomly drawing from the Kappa # distribution and compute the L-moments in sim.lmr and store the # t3 and t4 values of each simulated sample. for(i in 1:nsim) { sim.lmr <- lmoms(rlmomco(n,kap)) t3[i] <- sim.lmr$ratios[3]; t4[i] <- sim.lmr$ratios[4] } # Finally, plot the diagram with a legend at a specified location, # and "zoom" into the diagram by setting the axis limits. plotlmrdia(lmrdia(), autolegend=TRUE, xleg=0.1, yleg=.41, xlim=c(-.1,.5), ylim=c(-.1,.4), nopoints=TRUE) # Follow up with plotting of the t3,t4 values and the mean of these. points(t3,t4) points(mean(t3),mean(t4),pch=16,cex=3) # A complete the example by plotting crossing dashed lines at the # population values of L-skew and L-kurtosis lines(c(T3,T3),c(-1,1),col=8, lty=2) lines(c(-1,1),c(T4,T4),col=8, lty=2)