evmix.diag(modelfit, upperfocus = TRUE, ci = TRUE,
alpha = 0.05, N = 1000, legend = FALSE, ...)
rlplot(modelfit, upperfocus = TRUE, ci = TRUE,
alpha = 0.05, N = 1000, legend = TRUE, ...)
qplot(modelfit, upperfocus = TRUE, ci = TRUE,
alpha = 0.05, N = 1000, legend = TRUE, ...)
pplot(modelfit, upperfocus = TRUE, ci = TRUE,
alpha = 0.05, N = 1000, legend = TRUE, ...)
densplot(modelfit, upperfocus = TRUE, legend = TRUE, ...)
rlplot
gives the return
level plot, qplot
gives
the Q-Q plot, pplot
gives
the P-P plot, densplot
gives density plot and
evmix.diag
gives the
collection of all 4.evmix
package. These
modelfit
is output by all the fitting functions,
e.g. fgpd
and
fnormgpd
.
Consistent with plot
function in the evd
library the
ppoints
to estimate the
empirical cumulative probabilities. The current default
behaviour of this function is to use $$(i-0.5)/n$$ as
the estimate for the $i$th order statistic of the
given sample of size $n$.
The return level plot quantile ($x_p$ where $P(X
\le x_p)=p$ on the $y$-axis and the (approximate)
return period $1/p$ is shown on the $x$-axis. It
is approximate as the tranformation $-log(-log(p))
\approx 1/p$ is used for the $x$-axis, which is
common in extreme value application as Type I
($\xi=0$) upper tail behaviour will be linear on this
scale. The approximation is better for smaller upper tail
probability.
The crosses are the empirical quantiles/return levels
(i.e. the ordered sample data) against their
corresponding transfomred empirical return period (from
ppoints
). The solid line is
the theoretical return level (quantile) function using
the estimated model parameters. The estimated threshold
u
and tail fraction phiu
are shown. For the
two tailed models both thresholds ul
and ur
and corresponding tail fractions phiul
and
phiur
are shown. The approximate pointwise
confidence intervals for the quantiles are obtained by
Monte Carlo simulation using the estimated parameters.
Notice that these intervals ignore the parameter
estimation uncertainty.
The Q-Q and P-P plots have the empirical values on the
$y$-axis and theoretical values from the fitted model
on the $x$-axis.
The density plot provides a histogram of the sample data
overlaid with the fitted density and a standard kernel
density estimate using the
density
function. The
default settings for the
density
function are used.
Note that for distributions with bounded support (e.g.
GPD) with high density near the boundary standard kernel
density estimators exhibit a negative bias due to leakage
past the boundary. So in this case they should not be
taken too seriously.
For the kernel density estimates (i.e. kden
and
bckden
) there is no threshold, so no upper tail
focus is carried out.
See plot.uvevd
for more
detailed explanations of these types of plots.evd
package.
ppoints
and
plot.uvevd
x = sort(rnorm(1000))
fit = fnormgpd(x)
evmix.diag(fit)
# repeat without focussing on upper tail
par(mfrow=c(2,2))
rlplot(fit, upperfocus = FALSE)
qplot(fit, upperfocus = FALSE)
pplot(fit, upperfocus = FALSE)
densplot(fit, upperfocus = FALSE)
Run the code above in your browser using DataLab