tail_plot {qrmtools} | R Documentation |
Plot a non-parametric tail distribution, possibly overlaid with the Smith estimator.
tail_plot(x, threshold, shape = NULL, scale = NULL, q = NULL, length.out = 129, lines.args = list(), log = "xy", xlim = NULL, ylim = NULL, xlab = "x", ylab = "Tail probability at x", ...)
x |
|
threshold |
|
shape |
|
scale |
|
q |
|
length.out |
length of |
lines.args |
|
log |
|
xlim |
x-axis limits. |
ylim |
y-axis limits. |
xlab |
x-axis label. |
ylab |
y-axis label. |
... |
additional arguments passed to the underlying
|
If both shape
and scale
are provided, tail_plot()
overlays the non-parametric tail estimator (evaluated at the exceedances)
with the corresponding GPD. In this case, tail_plot()
invisibly
returns a list with two two-column matrices, once containing the x-values
and y-values of the non-parametric tail estimator and once containing the
x-values and y-values of the Smith estimator. If shape
or
scale
are NULL
, tail_plot()
invisibly returns
a two-column matrix with the x-values and y-values of the non-parametric
tail estimator.
Marius Hofert
data(fire) u <- 10 # threshold choice tail_plot(fire, threshold = u, log = "", type = "b") # => need log-scale tail_plot(fire, threshold = u, type = "s") # as a step function fit <- fit_GPD_MLE(fire[fire > u] - u) # fit GPD to excesses (POT method) tail_plot(fire, threshold = u, # without log-scale shape = fit$par[["shape"]], scale = fit$par[["scale"]], log = "") tail_plot(fire, threshold = u, # highlights linearity shape = fit$par[["shape"]], scale = fit$par[["scale"]])