Learn R Programming

ismev (version 1.3)

gpd.fit: Maximum-likelihood Fitting for the GPD Model

Description

Maximum-likelihood fitting for the GPD model, including generalized linear modelling of each parameter.

Usage

gpd.fit(xdat, threshold, npy = 365, ydat = NULL, sigl = NULL,
    shl = NULL, siglink = identity, shlink = identity, show = TRUE,
    method = "Nelder-Mead", maxit = 10000, ...)

Arguments

xdat
A numeric vector of data to be fitted.
threshold
The threshold; a single number or a numeric vector of the same length as xdat.
npy
The number of observations per year/block.
ydat
A 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, shl
Numeric vectors of integers, giving the columns of ydat that contain covariates for generalized linear modelling of the scale and shape parameters repectively (or NULL (the default) if the corresponding parameter is
siglink, shlink
Inverse link functions for generalized linear modelling of the scale and shape parameters repectively.
show
Logical; if TRUE (the default), print details of the fit.
method
The optimization method (see optim for details).
maxit
The maximum number of iterations.
...
Other control parameters for the optimization. These are passed to components of the control argument of optim.

Value

  • A list containing the following components. A subset of these components are printed after the fit. If show is TRUE, then assuming that successful convergence is indicated, the components nexc, nllh, mle, rate and se are always printed.
  • transAn logical indicator for a non-stationary fit.
  • modelA list with components sigl and shl.
  • linkA character vector giving inverse link functions.
  • thresholdThe threshold, or vector of thresholds.
  • nexcThe number of data points above the threshold.
  • dataThe data that lie above the threshold. For non-stationary models, the data is standardized.
  • convThe convergence code, taken from the list returned by optim. A zero indicates successful convergence.
  • nllhThe negative logarithm of the likelihood evaluated at the maximum likelihood estimates.
  • valsA matrix with three columns containing the maximum likelihood estimates of the scale and shape parameters, and the threshold, at each data point.
  • mleA vector containing the maximum likelihood estimates.
  • rateThe proportion of data points that lie above the threshold.
  • covThe covariance matrix.
  • seA vector containing the standard errors.
  • nThe number of data points (i.e. the length of xdat).
  • npyThe number of observations per year/block.
  • xdataThe data that has been fitted.

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

See Also

gpd.diag, optim, gpd.prof, gpd.fitrange, mrl.plot, pp.fit

Examples

Run this code
data(rain)
gpd.fit(rain, 10)

Run the code above in your browser using DataLab