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.
Usage
thselect.ksmd(xdat, thresh, approx = c("asymptotic", "mc"), nsim = 1000L)
Arguments
- xdat
[numeric] vector of observations
- thresh
[numeric] vector of candidate thresholds. If missing, 20 sample quantiles starting at the 0.25 quantile in increments of 3.75 percent.
- approx
[string] method to use to obtain moments of first L-moment
- nsim[integer]
number of replications for Monte Carlo approximation