meanExcessPlot: Mean excess plot

Description Usage Arguments Details Value Note Author(s) See Also Examples

View source: R/meanExcessPlot.R

Description

The Mean Excess plot is a graphical method for detecting the threshold (scale parameter) of a Pareto distribution.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
meanExcessPlot(
  x,
  w = NULL,
  probs = NULL,
  interactive = TRUE,
  pch = par("pch"),
  cex = par("cex"),
  col = par("col"),
  bg = "transparent",
  ...
)

Arguments

x

a numeric vector.

w

an optional numeric vector giving sample weights.

probs

an optional numeric vector of probabilities with values in [0,1], defining the quantiles to be plotted. This is useful for large data sets, when it may not be desirable to plot every single point.

interactive

a logical indicating whether the threshold (scale parameter) can be selected interactively by clicking on points. Information on the selected threshold is then printed on the console.

pch, cex, col, bg

graphical parameters for the plot symbol of each data point or quantile (see points).

...

additional arguments to be passed to plot.default.

Details

The corresponding mean excesses are plotted against the values of x (if supplied, only those specified by probs). If the tail of the data follows a Pareto distribution, these observations show a positive linear trend. The leftmost point of a fitted line can thus be used as an estimate of the threshold (scale parameter).

The interactive selection of the threshold (scale parameter) is implemented using identify. For the usual X11 device, the selection process is thus terminated by pressing any mouse button other than the first. For the quartz device (on Mac OS X systems), the process is terminated either by a secondary click (usually second mouse button or Ctrl-click) or by pressing the ESC key.

Value

If interactive is TRUE, the last selection for the threshold is returned invisibly as an object of class "paretoScale", which consists of the following components:

x0

the selected threshold (scale parameter).

k

the number of observations in the tail (i.e., larger than the threshold).

Note

The functionality to account for sample weights and to select the threshold (scale parameter) interactively was introduced in version 0.2.

Author(s)

Andreas Alfons and Josef Holzer

See Also

paretoScale, paretoTail, minAMSE, paretoQPlot, identify

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(eusilc)
# equivalized disposable income is equal for each household
# member, therefore only one household member is taken
eusilc <- eusilc[!duplicated(eusilc$db030),]

# with sample weights
meanExcessPlot(eusilc$eqIncome, w = eusilc$db090)

# without sample weights
meanExcessPlot(eusilc$eqIncome)

laeken documentation built on Oct. 6, 2021, 5:07 p.m.