Learn R Programming

texmex (version 2.1)

mrl: Mean residual life plot

Description

Calculate mean residual life and plot it to aid the identification of a threshold over which to fit a generalized Pareto distribution

Usage

mrl(data, umin = min(data), umax = max(data) - 0.1, nint = 100, alpha=.050) "print"(x, ...) "summary"(object, ...) "plot"(x, xlab="Threshold", ylab="Mean excess", ...)

Arguments

data
A numeric vector.
umin
The minimum value over which to threshold the data.
umax
The maximum value over which to threshold the data.
alpha
Used to determine coverage of confidence interval to plot. Defaults to plotting a 95% interval.
nint
The number of points at which to compute the plot.
x, object
Arguments to print, summary and plot functions.
xlab
Label for the x-axis. Defaults to xlab="Threshold".
ylab
Label for the y-axis. Defaults to ylab="Mean excess".
...
Optional arguments to plot

Value

A list with two components. data is the original data, mrl is a matrix containing information to produce the mean residual life plot.

Details

Threshold choice for the fitting of the GPD is guided by the shape of the Mean Residual Life plot. A threshold which is suitably high will have a corresponding mrl plot which is approximately linear in shape above the threshold (up to sampling variation).

References

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