Learn R Programming

mev (version 2.1)

thselect.egp: Threshold selection based on extended generalized Pareto models

Description

Fit an EGP model to data over a range of candidate thresholds thresh and perform likelihood-based tests of equality for \(\kappa=c\), where \(c=1\) for all regular models and $\(c=0\) for the 'gj-tnorm' and 'logist' models, for which the generalized Pareto special case corresponds to a value of \(\kappa\) occuring on the boundary of the parameter space.

Usage

thselect.egp(
  xdat,
  thresh,
  model = c("pt-beta", "pt-gamma", "pt-power", "gj-tnorm", "gj-beta", "exptilt",
    "logist"),
  type = c("wald", "lrt"),
  level = 0.95,
  transform = FALSE,
  plot = FALSE,
  ...
)

Value

an invisible list of class mev_thselect_egp with elements

  • thresh: vector of threshold candidates

  • thresh0: selected threshold among candidates

  • coef: vector of parameter estimates for \(\kappa\)

  • stat: squared version of the test statistic

  • pval: p-value obtained from the \(\chi^2_1\) approximation

  • level: level of the confidence intervals

  • model: string giving the EGP model family

  • type: type of confidence interval

Arguments

xdat

vector of observations, greater than the threshold

thresh

threshold value

model

a string indicating which extended family to fit

type

choice of test statistic, either wald for Wald-based intervals, or lrt for profile likelihood ratio test.

level

[double] confidence interval level, default to 0.95.

transform

logical; if TRUE and type="wald", intervals for kappa are computed on the log-scale and back-transformed.

plot

[logical] if TRUE, return a plot of p-values against threshold

...

additional arguments, passed to plotting routine

Details

The threshold selection procedure returns chi-square statistics (stat) for Wald or profile likelihood ratio tests, along with p-values (pval) obtained from large sample distribution. The threshold returned is the lowest for which all further higher thresholds fail to reject the null hypothesis of \(\kappa=c\), or equivalently of generalized Pareto tail.

Examples

Run this code
ths <- thselect.egp(
  xdat = rexp(1000),
  thresh = qexp(c(0.8,0.9,0.95)),
  model = "pt-power")
print(ths)
plot(ths)

Run the code above in your browser using DataLab