gpd.fit: Fitting the generalized Pareto distribution to data

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/gpd.fit.R

Description

This function fits a generalized Pareto distribution (gPd) to a data set using either the asymptotic maximum likelihood method (amle) or the combined method proposed by Villasenor-Alva and Gonzalez-Estrada (2009).

Usage

1
gpd.fit(x,method)

Arguments

x

numeric data vector containing a random sample from a distribution function with support on the positive real numbers.

method

a character string giving the name of the parameter estimation method to be used. There are two available methods: "combined" and "amle". Use "combined" for fitting a gPd with shape parameter <0. Use "amle" for fitting a gPd with shape parameter >= 0.

Details

The distribution function of the gPd is given in the details section of the function gpd.test.

Value

The parameter estimates.

Author(s)

Elizabeth Gonzalez Estrada, 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.

See Also

gpd.test for testing the gPd hypothesis, rgp for generating gPd random numbers.

Examples

1
2
x <-  rgp(20,shape = 1)   	## Random sample of size 20
gpd.fit(x,"amle")           ## Fitting a gPd to  x  using the "amle" method

Example output

      Parameter estimate
shape          0.6795842
scale          1.0064917

gPdtest documentation built on May 2, 2019, 8:57 a.m.

Related to gpd.fit in gPdtest...