PS: Sample Path Stability Algorithm

Description Usage Arguments Details Value References Examples

View source: R/PS.R

Description

An Implementation of the heuristic algorithm for choosing the optimal sample fraction proposed in Caeiro & Gomes (2016), among others.

Usage

1
PS(data, j = 1)

Arguments

data

vector of sample data

j

digits to round to. Should be 0 or 1 (default)

Details

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.

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

References

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.

Examples

1
2

Example output

Loading required package: eva
$k0
[1] 1551

$threshold
[1] 1.387755

$tail.index
[1] 1.409626

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