GPD_shape_plot function

Fitted GPD Shape as a Function of the Threshold

Fitted GPD Shape as a Function of the Threshold

Fit GPDs to various thresholds and plot the fitted GPD shape as a function of the threshold.

GPD_shape_plot(x, thresholds = seq(quantile(x, 0.5), quantile(x, 0.99), length.out = 65), estimate.cov = TRUE, conf.level = 0.95, CI.col = adjustcolor(1, alpha.f = 0.2), lines.args = list(), xlim = NULL, ylim = NULL, xlab = "Threshold", ylab = NULL, xlab2 = "Excesses", plot = TRUE, ...)

Arguments

  • x: vector of numeric data.
  • thresholds: numeric vector of thresholds for which to fit a GPD to the excesses.
  • estimate.cov: logical indicating whether confidence intervals are to be computed.
  • conf.level: confidence level of the confidence intervals if estimate.cov.
  • CI.col: color of the pointwise asymptotic confidence intervals (CIs); if NA, no CIs are shown.
  • lines.args: list of arguments passed to the underlying lines() for drawing the shape parameter as a function of the threshold.
  • xlim, ylim, xlab, ylab: see plot().
  • xlab2: label of the secondary x-axis.
  • plot: logical indicating whether a plot is produced.
  • ...: additional arguments passed to the underlying plot().

Returns

Invisibly returns a list containing the thresholds considered, the corresponding excesses and the fitted GPD objects as returned by the underlying fit_GPD_MLE().

Details

Such plots can be used in the peaks-over-threshold method for determining the optimal threshold (as the smallest after which the plot is (roughly) stable).

Author(s)

Marius Hofert

Examples

set.seed(271) X <- rt(1000, df = 3.5) GPD_shape_plot(X)
  • Maintainer: Marius Hofert
  • License: GPL (>= 3) | file LICENCE
  • Last published: 2024-03-04

Useful links