Learn R Programming

exdex (version 1.0.1)

kgaps: Maximum likelihood estimation for the \(K\)-gaps model

Description

Calculates maximum likelihood estimates of the extremal index \(\theta\) based on the \(K\)-gaps model for threshold inter-exceedances times of Suveges and Davison (2010).

Usage

kgaps(data, u, k = 1, inc_cens = FALSE)

Arguments

data

A numeric vector of raw data. No missing values are allowed.

u

A numeric scalar. Extreme value threshold applied to data.

k

A numeric scalar. Run parameter \(K\), as defined in Suveges and Davison (2010). Threshold inter-exceedances times that are not larger than k units are assigned to the same cluster, resulting in a \(K\)-gap equal to zero. Specifically, the \(K\)-gap \(S\) corresponding to an inter-exceedance time of \(T\) is given by \(S = \max(T - K, 0)\).

inc_cens

A logical scalar indicating whether or not to include contributions from censored inter-exceedance times relating to the first and last observation. See Attalides (2015) for details.

Value

An object (a list) of class c("kgaps", "exdex") containing

theta

The maximum likelihood estimate (MLE) of \(\theta\).

se

The estimated standard error of the MLE.

ss

The list of summary statistics returned from kgaps_stat.

k, u, inc_cens

The input values of k, u and inc_cens.

call

The call to kgaps.

Details

The maximum likelihood estimate of the extremal index \(\theta\) under the \(K\)-gaps model of Suveges and Davison (2010) is calculated. If inc_cens = TRUE then information from censored inter-exceedance times is included in the likelihood to be maximized, following Attalides (2015). The form of the log-likelihood is given in the Details section of kgaps_stat.

It is possible that the estimate of \(\theta\) is equal to 1, and also possible that it is equal to 0. kgaps_stat explains the respective properties of the data that cause these events to occur.

References

Suveges, M. and Davison, A. C. (2010) Model misspecification in peaks over threshold analysis, The Annals of Applied Statistics, 4(1), 203-221. https://doi.org/10.1214/09-AOAS292

Attalides, N. (2015) Threshold-based extreme value modelling, PhD thesis, University College London. http://discovery.ucl.ac.uk/1471121/1/Nicolas_Attalides_Thesis.pdf

See Also

confint.kgaps to estimate confidence intervals for \(\theta\).

kgaps_imt for the information matrix test, which may be used to inform the choice of the pair (u, k).

choose_uk for a diagnostic plot based on kgaps_imt.

kgaps_stat for the calculation of sufficient statistics for the \(K\)-gaps model.

kgaps_post in the revdbayes package for Bayesian inference about \(\theta\) using the \(K\)-gaps model.

spm for estimation of the extremal index \(\theta\) using a semiparametric maxima method.

iwls: iterated weighted least squares estimator.

Examples

Run this code
# NOT RUN {
### S&P 500 index
u <- quantile(sp500, probs = 0.60)
theta <- kgaps(sp500, u)
theta
summary(theta)

### Newlyn sea surges

u <- quantile(newlyn, probs = 0.60)
theta <- kgaps(newlyn, u, k= 2)
theta
summary(theta)
# }

Run the code above in your browser using DataLab