pickandsplot: Pickands Plot

Description Usage Arguments Details Value Acknowledgments Note Author(s) References See Also Examples

View source: R/pickandsplot.r

Description

Produces the Pickand's plot.

Usage

1
2
3
4
5
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"), ...)

Arguments

data

vector of sample data

orderlim

vector of (lower, upper) limits of order statistics to plot estimator, or NULL to use default values

tlim

vector of (lower, upper) limits of range of threshold to plot estimator, or NULL to use default values

y.alpha

logical, should shape xi (FALSE) or tail index alpha (TRUE) be given on y-axis

alpha

significance level over range (0, 1), or NULL for no CI

ylim

y-axis limits or NULL

legend.loc

location of legend (see legend) or NULL for no legend

try.thresh

vector of thresholds to consider

main

title of plot

xlab

x-axis label

ylab

y-axis label

...

further arguments to be passed to the plotting functions

Details

Produces the Pickand's plot including confidence intervals.

For an ordered iid sequence X_{(1)}≥ X_{(2)}≥\cdots≥ X_{(n)} the Pickand's estimator of the reciprocal of the shape parameter ξ at the kth order statistic is given by

\hat{ξ}_{k,n}=\frac{1}{\log(2)} \log≤ft(\frac{X_{(k)}-X_{(2k)}}{X_{(2k)}-X_{(4k)}}\right).

Unlike the Hill estimator it does not assume positive data, is valid for any ξ and is location and scale invariant. The Pickands estimator is defined on orders k=1, …, \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{ξ}_{k,n}

against the k. Symmetric asymptotic normal confidence intervals assuming Pareto tails are provided.

The Pickand's estimator is for the GPD shape ξ, or the reciprocal of the tail index α=1/ξ. 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 (ξ or α) 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, …, \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.

Value

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 - α)\% confidence interval (when requested).

Acknowledgments

Thanks to Younes Mouatasim, Risk Dynamics, Brussels for reporting various bugs in these functions.

Note

Asymptotic Wald type CI's are estimated for non-NULL signficance level alpha for the shape parameter, assuming exactly GPD tails. When plotting on the tail index scale, then a simple reciprocal transform of the CI is applied which may well be sub-optimal.

Error checking of the inputs (e.g. invalid probabilities) is carried out and will either stop or give warning message as appropriate.

Author(s)

Carl Scarrott carl.scarrott@canterbury.ac.nz

References

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.

See Also

pickands

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## 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)

## End(Not run)

Example output

Loading required package: MASS
Loading required package: splines
Loading required package: gsl
Loading required package: SparseM

Attaching package: 'SparseM'

The following object is masked from 'package:base':

    backsolve

evmix documentation built on Sept. 3, 2019, 5:07 p.m.