plot_mrl: Generate a mean residual life plot

Description Usage Arguments Details Examples

View source: R/plot_mrl.R

Description

Plots the mean residual life for a vector of data, with 95% confidence bands

Usage

1
2
plot_mrl(x, qs = c(0, 0.5, 0.75, seq(0.8, 1, by = 0.01)), noopt = FALSE,
  ...)

Arguments

x

Numeric, vector.

qs

Numeric, vector quantiles which will be marked on the x-axis. This does not affect the computation of the mean residual life.

noopt

Logical, should the plot function be called with no additional options? Defaults to FALSE. This would need to be TRUE for full control over the plot.

...

Additional arguments passed to plot().

Details

If the generalized Pareto is a valid model for the tail of a distribution (i.e. given a threshold), then the mean residual life plot should be approximately linear beyond the threshold.

The motivation for using this plot is in threshold selection. By using the plot, one can observe the lowest threshold for which the generalized Pareto may be valid.

If noopt = TRUE, anything regarding the plot can be specified by the user except ylim and the lines.

Examples

1
2
plot_mrl(rnorm(1000))
plot_mrl(rgamma(1000, 1, 1))

mickwar/mwEVT documentation built on May 22, 2019, 9:56 p.m.