Description Usage Arguments Details Value Author(s) References See Also Examples
Fits a generalized Pareto distribution (gPd) to a random sample using either the asymptotic maximum likelihood method (amle) or the combined estimation method (Villasenor-Alva and Gonzalez-Estrada, 2009).
1 | gp_fit(x, method)
|
x |
a numeric data vector containing a random sample of positive real numbers. |
method |
a character string giving the name of the parameter estimation method to be used. There are two available methods: |
The distribution function of the gPd is provided in the details section of the gp_test function
.
Parameter estimates.
Elizabeth Gonzalez-Estrada, Jose A. Villasenor-Alva
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
gp_test
for testing the gPd hypothesis.
1 2 3 4 5 6 7 8 9 10 | # Example 1: fitting a gPd to the excesses above the threshold 0.165 ppm of the ozone
# levels provided in the o3 data set.
data(o3)
o3levels <- o3$ozone_level - 0.165 # ozone levels minus the threshold 0.165 ppm
gp_fit(o3levels, method = "combined") # fitting the gPd using the "combined" method
# Example 2: fitting a gPd to a simulated data set from the uniform distribution,
# which is a gPd with shape parameter = -1 and scale parameter = 1.
x <- runif(100) # simulating a uniform random sample
gp_fit(x, "combined") # fitting a gPd to x using the "combined" method
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.