plot.uvevd {evd} | R Documentation |
Plot Diagnostics for a Univariate EVD Object
Description
Four plots (selectable by which
) are currently provided:
a P-P plot, a Q-Q plot, a density plot and a return level plot.
Usage
## S3 method for class 'uvevd'
plot(x, which = 1:4, main, ask = nb.fig <
length(which) && dev.interactive(), ci = TRUE, cilwd = 1,
a = 0, adjust = 1, jitter = FALSE, nplty = 2, ...)
## S3 method for class 'gumbelx'
plot(x, interval, which = 1:4, main, ask = nb.fig <
length(which) && dev.interactive(), ci = TRUE, cilwd = 1,
a = 0, adjust = 1, jitter = FALSE, nplty = 2, ...)
Arguments
x |
An object that inherits from class |
which |
If a subset of the plots is required, specify a
subset of the numbers |
main |
Title of each plot. If given, must be a character
vector with the same length as |
ask |
Logical; if |
ci |
Logical; if |
cilwd |
Line width for confidence interval lines. |
a |
Passed through to |
adjust , jitter , nplty |
Arguments to the density plot.
The density of the fitted model is plotted with a rug plot and
(optionally) a non-parameteric estimate. The argument
|
interval |
A vector of length two, for the gumbelx (maximum of two Gumbels) model. This is passed to the uniroot function to calculate quantiles for the Q-Q and return level plots. The interval should be large enough to contain all plotted quantiles or an error from uniroot will occur. |
... |
Other parameters to be passed through to plotting functions. |
Details
The following discussion assumes that the fitted model is stationary. For non-stationary generalized extreme value models the data are transformed to stationarity. The plot then corresponds to the distribution obtained when all covariates are zero.
The P-P plot consists of the points
where is the empirical distribution function
(defined using
ppoints
), G is the model based
estimate of the distribution (generalized extreme value
or generalized Pareto), and are the data
used in the fitted model, sorted into ascending order.
The Q-Q plot consists of the points
where is the model based estimate of the quantile
function (generalized extreme value or generalized Pareto),
are plotting points defined by
ppoints
, and are the data
used in the fitted model, sorted into ascending order.
The return level plot for generalized extreme value models is defined as follows.
Let be the generalized extreme value distribution
function, with location, scale and shape parameters
,
and
respectively.
Let
be defined by
.
In common terminology,
is the return level
associated with the return period
.
Let .
It follows that
When ,
is defined by continuity, so that
The curve within the return level plot is plotted
against
on a logarithmic scale, using maximum likelihood
estimates of
. If the estimate of
is zero, the
curve will be linear.
For large values of
,
is approximately equal
to the return period
. It is usual practice to label the
x-axis as the return period.
The points on the plot are
where are plotting points defined by
ppoints
, and are the data
used in the fitted model, sorted into ascending order.
For a good fit the points should lie “close” to the curve.
The return level plot for peaks over threshold models is defined as follows.
Let be the generalized Pareto distribution function,
with location, scale and shape parameters
,
and
respectively, where
is the model threshold.
Let
denote the
period return level
(see
fpot
and the notation therein).
It follows that
When ,
is defined by continuity, so that
The curve within the return level plot is plotted
against
on a logarithmic scale, using maximum likelihood
estimates of
. If the estimate of
is zero,
the curve will be linear.
The points on the plot are
where are plotting points defined by
ppoints
, and are the data
used in the fitted model, sorted into ascending order.
For a good fit the points should lie “close” to the curve.
See Also
plot.bvevd
, density
,
jitter
, rug
, ppoints
Examples
uvdata <- rgev(100, loc = 0.13, scale = 1.1, shape = 0.2)
M1 <- fgev(uvdata)
## Not run: par(mfrow = c(2,2))
## Not run: plot(M1)
uvdata <- rgpd(100, loc = 0, scale = 1.1, shape = 0.2)
M1 <- fpot(uvdata, 1)
## Not run: par(mfrow = c(2,2))
## Not run: plot(M1)