dot-gpd_2D_fit: Maximum likelihood method for the generalized Pareto Model

.gpd_2D_fitR Documentation

Maximum likelihood method for the generalized Pareto Model

Description

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.

Usage

.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,
  ...
)

Arguments

xdat

numeric vector of data to be fitted.

threshold

a scalar or a numeric vector of the same length as xdat.

npy

number of observations per year/block.

ydat

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.

sigl

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).

shl

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).

siglink

inverse link functions for generalized linear modelling of the scale parameter

shlink

inverse link functions for generalized linear modelling of the shape parameter

siginit

numeric giving initial value(s) for parameter estimates. If NULL the default is sqrt(6 * var(xdat))/pi

shinit

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.

show

logical; if TRUE (default), print details of the fit.

method

optimization method (see optim for details).

maxit

maximum number of iterations.

...other

control parameters for the optimization. These are passed to components of the control argument of optim.

Details

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.

Value

a list with components

nexc

scalar giving the number of threshold exceedances.

nllh

scalar giving the negative log-likelihood value.

mle

numeric vector giving the MLE's for the scale and shape parameters, resp.

rate

scalar giving the estimated probability of exceeding the threshold.

se

numeric vector giving the standard error estimates for the scale and shape parameter estimates, resp.

trans

logical indicator for a non-stationary fit.

model

list with components sigl and shl.

link

character vector giving inverse link functions.

threshold

threshold, or vector of thresholds.

nexc

number of data points above the threshold.

data

data that lie above the threshold. For non-stationary models, the data are standardized.

conv

convergence code, taken from the list returned by optim. A zero indicates successful convergence.

nllh

negative log likelihood evaluated at the maximum likelihood estimates.

vals

matrix with three columns containing the maximum likelihood estimates of the scale and shape parameters, and the threshold, at each data point.

mle

vector containing the maximum likelihood estimates.

rate

proportion of data points that lie above the threshold.

cov

covariance matrix.

se

numeric vector containing the standard errors.

n

number of data points (i.e., the length of xdat).

npy

number of observations per year/block.

xdata

data that has been fitted.

References

Coles, S., 2001. An Introduction to Statistical Modeling of Extreme Values. Springer-Verlag, London.


mev documentation built on April 20, 2023, 5:10 p.m.