evplot.rfd {lmomRFA} | R Documentation |
Extreme-value plot of a regional frequency distribution
Description
Plots a regional frequency distribution, optionally with error bounds for either the regional growth curve or the quantile function for an individual site.
The graph is an “extreme-value plot”, i.e. the horizontal axis is the quantile of an extreme-value type I (Gumbel) distribution, and the quantile function of that distribution would plot as a straight line.
Usage
## S3 method for class 'rfd'
evplot(y, ybounds, npoints=101, add=FALSE, plim,
xlim=c(-2,5), ylim,
xlab=expression("Reduced variate, " * -log(-log(italic(F)))),
ylab="Quantile", rp.axis=TRUE, type="l", lty=c(1,2), col=c(1,1),
...)
Arguments
y |
Object of class |
ybounds |
Optional. Object of class |
npoints |
Number of points to use in drawing the quantile function. The points are equally spaced along the x axis. |
add |
Logical: if |
plim |
X axis limits, specified as probabilities. |
xlim |
X axis limits, specified as values of the Gumbel reduced variate
|
ylim |
Y axis limits. |
xlab |
X axis label. |
ylab |
Y axis label. |
rp.axis |
Logical: whether to draw the “Return period” axis, a secondary horizontal axis. |
type |
Vector of plot types. The first element is for the quantile
function; subsequent elements are for the error bounds,
and will be used cyclically until all lines are drawn.
Interpreted in the same way as the |
lty |
Vector of line types. The first element is for the quantile function; subsequent elements are for the error bounds, and will be used cyclically until all lines are drawn. |
col |
Vector of colors. The first element is for the quantile function; subsequent elements are for the error bounds, and will be used cyclically until all lines are drawn. |
... |
Additional parameters are passed to the plotting routine. |
Details
If ybounds
is missing, a graph is drawn of the quantile function
(regional growth curve) of the distribution specified by y
.
If ybounds
is present, it may contain error bounds for either
a regional growth curve or the quantile function at a single site.
This regional growth curve or site quantile function is plotted
using arguments type[1]
, lty[1]
and col[1]
.
Then, in each case, error bounds are added to the plot.
The ybounds
object typically contains,
for several probabilities specified by ybounds$bounds
,
error bounds corresponding to that probability
for several quantiles.
For thej
th bound probability, the bounds for the various quantiles
will be joined by straight lines (so to obtain a smooth curve
there should be a lot of quantiles!), using graphics parameters
type[j+1]
, lty[j+1]
and col[j+1]
.
Author(s)
J. R. M. Hosking jrmhosking@gmail.com
See Also
regfit
, which creates objects of class "rfd"
;
regquantbounds
and sitequantbounds
,
which create objects of class "rfdbounds"
;
evdistp
, evdistq
, and evpoints
,
all in package lmom, for adding further curves and points
to the plot.
Examples
Cascades # An object of class "regdata"
rfit <- regfit(Cascades, "gno") # Fit a generalized normal distribution
evplot(rfit) # Plot the regional growth curve
# Compute error bounds for quantile estimates. We will
# (optimistically) generate bounds for a homogeneous region
# with the same frequency distribution as the one fitted to
# the Cascades data.
fval <- seq(.01, .99, by=.01) # A lot of quantiles
simq <- regsimq(rfit$qfunc, nrec=Cascades$n, nrep=100, f=fval,
fit=rfit$dist)
# Regional growth curve, and bounds
rbounds <- regquantbounds(simq, rfit)
evplot(rfit, rbounds)
# Quantile function for site 3, and bounds
sbounds <- sitequantbounds(simq, rfit, site=3)
evplot(rfit, sbounds)