Same A^2 statistic as Adgev, computed by
Adcore, which holds the single implementation
(Hedderich, Sachs and Reynarowych eq (7.33); Anderson and Darling
1952). Only the probability-integral transform
changes: here it is the generalized Pareto distribution function,
Coles (2001) eq (4.2),
H(y) = 1 - (1 + xi y/sigma)^(-1/xi) for y > 0, and
H(y) = 1 - exp(-y/sigma) when xi = 0.
Details
y are threshold excesses and must be positive; the caller
subtracts the threshold. Parameters are supplied, not fitted, for
the same reproducibility reason as Adgev. No p-value
is returned.
Examples
Adgpd(c(0.2, 0.7, 1.3, 2.0, 3.4), 1, 0.1)$statistic
#> [1] 0.6691444
