An Implementation of the heuristic algorithm for choosing the optimal sample fraction proposed in Caeiro & Gomes (2016), among others.
PS(data, j = 1)
vector of sample data
digits to round to. Should be 0
or 1
(default)
optimal number of upper order statistics, i.e. number of exceedances or data in the tail
the corresponding threshold
the corresponding tail index
The algorithm searches for a stable region of the sample path, i.e. the plot of a tail index estimator with respect to k
. This is done in two steps. First the estimation of the tail index for every k
is rounded to j
digits and the longest set of equal consecutive values is chosen. For this set the estimates are rounded to j+2 digits and the mode of this subset is determined. The corresponding biggest k-value, denoted k0
here, is the optimal number of data in the tail.
Caeiro, J. and Gomes, M.I. (2016). Threshold selection in extreme value analysis. Extreme Value Modeling and Risk Analysis:Methids and Applications, 69--86.
Gomes, M.I. and Henriques-Rodrigues, L. and Fraga Alves, M.I. and Manjunath, B. (2013). Adaptive PORT-MVRB estimation: an empirical comparison of two heuristic algorithms. Journal of Statistical Computation and Simulation, 83, 1129--1144.
Gomes, M.I. and Henriques-Rodrigues, L. and Miranda, M.C. (2011). Reduced-bias location-invariant extreme value index estimation: a simulation study. Communications in Statistic-Simulation and Computation, 40, 424--447.
# NOT RUN {
data(danish)
PS(danish)
# }
Run the code above in your browser using DataLab