Learn R Programming

qrmtools (version 0.0-17)

Hill: Hill Estimator and Plot

Description

Compute the Hill estimator and Hill plot.

Usage

Hill_estimator(x, k = c(10, length(x)), conf.level = 0.95)
Hill_plot(x, k = c(10, length(x)), conf.level = 0.95, Hill.estimator = NULL,
          log = "x", xlim = NULL, ylim = NULL,
          xlab = "Order statistics", ylab = "Tail index",
          CI.col = adjustcolor(1, alpha.f = 0.2), lines.args = list(),
          xaxis2 = TRUE, xlab2 = "Empirical probability", ...)

Value

Hill_estimator():

A five-column matrix containing the indices k, their corresponding empirical probabilities k.prob, the estimated tail indices tail.index, and the lower and upper CI endpoints CI.low and CI.up.

Hill_plot():

Hill plot by side-effect.

Arguments

x

vector of numeric data.

k

vector of length 2, determining the smallest and largest number of order statistics of x to compute the Hill estimator for (the smallest needs to be >= 2). If k is of length 1, k is expanded by length(x).

conf.level

confidence level of the confidence intervals.

Hill.estimator

object as returned by Hill_estimator().

log, xlim, ylim, xlab, ylab

see plot().

CI.col

color of the pointwise asymptotic confidence intervals (CIs); if NA, no CIs are shown.

lines.args

list of additional arguments for the underlying lines() call to draw the Hill estimator.

xaxis2

logical indicating whether a third axis is drawn that shows the empirical probabilities 1-(k-1)/length(x) corresponding to k, so the value of the column k.prob as returned by Hill_estimator().

xlab2

label of the secondary x-axis.

...

additional arguments passed to the underlying plot().

Author

Marius Hofert

Details

See McNeil et al. (2015, Section 5.2.4, (5.23))

References

McNeil, A. J., Frey, R. and Embrechts, P. (2015). Quantitative Risk Management: Concepts, Techniques, Tools. Princeton University Press.

Examples

Run this code
set.seed(271)
X <- rt(1000, df = 3.5)
Y <- X[X > 0]
Hill_plot(Y)
Hill_plot(Y, log = "", CI.col = NA)

Run the code above in your browser using DataLab