mindist: Minimizing the distance between the empirical tail and a...

Description Usage Arguments Details Value References Examples

View source: R/mindist.R

Description

An Implementation of the procedure proposed in Danielsson et al. (2016) for selecting the optimal threshold in extreme value analysis.

Usage

1
mindist(data, ts = 0.15, method = "mad")

Arguments

data

vector of sample data

ts

size of the upper tail the procedure is applied to. Default is 15 percent of the data

method

should be one of ks for the "Kolmogorov-Smirnov" distance metric or mad for the mean absolute deviation (default)

Details

The procedure proposed in Danielsson et al. (2016) minimizes the distance between the largest upper order statistics of the dataset, i.e. the empirical tail, and the theoretical tail of a Pareto distribution. The parameter of this distribution are estimated using Hill's estimator. Therefor one needs the optimal number of upper order statistics k. The distance is then minimized with respect to this k. The optimal number, denoted k0 here, is equivalent to the number of extreme values or, if you wish, the number of exceedances in the context of a POT-model like the generalized Pareto distribution. k0 can then be associated with the unknown threshold u of the GPD by saying u is the n-k0th upper order statistic. For the distance metric in use one could choose the mean absolute deviation called mad here, or the maximum absolute deviation, also known as the "Kolmogorov-Smirnov" distance metric (ks). For more information see references.

Value

k0

optimal number of upper order statistics, i.e. number of exceedances or data in the tail

threshold

the corresponding threshold

tail.index

the corresponding tail index by plugging in k0 into the hill estimator

References

Danielsson, J. and Ergun, L.M. and de Haan, L. and de Vries, C.G. (2016). Tail Index Estimation: Quantile Driven Threshold Selection.

Examples

1
2
data(danish)
mindist(danish,method="mad")

Example output

Loading required package: eva
$k0
[1] 17

$threshold
[1] 29.02604

$tail.index
[1] 1.625417

tea documentation built on April 19, 2020, 3:57 p.m.