rfaplot: Regional Frequency Analysis

View source: R/5extreme.R

rfaplotR Documentation

Regional Frequency Analysis

Description

This function uses J.R.M. Hosking's package lmom to produce a L-moment diagram.

Usage

rfaplot(lflist, n = 7, ...)

Arguments

lflist

A list of 'lfobj's.

n

MAM-n is used (e.g. n=7 means MAM7).

...

Arguments passed on to lmom::lmrd

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:

GLO generalized logistic
GEV generalized extreme-value
GPA generalized Pareto
GNO generalized normal
PE3 Pearson type III
WAK.LB lower bound of L-kurtosis for given L-skewness,
for the Wakeby distribution.
ALL.LB lower bound of L-kurtosis for given L-skewness,
for all distributions.

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:

E or EXP exponential
G or GUM Gumbel
L or LOG logistic
N or NOR normal
U or UNI uniform

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 argument distributions. 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 argument distributions, as follows:

GLO blue, solid line
GEV green, solid line
GPA red, solid line
GNO black, solid line
PE3 cyan, solid line
WAK.LB red, dashed line
ALL.LB black, dashed line

The green and cyan colors are less bright than the standard "green" and "cyan"; they are defined to be "#00C000" and "#00E0E0", respectively.

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. Either logical, indicating whether a legend is to be drawn, or a list specifying arguments to the legend function. Default arguments include bty="n", which must be overridden if a legend box is to be drawn; other arguments set by default are x, y, legend, col, lty, and lwd.

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.

Value

A list, returned invisibly, describing what was plotted. Useful for customization of the legend, as in one of the examples below. List elements:

lines

List containing elements describing the plotted distribution curves (if any). Each element is a vector with the same length as distributions. List elements distributions, col.lines, lty, lwd.

twopar

Character vector containing the 1-character symbols for the two-parameter distributions that were plotted.

points

List containing elements describing the plot (if any) of the data points. List elements col.pts, pch, cex.

If any of the above items was not plotted, the corresponding list element is NULL.

References

Gustard, A. & Demuth, S. (2009) (Eds) Manual on Low-flow Estimation and Prediction. Operational Hydrology Report No. 50, WNO-No. 1029, 136p. https://library.wmo.int/doc_num.php?explnum_id=7699

See Also

lmrd and lmom-package which this function wraps.

Examples

data(ngaruroro)
# Toy example to get some more "rivers"
seventies <- subset(ngaruroro, hyear %in% 1970:1979)
eighties <- subset(ngaruroro, hyear %in% 1980:1989)
nineties <- subset(ngaruroro, hyear %in% 1990:1999)

rfaplot(list(seventies, eighties, nineties), n = 3)

lfstat documentation built on Nov. 10, 2022, 5:42 p.m.