lmrd {lmom} | R Documentation |
Draws an L-moment ratio diagram.
lmrd(x, y, distributions = "GLO GEV GPA GNO PE3", twopar, xlim, ylim, pch=3, cex, col, lty, lwd=1, legend.lmrd = TRUE, xlegend, ylegend, xlab = expression(italic(L) * "-skewness"), ylab = expression(italic(L) * "-kurtosis"), ...)
x |
Numeric vector of L-skewness values.
Alternatively, if argument y is omitted, x can be an object
that contains both L-skewness and L-kurtosis values.
It can be a vector with elements named
"t_3" and "t_4" (or "tau_3" and "tau_4" ),
a matrix or data frame with columns named
"t_3" and "t_4" (or "tau_3" and "tau_4" ),
or an object of class "regdata" (as defined in package lmomRFA).
| ||||||||||||||||||
y |
Numeric vector of L-kurtosis values. | ||||||||||||||||||
distributions |
Indicates the three-parameter distributions
whose L-skewness–L-kurtosis relations
are to be plotted as lines on the diagram.
The following distribution identifiers are recognized, in upper or lower case:
The argument should be either a character vector each of whose elements is one of the above abbreviations or a character string containing one or more of the abbreviations separated by blanks. The specified L-skewness–L-kurtosis curves will be plotted. If no three-parameter distributions are to be plotted, specify distributions to be FALSE or
the empty string, "" .
| ||||||||||||||||||
twopar |
Two-parameter distributions whose (L-skewness, L-kurtosis) values
are to be plotted as points on the diagram.
The following distribution identifiers are recognized, in upper or lower case:
The argument should be either a character vector each of whose elements is one of the above abbreviations or a character string containing one or more of the abbreviations separated by blanks. L-skewness–L-kurtosis points for the specified distributions will be plotted and given one-character labels. The default is to plot the two-parameter distributions that are special cases of the three-parameter distributions specified in the distributions parameter. Thus for example if
distributions="GPA PE3" , the default for twopar
is "EXP NOR UNI" : NOR is a special case of PE3, UNI of GPA,
EXP of both GPA and PE3.
If no two-parameter distributions are to be plotted, specify twopar to be FALSE or the empty string, "" .
| ||||||||||||||||||
xlim |
x axis limits.
Default: c(0, 0.6) , expanded if necessary to cover the range of the data. | ||||||||||||||||||
ylim |
y axis limits.
Default: c(0, 0.4) , expanded if necessary to cover the range of the data. | ||||||||||||||||||
pch |
Plotting character to be used for the plotted (L-skewness, L-kurtosis) points. | ||||||||||||||||||
cex |
Symbol size for plotted points, like graphics parameter cex . | ||||||||||||||||||
col |
Vector specifying the colors. If it is of length 1
and x is present, it will be used for the plotted points.
Otherwise it will be used for the lines on the plot.
For the default colors for the lines, see the description
of argument lty below. | ||||||||||||||||||
lty |
Vector specifying the line types to be used for the lines on the plot.
By default, colors and line types are matched to the distributions given in the distributions parameter, as follows:
| ||||||||||||||||||
lwd |
Vector specifying the line widths to be used for the lines on the plot. | ||||||||||||||||||
legend.lmrd |
Controls whether a legend,
identifying the L-skewness–L-kurtosis
relations of the three-parameter distributions, is plotted.
Not used if distributions=FALSE . | ||||||||||||||||||
xlegend |
x coordinate of the upper left corner of the legend.
Default: the minimum x value.
Not used if distributions=FALSE or legend.lmrd=FALSE . | ||||||||||||||||||
ylegend |
y coordinate of the upper left corner of the legend.
Default: the maximum y value.
Not used if distributions=FALSE or legend.lmrd=FALSE . | ||||||||||||||||||
xlab |
X axis label. | ||||||||||||||||||
ylab |
Y axis label. | ||||||||||||||||||
... |
Additional arguments are passed to the matplot function
that draws the axis box and the lines for three-parameter distributions. |
lmrd
calls a sequence of graphics functions:
matplot
for the axis box and the curves for three-parameter distributions;
points
for the points for two-parameter distributions and
text
for their labels; legend
for the legend; and
points
for the (x,y) data points.
Note that the only graphics parameters passed to points
are col
(if of length 1), cex
, and pch
.
If more complex features are required, such as different colors for
different points, follow lmrd
by an additional call to points
,
e.g. follow lmrd(t3, t4)
by points(t3, t4, col=c("red", "green"))
.
J. R. M. Hosking hosking@watson.ibm.com
data(airquality) lmrd(samlmu(airquality$Ozone)) # Tweaking a few graphics parameters makes the graph look better # (in the author's opinion) lmrd(samlmu(airquality$Ozone), xaxs="i", yaxs="i", las=1) # An example that illustrates the sampling variability of L-moments # # Generate 50 random samples of size 30 from the Gumbel distribution # - stored in the rows of matrix mm mm <- matrix(quagum(runif(1500)), nrow=50) # # Compute the first four sample L-moments of each sample # - stored in the rows of matrix aa aa <- apply(mm, 1, samlmu) # # Plot the L-skewness and L-kurtosis values on an L-moment ratio # diagram that also shows (only) the population L-moment ratios # of the Gumbel distribution lmrd(t(aa), dist="", twopar="G", col="red")