gpdThresh: Produce plots to aid threshold selection for GPD models

Description Usage Arguments Details Value

View source: R/threshold.evm.R

Description

Produce plots to aid threshold selection for GPD models

Usage

1
2
3
4
5
6
7
8
9
gpdThresh(
  x,
  umin = quantile(x, 0.05),
  umax = quantile(x, 0.95),
  nint = 25,
  which = 1:2,
  priorParameters = NULL,
  cov = "observed"
)

Arguments

x

A numeric vector.

umin

The minimum value of x to use as a threshold. Defaults to umin=quantile(x, .05).

umax

The maximum value of x to use as a threshold. Defaults to umin=quantile(x, .95).

nint

The number of values of x at which to compute the parameters. Defaults to nint=25.

which

Which plots to produce. If which contains 1, the mean residual life plot is included; if it contains 2, the plots of the generalized Pareto parameters over increasing thresholds are included; if it includes 3, the plot of the EGP3 power parameter is also included. Defaults to including all 3.

priorParameters

A list containing the parameters of the prior distribution, passed through to evm.

cov

How to compute the covariance, passed through to evm. Defaults to cov='observed', but you might want to use cov='numeric' if the computations are unstable.

...

Additional arguments passed to ggplot.

Details

The use of egp3 was experimental. Experience suggests it's better to think carefully about where a sensible threshold might be before using egp3. Note that the dimension of the parameter vector for egp3 is greater than that for gp so that if you use non-NULL prior parameters, the function can't cope. If you really want to use prior parameters, call the functions separately (egp3RangeFit, mrl, gpdRangeFit).

Value

A list of graphical objects created by ggplot.


harrysouthworth/margarita documentation built on Aug. 19, 2021, 5 a.m.