Learn R Programming

lmom (version 3.2)

evplot: Extreme-value plot

Description

evplot draws an “extreme-value plot”, i.e. a quantile-quantile plot in which the horizontal axis is the quantile of an extreme-value type I (Gumbel) distribution.

evdistp adds the cumulative distribution function of a distribution to an extreme-value plot.

evdistq adds the quantile function of a distribution to an extreme-value plot.

evpoints adds a set of data points to an extreme-value plot.

Usage

evplot(y, ...)

# S3 method for default evplot(y, qfunc, para, npoints = 101, plim, xlim = c(-2, 5), ylim, type, xlab = expression("Reduced variate, " * -log(-log(italic(F)))), ylab = "Quantile", rp.axis = TRUE, ...)

evdistp(pfunc, para, npoints = 101, ...) evdistq(qfunc, para, npoints = 101, ...)

evpoints(y, ...)

Arguments

y

Numeric vector. The data values in the vector are plotted on the extreme-value plot.

qfunc

A quantile function. The function is drawn as a curve on the extreme-value plot.

pfunc

A cumulative distribution function. The function is drawn as a curve on the extreme-value plot.

para

Distribution parameters for the quantile function qfunc or cumulative distribution function pfunc.

If pfunc or qfunc is the standard R form of quantile function, para should be a list.

If pfunc or qfunc is the qua... form of quantile function used throughout the lmom package, para should be a numeric vector.

In evplot, para is not used if qfunc is omitted.

npoints

Number of points to use in drawing the quantile function. The points are equally spaced along the x axis. Not used if qfunc is omitted.

plim

X axis limits, specified as probabilities.

xlim

X axis limits, specified as values of the Gumbel reduced variate \(-\log(-\log F)\), where \(F\) is the nonexceedance probability. Not used if plim is specified.

ylim

Y axis limits.

type

Plot type. Determines how the data values in y are plotted. Interpreted in the same way as argument type of function plot, i.e. "p" for points, "b" for points connected by lines, etc.

xlab

X axis label.

ylab

Y axis label.

rp.axis

Logical. Whether to draw the “Return period” axis, a secondary horizontal axis.

...

Additional arguments are passed to the plotting routine.

Arguments of cumulative distribution functions and quantile functions

pfunc and qfunc can be either the standard R form of cumulative distribution function or quantile function (i.e. for a distribution with \(r\) parameters, the first argument is the variate \(x\) or the probability \(p\) and the next \(r\) arguments are the parameters of the distribution) or the cdf... or qua... forms used throughout the lmom package (i.e. the first argument is the variate \(x\) or probability \(p\) and the second argument is a vector containing the parameter values).

Author

J. R. M. Hosking jrmhosking@gmail.com

Examples

Run this code
# Extreme-value plot of Ozone from the airquality data
data(airquality)
evplot(airquality$Ozone)

# Fit a GEV distribution and add it to the plot
evdistq(quagev, pelgev(samlmu(airquality$Ozone)))

# Not too good -- try a kappa distribution instead
evdistq(quakap, pelkap(samlmu(airquality$Ozone)), col="red")

Run the code above in your browser using DataLab