generalisedPareto {lite} | R Documentation |
Frequentist inference for the generalised Pareto distribution
Description
Functions involved in making inferences about the scale and shape parameters of a generalised Pareto distribution using maximum likelihood estimation.
Usage
fitGP(data, u)
## S3 method for class 'GP'
coef(object, ...)
## S3 method for class 'GP'
vcov(object, ...)
## S3 method for class 'GP'
nobs(object, ...)
## S3 method for class 'GP'
logLik(object, ...)
gpObsInfo(pars, excesses, eps = 1e-05, m = 3)
Arguments
data |
A numeric vector of raw data. Missing values are removed using
|
u |
A numeric scalar. The extremal value threshold. |
object |
A fitted model object returned from |
... |
Further arguments to be passed to the functions in the
sandwich package |
pars |
A numeric parameter vector of length 2 containing the values of the generalised Pareto scale and shape parameters. |
excesses |
A numeric vector of threshold excesses, that is, amounts
by which exceedances of |
eps , m |
These control the estimation of the observed
information in |
Details
fitGP
: fit a generalised Pareto distribution using maximum likelihood
estimation, using an independence log-likelihood formed by
summing contributions from individual observations. No adjustment for
cluster dependence has been made in estimating the variance-covariance
matrix stored as component in vcov
in the returned object. This
function calls grimshaw_gp_mle
.
coef
, vcov
, nobs
and logLik
methods are
provided for objects of class "GP"
returned from fitGP
.
gpObsInfo
: calculates the observed information matrix for a random
sample excesses
from the generalized Pareto distribution, that is,
the negated Hessian matrix of the generalized Pareto independence
log-likelihood, evaluated at pars
.
Value
fitGP
returns an object of class "GP"
, a list
with components: maxLogLik
, threshold
, mle
,
vcov
, exceedances
, nexc
,
where exceedances
is a vector containing the values that exceed the
threshold threshold
and nexc
is the length of this vector.
coef.GP
: a numeric vector of length 2 with names
c("sigma[u]", "xi")
. The MLEs of the GP parameters
\sigma_u
and \xi
.
vcov.GP
: a 2 \times 2
matrix with row and
column names c("sigma[u]", "xi")
. The estimated
variance-covariance matrix for the model parameters. No adjustment for
cluster dependence has been made.
nobs.GP
: a numeric vector of length 1. The number of
observations used to estimate (\sigma_u
, \xi
).
logLik.GP
: an object of class "logLik"
: a numeric scalar
with value equal to the maximised log-likelihood. The returned object
also has attributes nobs
, the numbers of observations used in
each of these model fits, and "df"
(degrees of freedom), which is
equal to the number of total number of parameters estimated (2).
gpObsInfo
returns a 2 by 2 matrix with row and columns names
c("sigma[u]", "xi")
.
Examples
# Set up data and set a threshold
cdata <- c(exdex::cheeseboro)
# Fit a generalised Pareto distribution
fit <- fitGP(cdata, 45)
# Calculate the log-likelihood at the MLE
res <- logLikVector(fit)
# The logLik method sums the individual log-likelihood contributions.
logLik(res)
# nobs, coef, vcov, logLik methods for objects returned from fitGP()
nobs(fit)
coef(fit)
vcov(fit)
logLik(fit)