This function computes the bootstrap goodnessoffit test by VillasenorAlva and GonzalezEstrada (2009) for testing the null hypothesis H_0: a random sample has a generalized Pareto distribution (gPd) with unknown shape parameter gamma, which is a real number.
1  gpd.test(x,J)

x 
numeric data vector containing a random sample from a distribution function with support on the positive real numbers. 
J 
number of bootstrap samples. This is an optional argument. Default 
The bootstrap goodnessoffit test for the gPd is an intersectionunion test for the hypotheses H_0^: a random sample has a gPd with gamma <0 , and H_0^+: a random sample has a gPd with gamma >=0. Thus, heavy and nonheavy tailed gPd's are included in the null hypothesis. The parametric bootstrap is performed on gamma for each of the two hypotheses.
We consider the distribution function of the gPd with shape and scale parameters gamma and sigma given by
F(x) = 1  [ 1 + gamma x / sigma ]^(1/gamma)
where gamma is a real number, sigma > 0 and 1 + gamma x / sigma > 0. When gamma = 0, we have the exponential distribution with scale parameter sigma:
1exp(x/sigma)
A list with the following components.
boot.test 
a list with class 
p.values 
the pvalues of the tests of the hypotheses H_0^ and H_0^+ described above. 
Elizabeth Gonzalez Estrada egonzalez@colpos.mx, Jose A. Villasenor Alva
VillasenorAlva, J.A. and GonzalezEstrada, E. (2009). A bootstrap goodness of fit test for the generalized Pareto distribution. Computational Statistics and Data Analysis,53,11,38353841.
gpd.fit
for fitting a gPd to data, rgp
for generating gPd random numbers.
1 2  x < rgp(20,shape = 1) ## Random sample of size 20
gpd.test(x) ## Testing the gPd hypothesis on x

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.