Learn R Programming

exdex

Estimation of the Extremal Index

What does exdex do?

The extremal index $\theta$ is a measure of the degree of local dependence in the extremes of a stationary process. The exdex package performs frequentist inference about $\theta$ using two types of methodology.

One type (Northrop, 2015) is based on a model that relates the distribution of block maxima to the marginal distribution of the data, leading to a semiparametric maxima estimator. Two versions of this type of estimator are provided, following Northrop, 2015 and Berghaus and Bücher, 2018. A slightly modified version of the latter is also provided. Estimates are produced using both disjoint and sliding block maxima, the latter providing greater precision of estimation. A graphical block size diagnostic is provided.

The other type of methodology uses a model for the distribution of threshold inter-exceedance times (Ferro and Segers, 2003). Three versions of this type of approach are provided: the iterated weight least squares approach of Süveges (2007), the $K$-gaps model of Süveges and Davison (2010) and a similar approach of Holesovsky and Fusek (2020) that we refer to as D-gaps. For the $K$-gaps and $D$-gaps models the exdex package allows missing values in the data, can accommodate independent subsets of data, such as monthly or seasonal time series from different years, and can incorporate information from censored inter-exceedance times. Graphical diagnostics for the threshold level and the respective tuning parameters $K$ and $D$ are provided.

A simple example

The following code estimates the extremal index using the semiparametric maxima estimators, for an example dataset containing a time series of sea surges measured at Newlyn, Cornwall, UK over the period 1971-1976. The block size of 20 was chosen using a graphical diagnostic provided by choose_b().

library(exdex)
theta <- spm(newlyn, 20)
theta
#> 
#> Call:
#> spm(data = newlyn, b = 20)
#> 
#> Estimates of the extremal index theta:
#>           N2015   BB2018  BB2018b
#> sliding   0.2392  0.3078  0.2578 
#> disjoint  0.2350  0.3042  0.2542
summary(theta)
#> 
#> Call:
#> spm(data = newlyn, b = 20)
#> 
#>                   Estimate Std. Error Bias adj.
#> N2015, sliding      0.2392    0.01990  0.003317
#> BB2018, sliding     0.3078    0.01642  0.003026
#> BB2018b, sliding    0.2578    0.01642  0.053030
#> N2015, disjoint     0.2350    0.02222  0.003726
#> BB2018, disjoint    0.3042    0.02101  0.003571
#> BB2018b, disjoint   0.2542    0.02101  0.053570

Now we estimate $\theta$ using the $K$-gaps model. The threshold $u$ and runs parameter $K$ were chosen using the graphical diagnostic provided by choose_uk().

u <- quantile(newlyn, probs = 0.60)
theta <- kgaps(newlyn, u, k = 2)
theta
#> 
#> Call:
#> kgaps(data = newlyn, u = u, k = 2)
#> 
#> Estimate of the extremal index theta:
#>  theta  
#> 0.1758
summary(theta)
#> 
#> Call:
#> kgaps(data = newlyn, u = u, k = 2)
#> 
#>       Estimate Std. Error
#> theta   0.1758   0.009211

Installation

To get the current released version from CRAN:

install.packages("exdex")

Vignette

See vignette("exdex-vignette", package = "exdex") for an overview of the package.

Copy Link

Version

Install

install.packages('exdex')

Monthly Downloads

713

Version

1.2.3

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Paul Northrop

Last Published

December 2nd, 2023

Functions in exdex (1.2.3)

iwls

Iterated weighted least squares estimation of the extremal index
dgaps_stat

Sufficient statistics for the left-censored inter-exceedances time model
exdex-package

exdex: Estimation of the Extremal Index
kgaps_imt_stat

Statistics for the information matrix test
kgaps_methods

Methods for objects of class "kgaps"
kgaps_confint

Confidence intervals for the extremal index \(\theta\) for "kgaps" objects
kgaps_imt

Information matrix test under the \(K\)-gaps model
iwls_methods

Methods for objects of class "iwls"
exdex-internal

Internal exdex functions
kgaps

Maximum likelihood estimation for the \(K\)-gaps model
plot.choose_b

Plot block length diagnostic for the semiparametric maxima estimator
plot.choose_ud

Plot threshold \(u\) and runs parameter \(D\) diagnostic for the \(D\)-gaps estimator
newlyn

Newlyn sea surges
spm

Semiparametric maxima estimator of the extremal index
spm_methods

Methods for objects of class "spm"
plot.choose_uk

Plot threshold \(u\) and runs parameter \(K\) diagnostic for the \(K\)-gaps estimator
spm_confint

Confidence intervals for the extremal index \(\theta\) for "spm" objects
split_by_NAs

Divides data into parts that contain no missing values
kgaps_stat

Sufficient statistics for the \(K\)-gaps model
sp500

Daily log returns of the Standard and Poor (S&P) 500 index
uccle720

20th century Uccle maximum daily temperatures in July - data frame
uccle

Uccle maximum daily temperatures
uccle720m

20th century Uccle maximum daily temperatures in July - matrix
dgaps_confint

Confidence intervals for the extremal index \(\theta\) for "dgaps" objects
dgaps_methods

Methods for objects of class "dgaps"
cheeseboro

Cheeseboro hourly maximum wind gusts
dgaps

Maximum likelihood estimation using left-censored inter-exceedances times
dgaps_imt_stat

Statistics for the \(D\)-gaps information matrix test
dgaps_imt

Information matrix test under the \(D\)-gaps model
choose_ud

Threshold \(u\) and runs parameter \(D\) diagnostic for the \(D\)-gaps estimator
choose_b

Block length diagnostic for the semiparametric maxima estimator
choose_uk

Threshold \(u\) and runs parameter \(K\) diagnostic for the \(K\)-gaps estimator
all_max_rcpp

Sliding and disjoint block maxima