Performs an information matrix test (IMT) to diagnose misspecification of the \(D\)-gaps model of Holesovsky and Fusek (2020).
Arguments
- data
A numeric vector or numeric matrix of raw data. If
datais 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
datacontains missing values thensplit_by_NAsis used to divide the data into sequences of non-missing values.- u, D
Numeric vectors.
uis a vector of extreme value thresholds applied to data.Dis a vector of values of the left-censoring parameter \(D\), as defined in Holesovsky and Fusek (2020). Seedgaps.Any values in
uthat are greater than all the observations indatawill 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)bylength(D)numeric matrix. Column i contains, for \(D\) =D[i], the values of the information matrix test statistic for the set of thresholds inu. The column names are the values inD. The row names are the approximate empirical percentage quantile levels of the thresholds inu.- p
A
length(u)bylength(D)numeric matrix containing the corresponding \(p\)-values for the test.- theta
A
length(u)bylength(D)numeric matrix containing the corresponding estimates of \(\theta\).- u,D
The input
uandD.
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)