gp_test {goft} | R Documentation |
Bootstrap test for the generalized Pareto distribution
Description
Test of fit for the generalized Pareto distribution (gPd) with unknown parameters by Villasenor-Alva and Gonzalez-Estrada (2009).
Usage
gp_test(x, B = 999)
Arguments
x |
numeric data vector containing a random sample of positive real numbers. |
B |
number of bootstrap samples used to approximate p-values. Default is |
Details
This bootstrap test for the null hypothesis a random sample has a gPd with unknown shape parameter
is an intersection-union test for the hypotheses
a random sample has a gPd with
, and
a random sample has a gPd with
.
Thus, heavy and non-heavy tailed gPd's are included in the null hypothesis. The parametric bootstrap is performed on
for each of the two hypotheses.
The gPd function with unknown shape and scale parameters and
is given by
where is a real number,
and
. When
, F(x) becomes the exponential distribution with scale parameter
:
Value
A list with class "htest"
containing the following components.
p.value |
an approximated p-value of the test using parametric bootstrap. |
method |
the character string "Bootstrap test of fit for the generalized Pareto distribution". |
data.name |
a character string giving the name of the data set. |
pvalues |
approximated p-values of the tests for |
Author(s)
Elizabeth Gonzalez-Estrada egonzalez@colpos.mx, Jose A. Villasenor-Alva
References
Villasenor-Alva, J.A. and Gonzalez-Estrada, E. (2009). A bootstrap goodness of fit test for the generalized Pareto distribution. Computational Statistics and Data Analysis,53,11,3835-3841. http://dx.doi.org/10.1016/j.csda.2009.04.001
See Also
gp_fit
for fitting a gPd to data.
Examples
# Testing the gPd hypothesis on the excesses above the threshold 0.165 ppm of the ozone
# levels given in the o3 data set
data(o3)
o3levels <- o3$ozone_level - 0.165 # ozone levels minus the threshold 0.165 ppm
gp_test(o3levels) # testing the gPd hypothesis