Search This Blog

Sunday, April 01, 2012

R: Plot Diagnostics for a GEV Object


plot.gev {evd}R Documentation

Plot Diagnostics for a GEV 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 'gev':
plot(x, which = 1:4, main = c("Probability Plot",
    "Quantile Plot", "Density Plot", "Return Level Plot"),
    ask = nb.fig < length(which) && dev.interactive(),
    ci = TRUE, adjust = 1, jitter = FALSE, nplty = 2, ...)

Arguments

x An object of class "gev".
which If a subset of the plots is required, specify a subset of the numbers 1:4.
main Title of each plot.
ask Logical; if TRUE, the user is asked before each plot.
ci Logical; if TRUE (the default), plot simulated 95% confidence intervals for the P-P, Q-Q and return level plots.
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 adjust controls the smoothing bandwidth for the non-parametric estimate (see density). jitter is logical; if TRUE, the (possibly transformed) data are jittered to produce the rug plot. This need only be used if the data contains repeated values. nplty is the line type of the non-parametric estimate. To omit the non-parametric estimate set nplty to zero.
... Other parameters to be passed through to plotting functions.

Details

The following discussion assumes that the fitted model is stationary. For non-stationary 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
{(G_n(z_i), G(z_i)), i = 1,...,m}
where G_n is the empirical distribution function (defined using ppoints), G is the model based estimate of the generalized extreme value distribution, and z_1,...,z_m are the data used in the fitted model, sorted into ascending order.
The Q-Q plot consists of the points
{(G^{-1}(p_i), z_i), i = 1,...,m}
where G^{-1} is the model based estimate of the generalized extreme value quantile function, p_1,...,p_m are plotting points defined by ppoints, and z_1,...,z_m are the data used in the fitted model, sorted into ascending order.
The return level plot is defined as follows. Let G be the generalized extreme value distribution function, with location, scale and shape parameters a, b and s respectively. Let z_t be defined by G(z_t) = 1 - 1/t. In common terminology, z_t is the return level associated with the return period t.
Let y_t = -1/log(1 - 1/t). It follows that
z_t = a + b((y_t)^s - 1)/s.
When s = 0, z_t is defined by continuity, so that
z_t = a + b log(y_t).
The curve within the return level plot is z_t plotted against y_t on a logarithmic scale, using maximum likelihood estimates of (a,b,s). If the estimate of s is zero, the curve will be linear. For large values of t, y_t is approximately equal to the return period t. It is usual practice to label the x-axis as the return period.
The points on the plot are
{(-1/log(p_i), z_i), i = 1,...,m}
where p_1,...,p_m are plotting points defined by ppoints, and z_1,...,z_m are the data used in the fitted model, sorted into ascending order. For a good fit the points should lie ``close'' to the curve defined by (z_t,log(y_t)).

See Also

plot.bvevd, density, jitter, rug, ppoints

Examples

uvdata <- rgev(100, loc = 0.13, scale = 1.1, shape = 0.2)
M1 <- fgev(uvdata)
## Don't run: par(mfrow = c(2,2))
## Don't run: plot(M1)

No comments:

Post a Comment

Thank you