Maximum-likelihood estimation for the generalized Pareto model, including generalized linear modelling of each parameter. This function was adapted by Paul Northrop to include the gradient in the gpd.fit
routine from ismev
.
.gpd_2D_fit(
xdat,
threshold,
npy = 365,
ydat = NULL,
sigl = NULL,
shl = NULL,
siglink = identity,
shlink = identity,
siginit = NULL,
shinit = NULL,
show = TRUE,
method = "Nelder-Mead",
maxit = 10000,
...
)
a list with components
scalar giving the number of threshold exceedances.
scalar giving the negative log-likelihood value.
numeric vector giving the MLE's for the scale and shape parameters, resp.
scalar giving the estimated probability of exceeding the threshold.
numeric vector giving the standard error estimates for the scale and shape parameter estimates, resp.
logical indicator for a non-stationary fit.
list with components sigl
and shl
.
character vector giving inverse link functions.
threshold, or vector of thresholds.
number of data points above the threshold.
data that lie above the threshold. For non-stationary models, the data are standardized.
convergence code, taken from the list returned by optim
. A zero indicates successful convergence.
negative log likelihood evaluated at the maximum likelihood estimates.
matrix with three columns containing the maximum likelihood estimates of the scale and shape parameters, and the threshold, at each data point.
vector containing the maximum likelihood estimates.
proportion of data points that lie above the threshold.
covariance matrix.
numeric vector containing the standard errors.
number of data points (i.e., the length of xdat
).
number of observations per year/block.
data that has been fitted.
numeric vector of data to be fitted.
a scalar or a numeric vector of the same length as xdat
.
number of observations per year/block.
matrix of covariates for generalized linear modelling of the parameters (or NULL
(the default) for stationary fitting). The number of rows should be the same as the length of xdat
.
numeric vector of integers, giving the columns of ydat
that contain covariates for generalized linear modelling of the scale parameter (or NULL
(the default) if the corresponding parameter is stationary).
numeric vector of integers, giving the columns of ydat
that contain covariates for generalized linear modelling of the shape parameter (or NULL
(the default) if the corresponding parameter is stationary).
inverse link functions for generalized linear modelling of the scale parameter
inverse link functions for generalized linear modelling of the shape parameter
numeric giving initial value(s) for parameter estimates. If NULL
the default is sqrt(6 * var(xdat))/pi
numeric giving initial value(s) for the shape parameter estimate; if NULL
, this is 0.1. If using parameter covariates, then these values are used for the constant term, and zeros for all other terms.
logical; if TRUE
(default), print details of the fit.
optimization method (see optim
for details).
maximum number of iterations.
other control parameters for the optimization. These are passed to components of the control
argument of optim
.
For non-stationary fitting it is recommended that the covariates within the generalized linear models are (at least approximately) centered and scaled (i.e. the columns of ydat
should be approximately centered and scaled).
The form of the GP model used follows Coles (2001) Eq (4.7). In particular, the shape parameter is defined so that positive values imply a heavy tail and negative values imply a bounded upper value.
Coles, S., 2001. An Introduction to Statistical Modeling of Extreme Values. Springer-Verlag, London.