fitGPD: Fitting a GPD to Peaks Over a Threshold

Fit the GP DistributionR Documentation

Fitting a GPD to Peaks Over a Threshold

Description

Maximum (Penalized) Likelihood, Unbiased Probability Weighted Moments,Biased Probability Weighted Moments, Moments, Pickands', Minimum Density Power Divergence, Medians, Likelihood Moment and Maximum Goodness-of-Fit Estimators to fit Peaks Over a Threshold to a GP distribution.

Usage

fitgpd(data, threshold, est = "mle", ...)

Arguments

data

A numeric vector.

threshold

A numeric value giving the threshold for the GPD. The 'mle' estimator allows varying threshold; so that threshold could be for this case a numeric vector. Be careful, varying thresholds are used cyclically if length doesn't match with data.

est

A string giving the names of the estimator. It can be 'mle' (the default), 'mple', 'moments', 'pwmu', 'pwmb', 'mdpd', 'med', 'pickands', 'lme' and 'mgf' for the maximum likelihood, maximum penalized likelihood, moments, unbiased probability weighted moments, biased probability weigthed moments, minimum density power divergence, medians, Pickands', likelihood moment and maximum goodness-of-fit estimators respectively.

...

Other optional arguments to be passed to the optim function, allow hand fixed parameters (only for the mle, mple and mgf estimators) or passed several options to specific estimators - see the Note section.

Value

This function returns an object of class "uvpot" with components:

fitted.values

A vector containing the estimated parameters.

std.err

A vector containing the standard errors.

fixed

A vector containing the parameters of the model that have been held fixed.

param

A vector containing all parameters (optimized and fixed).

deviance

The deviance at the maximum likelihood estimates.

corr

The correlation matrix.

convergence, counts, message

Components taken from the list returned by optim - for the mle method.

threshold

The threshold passed to argument threshold.

nat, pat

The number and proportion of exceedances.

data

The data passed to the argument data.

exceed

The exceedances, or the maxima of the clusters of exceedances.

scale

The scale parameter for the fitted generalized Pareto distribution.

std.err.type

The standard error type - for 'mle' only. That is Observed or Expected Information matrix of Fisher.

var.thresh

Logical. Specify if the threshold is a varying one - 'mle' only. For other methods, threshold is always constant i.e. var.thresh = FALSE.

Note

The Maximum Likelihood estimator is obtained through a slightly modified version of Alec Stephenson's fpot.norm function in the evd package.

For the 'mple' estimator, the likelihood function is penalized using the following function :

P(xi)=1 if xi ≤ 0, exp[-lambda(1/(1-xi) - 1)^alpha], if 0 < xi < 1, 0 if xi ≥ 1

where alpha and lambda are the penalizing constants. Coles and Dixon (1999) suggest the use of alpha=lambda=1.

The 'lme' estimator has a special parameter 'r'. Zhang (2007) shows that a value of -0.5 should be accurate in most of the cases. However, other values such as r < 0.5 can be explored. In particular, if r is approximatively equal to the opposite of the true shape parameter value, then the lme estimate is equivalent to the mle estimate.

The 'pwmb' estimator has special parameters 'a' and 'b'. These parameters are called the "plotting-position" values. Hosking and Wallis (1987) recommend the use of a = 0.35 and b = 0 (the default). However, different values can be tested.

For the 'pwmu' and 'pwmb' approaches, one can pass the option 'hybrid = TRUE' to use hybrid estimators as proposed by Dupuis and Tsao (1998). Hybrid estimators avoid to have no feasible points.

The mdpd estimator has a special parameter 'a'. This is a parameter of the "density power divergence". Juarez and Schucany (2004) recommend the use of a = 0.1, but any value of a such as a > 0 can be used (small values are recommend yet).

The med estimator admits two extra arguments tol and maxit to control the "stopping-rule" of the optimization process.

The mgf approach uses goodness-of-fit statistics to estimate the GPD parameters. There are currently 8 different statitics: the Kolmogorov-Smirnov "KS", Cramer von Mises "CM", Anderson Darling "AD", right tail Anderson Darling "ADR", left tail Anderson Darling "ADL", right tail Anderson Darling (second degree) "AD2R", left tail Anderson Darling (second degree) "AD2L" and the Anderson Darling (second degree) "AD2" statistics.

Author(s)

Mathieu Ribatet

References

Coles, S. (2001) An Introduction to Statistical Modelling of Extreme Values. Springer Series in Statistics. London.

Coles, S. and Dixon, M. (1999) Likelihood-Based Inference for Extreme Value Models. Extremes 2(1):5–23.

Dupuis, D. and Tsao (1998) M. A hybrid estimator for generalized Pareto and extreme-value distributions. Communications in Statistics-Theory and Methods 27:925–941.

Hosking, J. and Wallis, J. (1987) Parameters and Quantile Estimation for the Generalized Pareto Distribution. Technometrics 29:339–349.

Juarez, S. and Schucany, W. (2004) Robust and Efficient Estimation for the Generalized Pareto Distribution. Extremes 7:237–251.

Luceno, A. (2006) Fitting the generalized Pareto distribution to data using maximum goodness-of-fit estimators. Computational Statistics and Data Analysis 51:904–917.

Peng, L. and Welsh, A. (2001) Robust Estimation of the Generalized Pareto Distribution. Extremes 4:53–65.

Embrechts, P and Kluppelberg, C. and Mikosch, T (1997) Modelling Extremal Events for Insurance and Finance. Springers.

Pickands, J. (1975) Statistical Inference Using Extreme Order Statistics. Annals of Statistics. 3:119–131.

Zhang, J. (2007) Likelihood Moment Estimation for the Generalized Pareto Distribution. Australian and New Zealand Journal of Statistics. 49(1):69–77.

See Also

The following usual generic functions are available print, plot, confint and anova as well as new generic functions retlev, qq, pp, dens and convassess.

Examples

x <- rgpd(200, 1, 2, 0.25)
mle <- fitgpd(x, 1, "mle")$param
pwmu <- fitgpd(x, 1, "pwmu")$param
pwmb <- fitgpd(x, 1, "pwmb")$param
pickands <- fitgpd(x, 1, "pickands")$param    ##Check if Pickands estimates
                                              ##are valid or not !!!
med <- fitgpd(x, 1, "med",                    ##Sometimes the fitting algo is not
start = list(scale = 2, shape = 0.25))$param  ##accurate. So specify
                                              ##good starting values is
                                              ##a good idea.  
mdpd <- fitgpd(x, 1, "mdpd")$param
lme <- fitgpd(x, 1, "lme")$param
mple <- fitgpd(x, 1, "mple")$param
ad2r <- fitgpd(x, 1, "mgf", stat = "AD2R")$param

print(rbind(mle, pwmu, pwmb, pickands, med, mdpd, lme,
 mple, ad2r))

##Use PWM hybrid estimators
fitgpd(x, 1, "pwmu", hybrid = FALSE)

##Now fix one of the GPD parameters
##Only the MLE, MPLE and MGF estimators are allowed !
fitgpd(x, 1, "mle", scale = 2)
fitgpd(x, 1, "mple", shape = 0.25) 

POT documentation built on April 14, 2022, 3:03 a.m.