lmrd {lmom} | R Documentation |
Draws an L-moment ratio diagram.
lmrd(x, y, distributions = "GLO GEV GPA GNO PE3", twopar, xlim, ylim, pch=3, 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 the y argument is omitted, x can be a vector
of L-moment ratios, as returned for example by function samlmu .
In this case the third and fourth elements of x are taken to be
L-skewness and L-kurtosis respectively and are plotted. | ||||||||||||||||||
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 distributions are recognized:
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 distributions are recognized:
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. | ||||||||||||||||||
col |
Vector specifying the colors to be used for the lines on the plot.
For the default values, see the description of the lty argument 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 additional parameters (...
) are passed only to matplot
,
and cannot be used to change the color of plotted points. To do so,
follow lmrd
by an additional call to the points
function,
e.g. follow lmrd(t3, t4)
by points(t3, t4, col="red")
.
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(aa[3,], aa[4,], dist="", twopar="G")