gpd.test(x,J)
J=999
."htest"
containing the p-value of the test, the name of the data set, and the character string "Bootstrap goodness-of-fit test for the generalized Pareto distribution". We consider the distribution function of the gPd with shape and scale parameters $gamma$ and $sigma$ given by
$$F(x) = 1 - \left[ 1 + \frac{\gamma x}{ \sigma } \right] ^ { - 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$: $$F(x) = 1 -exp\left(-x/\sigma \right)$$
0>gpd.fit
for fitting a gPd to data, rgp
for generating gPd random numbers.x <- rgp(20,shape = 1) ## Random sample of size 20
gpd.test(x) ## Testing the gPd hypothesis on x
Run the code above in your browser using DataLab