Learn R Programming

texmex (version 2.4.9)

gpdRangeFit: Estimate generalized Pareto distribution parameters over a range of values

Description

Estimate generalized Pareto distribution parameters over a range of values, using maximum (penalized) likelihood.

Usage

gpdRangeFit(data, umin=quantile(data, .05), umax=quantile(data, .95),
nint = 10, penalty = "gaussian", priorParameters = NULL, alpha=0.05,
cov="observed")
# S3 method for gpdRangeFit
print(x, ...)
# S3 method for gpdRangeFit
summary(object, ...)
# S3 method for summary.gpdRangeFit
print(x, ...)
# S3 method for gpdRangeFit
plot(x, xlab = "Threshold", ylab = NULL, main = NULL, addNexcesses=TRUE, ...)
# S3 method for gpdRangeFit
ggplot(data, mapping, xlab="Threshold", ylab=NULL,
main=NULL, fill="orange", col="blue", addNexcesses = TRUE, textsize=4, ...,
environment)

Arguments

data

The data vector to be modelled.

umin

The minimum threshold above which to estimate the parameters.

umax

The maximum threshold above which to estimate the parameters.

nint

The number of thresholds at which to perform the estimation.

penalty

The type of penalty to be used in the maximum penalized likelihood estimation. Should be either "gaussian" or "none". Defaults to "gaussian".

priorParameters

Parameters to be used for the penalty function. See the help for evm for more informaiton.

alpha

100(1 - alpha)% confidence intervals will be plotted with the point estimates. Defaults to alpha = 0.05.

cov

How to compute the covariance matrix of the parameters. Defaults to cov = "observed" in which case the observed information matrix is used, if the info element of the texmexFamily object is present. See more detailed documentation of this argument in evm.

x, object

Arguments to print and summary functions.

xlab

Label for the x-axis.

ylab

Label for the y-axis.

main

The main title.

addNexcesses

Annotate top axis with numbers of threshold excesses arising with the corresponding values of threshold on the bottom axis.

col

Colour of the line on the threshold stability plot.

fill

Colour of the pointwise confidence region on the threshold stability plots.

textsize

Size of text on the plot (ggplot). Defaults to textsize=4.

...

Arguments to plot.

mapping, environment

Not used.

Author

Stuart Coles, Janet E Heffernan, Harry Southworth

Details

This is Stuart Coles' gpd.fitrange, as it appears in the ismev package, refactored into a function that does the computations, and method functions. The function uses evm internally and uses the default options for that function.

Note this function does not extend to assessing model fit when there are covariates included in the model.

See Also

evm

Examples

Run this code

par(mfrow=c(1,2))
plot(gpdRangeFit(rain))

Run the code above in your browser using DataLab