Compute the Mahalanobis distance-based threshold method over a grid of thresholds by transforming data from generalized Pareto to unit exponential based on probability weighted moment estimates, then computing the first L-moment and the L-skewness. The latter are compared to the theoretical counterparts from a unit exponential sample of the same size, which is used to compute the Mahalanobis distance. The threshold returned is the one which minimizes the distance.
thselect.ksmd(xdat, thresh, approx = c("asymptotic", "mc"), nsim = 1000L)a list with components
thresh0: selected threshold returned by the procedure
thresh: vector of candidate thresholds
pval: scalar p-value for the chi-square approximation to the test statistic for the selected threshold
dist: vector of Mahalanobis distance
approx: type of approximation
[numeric] vector of observations
[numeric] vector of candidate thresholds. If missing, 20 sample quantiles starting at the 0.25 quantile in increments of 3.75 percent.
[string] method to use to obtain moments of first L-moment
[integer] number of replications for Monte Carlo approximation
Kiran, K. G. and Srivinas, V.V. (2021). A Mahalanobis distance-based automatic threshold selection method for peaks over threshold model. Water Resources Research 57. <doi:10.1029/2020WR027534>