MEplot {AoE}R Documentation

Mean-Excess Plot

Description

Draws the mean-excess plot for a given sample.

Usage

MEplot(data, omit = 0, ...)

Arguments

data The sample.
omit Number of largest observations for which the mean-excess function will not be plotted.
... Further arguments passed on to plot.

Details

The mean-excess function of the distribution of the random variable X is defined as

m(x) = E[X - x | X > x]

Its empirical counterpart, the empirical mean-excess function hat{m}(x), is defined by taking expectations with respect to the empirical distribution: for x < max_i (X_i),

hat{m}(x) = Σ_i max(X_i - x, 0) / sum_i I(X_i > x)

The mean-excess plot is the plot of the pairs

(X_i, hat{m}(X_i))

for i = 1, ..., n-1. Often, the points corresponding to the largest order statistics are omitted from the plot; this is the purpose of the argument omit.

For a distribution with extreme-value index gamma < 1,

m(x)/x -> max(gamma/(1-gamma), 0), x -> infinity.

As a consequence, if the empirical mean-excess function is increasing for large x, then this is an indication that the underlying distribution has a heavy tail.

Value

The function is mainly used for its side-effect, which is to plot the mean-excess function. The function invisibly returns a list with two components:

x The x-coordinates of the points in the mean-excess plot.
me The y-coordinates of the points in the mean-excess plot.

Examples

# for exponential data, the mean-excess function is approx. constant:
x <- rexp(n = 100, rate = 1)
MEplot(x)

# for heavy-tailed data, the mean-excess function is increasing:
x <- rburr(n = 100, gamma = 0.5, rho = -1)
MEplot(x, omit = 5)

# the Loss data look heavy-tailed:
data(Loss)
MEplot(Loss)

[Package AoE version 1.0.1 Index]