Maximum-likelihood fitting for the GPD model, including generalized linear modelling of each parameter.
gpd.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 numeric vector of data to be fitted.
The threshold; a single number or a numeric
vector of the same length as xdat
.
The number of observations per year/block.
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
.
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
stationary).
Inverse link functions for generalized linear modelling of the scale and shape parameters repectively.
numeric giving initial value(s) for parameter estimates. If NULL, default is sqrt(6 * var(xdat))/pi and 0.1 for the scale and shape parameters, resp. If using parameter covariates, then these values are used for the constant term, and zeros for all other terms.
Logical; if TRUE
(the default), print details of
the fit.
The optimization method (see optim
for
details).
The maximum number of iterations.
Other control parameters for the optimization. These
are passed to components of the control
argument of
optim
.
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.
single numeric giving the number of threshold exceedances.
nsingle umeric giving the negative log-likelihood value.
numeric vector giving the MLE's for the scale and shape parameters, resp.
single numeric giving the estimated probability of exceeding the threshold.
numeric vector giving the standard error estiamtes for the scale and shape parameter estimates, resp.
An logical indicator for a non-stationary fit.
A list with components sigl
and shl
.
A character vector giving inverse link functions.
The threshold, or vector of thresholds.
The number of data points above the threshold.
The data that lie above the threshold. For non-stationary models, the data is standardized.
The convergence code, taken from the list returned by
optim
. A zero indicates successful convergence.
The negative logarithm of the likelihood evaluated at the maximum likelihood estimates.
A matrix with three columns containing the maximum likelihood estimates of the scale and shape parameters, and the threshold, at each data point.
A vector containing the maximum likelihood estimates.
The proportion of data points that lie above the threshold.
The covariance matrix.
A vector containing the standard errors.
The number of data points (i.e.\ the length of
xdat
).
The number of observations per year/block.
The data that has been fitted.
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, U.K., 208pp.
# NOT RUN {
data(rain)
gpd.fit(rain, 10)
# }
Run the code above in your browser using DataLab