gpdEst(Wdata, thresh = -Inf, quantil = 0.95)thresh are fitted to a
generalized Pareto distribution (GPD). The estimated parameters shape
and scale are used to calculate a classification threshold by the
formula
$$\mathit{thresh}+\frac{\mathit{scale}}{\mathit{shape}}
((\frac{n}{k}(1-\mathit{quantil}))^{-\mathit{shape}} -1)$$
where $n$ is the total number of weights and $k$ the number of
exceedances.getParetoThreshold for user-level function