estPOT: Estimation of generalized Pareto distributions

View source: R/Prediction.R

estPOTR Documentation

Estimation of generalized Pareto distributions

Description

Bayesian or frequentist estimation of the scale and shape parameters of the continuous or discrete generalized Pareto distribution.

Usage

estPOT(
  data,
  k = 10L,
  pn = NULL,
  type = c("continuous", "discrete"),
  method = c("bayesian", "frequentist"),
  prior = "empirical",
  start = NULL,
  sig0 = NULL,
  nsim = 5000L,
  burn = 1000L,
  p = 0.234,
  optim.method = "Nelder-Mead",
  control = NULL,
  ...
)

Arguments

data

numeric vector of length n containing complete data values (under and above threshold)

k

double indicating the effective sample size. Default: 10

pn

numeric vector containing one or more percentile level at which extreme quantiles are estimated, with p < k/n. Default: NULL

type

string indicating distribution types. Default: c('continuous','discrete')

method

string indicating estimation methods. Default: c('bayesian', 'frequentist')

prior

string indicating prior distribution (uniform or empirical). Default: 'empirical'

start

list of 2 containing starting values for scale and shape parameters. Default: NULL

sig0

double indicating the initial value for the update of the variance in the MCMC algorithm. Default: NULL

nsim

double indicating the total number of iterations of the MCMC algorithm in the Bayesian estimation case. Default: 5000L

burn

double indicating the number of iterations to exclude in the MCMC algorithm of the Bayesian estimation case. Default: 1000L

p

double indicating the desired overall sampler acceptance probability. Default: 0.234

optim.method

string indicating the optimization method in the frequentist estimation case. Default: 'Nelder-Mead'

control

list containing additional parameters for the minimization function optim. Default: NULL

...

other arguments passed to the function

Value

a list with the following elements

  • Bayesian estimation case

    • Q.est matrix with nsim-burn rows and length(pn) columns containing the posterior sample of the extreme quantile estimated at level given in pn

    • post_sample matrix with nsim-burn rows and 2 columns containing the posterior sample of the scale and shape parameters for the continuous or discrete generalized Pareto distribution

    • burn double indicating the number of iterations excluded in the MCMC algorithm

    • straight.reject vector of length nsim-burn+1 indicating the iterations in which the proposed parameters do not respect basic constraints

    • sig.vec vector of length nsim-\lfloor(5 / (p (1 - p)))\rfloor+1 containing the values of the variance updated at each iteration of the MCMC algorithm

    • accept.prob matrix containing the values of acceptance probability (second column) corresponding to specific iterations (first column)

    • msg character string containing an output message on the result of the Bayesian estimation procedure

    • mle vector of length 2 containing the maximum likelihood estimates of the scale and shape parameters of the continuous or discrete generalized Pareto distribution

    • t double indicating the threshold for the generalized Pareto model, corresponding to the n-kth order statistic of the sample

  • Frequentist estimation case

    • est vector of length 2 containing the maximum likelihood estimates of the scale and shape parameters of the continuous or discrete generalized Pareto distribution

    • t double indicating the threshold

    • Q.est vector of dimension length(pn) containing the estimates of the extreme quantile at level given in pn

    • VarCov 2 \times 2 variance-covariance matrix of (gamma, sigma)

    • Q.VC variance of Q.est

    • msg character string containing an output message on the result of the frequentist estimation procedure

References

Dombry, C., S. Padoan and S. Rizzelli (2025). Asymptotic theory for Bayesian inference and prediction: from the ordinary to a conditional Peaks-Over-Threshold method, arXiv:2310.06720v2.

See Also

fpot

Examples

## Not run: 
# generate data
set.seed(1234)
n <- 500
samp <- evd::rfrechet(n,0,3,4)
# set effective sample size and threshold
k <- 50
threshold <- sort(samp,decreasing = TRUE)[k+1]
# preliminary mle estimates of scale and shape parameters
mlest <- evd::fpot(samp, threshold)
# empirical bayes procedure
proc <- estPOT(
  samp,
  k = k,
  pn = c(0.01, 0.005),
  type = "continuous",
  method = "bayesian",
  prior = "empirical",
  start = as.list(mlest$estimate),
  sig0 = 0.1)
 
## End(Not run)

ExtremeRisks documentation built on Nov. 5, 2025, 7:05 p.m.