Calculate mean residual life and plot it to aid the identification of a threshold over which to fit a generalized Pareto distribution
mrl(data, umin = min(data), umax = max(data) - 0.1, nint = 100,
alpha=.050)
# S3 method for mrl
print(x, ...)
# S3 method for summary.mrl
print(x, ...)
# S3 method for mrl
summary(object, ...)
# S3 method for mrl
plot(x, xlab="Threshold", ylab="Mean excess", ...)
# S3 method for mrl
ggplot(data, mapping, xlab = "Threshold",
ylab = "Mean excess", main=NULL,fill="orange", col="blue",
rug=TRUE, addNexcesses=TRUE, textsize=4, ..., environment)
A list with two components. data
is the original data,
mrl
is a matrix containing information to produce the mean residual
life plot.
A numeric vector.
The minimum value over which to threshold the data.
The maximum value over which to threshold the data.
The number of points at which to compute the plot.
Used to determine coverage of confidence interval to plot. Defaults to plotting a 95% interval.
Arguments to print, summary and plot functions.
Label for the x-axis. Defaults to xlab="Threshold"
.
Label for the y-axis. Defaults to ylab="Mean excess"
.
Optional arguments to plot
.
Colour of the line on the MRL plot.
Whether to add raw data as a rug along axis of plot.
Colour of the pointwise confidence region on the MRL plot.
Main title.
Whether to annotate the plot with the numbers of
excesses over increasing thresholds. Defaults to addNexcesses=TRUE
.
Size of text on the plot (ggplot). Defaults to
textsize=4
.
Not used.
Janet E. Heffernan, Harry Southworth
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).
S. Coles, An Introduction to Statistical Modeling of Extreme Values, Springer, 2001