Produces the Pickand's plot.
pickandsplot(data, orderlim = NULL, tlim = NULL, y.alpha = FALSE,
alpha = 0.05, ylim = NULL, legend.loc = "topright",
try.thresh = quantile(data, 0.9, na.rm = TRUE), main = "Pickand's Plot",
xlab = "order", ylab = ifelse(y.alpha, " tail index - alpha",
"shape - xi"), ...)
vector of sample data
vector of (lower, upper) limits of order statistics
to plot estimator, or NULL
to use default values
vector of (lower, upper) limits of range of threshold
to plot estimator, or NULL
to use default values
logical, should shape xi (FALSE
) or tail index alpha (TRUE
) be given on y-axis
significance level over range (0, 1), or NULL
for no CI
y-axis limits or NULL
location of legend (see legend
) or NULL
for no legend
vector of thresholds to consider
title of plot
x-axis label
y-axis label
further arguments to be passed to the plotting functions
pickandsplot
gives Pickand's plot. It also
returns a dataframe containing columns of the order statistics, order, Pickand's
estimator, it's standard devation and \(100(1 - \alpha)\%\) confidence
interval (when requested).
Thanks to Younes Mouatasim, Risk Dynamics, Brussels for reporting various bugs in these functions.
Produces the Pickand's plot including confidence intervals.
For an ordered iid sequence \(X_{(1)}\ge X_{(2)}\ge\cdots\ge X_{(n)}\) the Pickand's estimator of the reciprocal of the shape parameter \(\xi\) at the \(k\)th order statistic is given by $$\hat{\xi}_{k,n}=\frac{1}{\log(2)} \log\left(\frac{X_{(k)}-X_{(2k)}}{X_{(2k)}-X_{(4k)}}\right).$$ Unlike the Hill estimator it does not assume positive data, is valid for any \(\xi\) and is location and scale invariant. The Pickands estimator is defined on orders \(k=1, \ldots, \lfloor n/4\rfloor\).
Once a sufficiently low order statistic is reached the Pickand's estimator will be constant, upto sample uncertainty, for regularly varying tails. Pickand's plot is a plot of $$\hat{\xi}_{k,n}$$ against the \(k\). Symmetric asymptotic normal confidence intervals assuming Pareto tails are provided.
The Pickand's estimator is for the GPD shape \(\xi\), or the reciprocal of the
tail index \(\alpha=1/\xi\). The shape is plotted by default using
y.alpha=FALSE
and the tail index is plotted when y.alpha=TRUE
.
A pre-chosen threshold (or more than one) can be given in
try.thresh
. The estimated parameter (\(\xi\) or \(\alpha\)) at
each threshold are plot by a horizontal solid line for all higher thresholds.
The threshold should be set as low as possible, so a dashed line is shown
below the pre-chosen threshold. If Pickand's estimator is similar to the
dashed line then a lower threshold may be chosen.
If no order statistic (or threshold) limits are provided
orderlim = tlim = NULL
then the lowest order statistic is set to \(X_{(1)}\) and
highest possible value \(X_{\lfloor n/4\rfloor}\). However, Pickand's estimator is always
output for all \(k=1, \ldots, \lfloor n/4\rfloor\).
The missing (NA
and NaN
) and non-finite values are ignored.
The lower x-axis is the order \(k\). The upper axis is for the corresponding threshold.
Pickands III, J.. (1975). Statistical inference using extreme order statistics. Annal of Statistics 3(1), 119-131.
Dekkers A. and de Haan, S. (1989). On the estimation of the extreme-value index and large quantile estimation. Annals of Statistics 17(4), 1795-1832.
Resnick, S. (2007). Heavy-Tail Phenomena - Probabilistic and Statistical Modeling. Springer.
# NOT RUN {
par(mfrow = c(2, 1))
# Reproduce graphs from Figure 4.7 of Resnick (2007)
data(danish, package="evir")
# Pickand's plot
pickandsplot(danish, orderlim=c(1, 150), ylim=c(-0.1, 2.2),
try.thresh=c(), alpha=NULL, legend.loc=NULL)
# Using default settings
pickandsplot(danish)
# }
Run the code above in your browser using DataLab