Performs an information matrix test (IMT) to diagnose misspecification of the \(D\)-gaps model of Holesovsky and Fusek (2020).

dgaps_imt(data, u, D = 1, inc_cens = TRUE)

Arguments

data

A numeric vector or numeric matrix of raw data. If data is a matrix then the log-likelihood is constructed as the sum of (independent) contributions from different columns. A common situation is where each column relates to a different year.

If data contains missing values then split_by_NAs is used to divide the data into sequences of non-missing values.

u, D

Numeric vectors. u is a vector of extreme value thresholds applied to data. D is a vector of values of the left-censoring parameter \(D\), as defined in Holesovsky and Fusek (2020). See dgaps.

Any values in u that are greater than all the observations in data will be removed without a warning being given.

inc_cens

A logical scalar indicating whether or not to include contributions from right-censored inter-exceedance times, relating to the first and last observations. See dgaps.

Value

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

containing

imt

A length(u) by length(D) numeric matrix. Column i contains, for \(D\) = D[i], the values of the information matrix test statistic for the set of thresholds in u. The column names are the values in D. The row names are the approximate empirical percentage quantile levels of the thresholds in u.

p

A length(u) by length(D) numeric matrix containing the corresponding \(p\)-values for the test.

theta

A length(u) by length(D) numeric matrix containing the corresponding estimates of \(\theta\).

u,D

The input u and D.

Details

The general approach follows Suveges and Davison (2010). The \(D\)-gaps IMT is performed a over grid of all combinations of threshold and \(D\) in the vectors u and D. If the estimate of \(\theta\) is 0 then the IMT statistic, and its associated \(p\)-value is NA.

References

Holesovsky, J. and Fusek, M. Estimation of the extremal index using censored distributions. Extremes 23, 197-213 (2020). doi:10.1007/s10687-020-00374-3

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

See also

dgaps for maximum likelihood estimation of the extremal index \(\theta\) using the \(D\)-gaps model.

Examples

### Newlyn sea surges

u <- quantile(newlyn, probs = seq(0.1, 0.9, by = 0.1))
imt <- dgaps_imt(newlyn, u = u, D = 1:5)

### S&P 500 index

u <- quantile(sp500, probs = seq(0.1, 0.9, by = 0.1))
imt <- dgaps_imt(sp500, u = u, D = 1:5)

### Cheeseboro wind gusts (a matrix containing some NAs)

probs <- c(seq(0.5, 0.98, by = 0.025), 0.99)
u <- quantile(cheeseboro, probs = probs, na.rm = TRUE)
imt <- dgaps_imt(cheeseboro, u = u, D = 1:5)

### Uccle July temperatures

probs <- c(seq(0.7, 0.98, by = 0.025), 0.99)
u <- quantile(uccle720m, probs = probs, na.rm = TRUE)
imt <- dgaps_imt(uccle720m, u = u, D = 1:5)