Numerical optimization of the Generalized Pareto distribution over a high threshold.
gp.fit(xdat, threshold, method = c("Grimshaw", "nlm", "optim", "ismev", "zs",
"zhang"), show = FALSE, MCMC = NULL)
a numeric vector of data to be fitted.
the chosen threshold.
the method to be used. See Details. Can be abbreviated.
logical; if TRUE
(the default), print details of the fit.
NULL
for frequentist estimates, otherwise a boolean or a list with parameters passed. If TRUE
, runs a Metropolis-Hastings sampler to get posterior mean estimates. Can be used to pass arguments niter
, burnin
and thin
to the sampler as a list.
If method
is neither "zs"
nor "zhang"
, a list containing the following components:
estimate
a vector containing all parameters (optimized and fixed).
std.err
a vector containing the standard errors.
var.cov
the variance covariance matrix, obtained as the numerical inverse of the observed information matrix.
threshold
the threshold.
method
the method used to fit the parameter. See details.
deviance
the deviance at the maximum likelihood estimates.
nat
number of points lying above the threshold.
pat
proportion of points lying above the threshold.
convergence
components taken from the list returned by optim
.
Values other than 0
indicate that the algorithm likely did not converge (in particular 1 and 50).
counts
components taken from the list returned by optim
.
Otherwise, a list containing
threshold
the threshold.
method
the method used to fit the parameter. See Details.
nat
number of points lying above the threshold.
pat
proportion of points lying above the threshold.
approx.mean
a vector containing containing the approximate posterior mean estimates.
and in addition if MCMC is neither FALSE
, nor NULL
post.mean
a vector containing the posterior mean estimates.
post.se
a vector containing the posterior standard error estimates.
accept.rate
proportion of points lying above the threshold.
niter
length of resulting Markov Chain
burnin
amount of discarded iterations at start, capped at 10000.
thin
thinning integer parameter describing
The default method is "Grimshaw"
, consisting in maximization of the profile likelihood for the scale.
Other options for maximization of the profile likelihood are nlm
and optim
, which use respectively nlm
and optim
. Method "ismev"
is the two-dimensional optimization routine gpd.fit
from the ismev
library, with in addition the algebraic gradient.
The approximate Bayesian methods ("zs"
and "zhang"
) are extracted respectively from Zhang and Stephens (2009) and Zhang (2010) and consists of a approximate posterior mean calculated via importance
sampling assuming a GPD prior is placed on the parameter of the profile likelihood.
Davison, A.C. (1984). Modelling excesses over high thresholds, with an application, in Statistical extremes and applications, J. Tiago de Oliveira (editor), D. Reidel Publishing Co., 461--482.
Grimshaw, S.D. (1993). Computing Maximum Likelihood Estimates for the Generalized Pareto Distribution, Technometrics, 35(2), 185--191.
Northrop, P.J. and C. L. Coleman (2014). Improved threshold diagnostic plots for extreme value analyses, Extremes, 17(2), 289--303.
Zhang, J. (2010). Improving on estimation for the generalized Pareto distribution, Technometrics 52(3), 335--339.
Zhang, J. and M.A. Stephens (2009). A new and efficient estimation method for the generalized Pareto distribution. Technometrics 51(3), 316--325.
# NOT RUN {
library(ismev)
data(rain)
threshold <- quantile(rain,0.9)
gp.fit(rain, threshold, method="Grimshaw")
gp.fit(rain, threshold, method="zs")
# }
Run the code above in your browser using DataLab