kgaps_imt {exdex} | R Documentation |
Information matrix test under the K
-gaps model
Description
Performs the information matrix test (IMT) of Suveges and Davison (2010) to
diagnose misspecification of the K
-gaps model.
Usage
kgaps_imt(data, u, k = 1, inc_cens = TRUE)
Arguments
data |
A numeric vector or numeric matrix of raw data. If If |
u , k |
Numeric vectors. Any values in |
inc_cens |
A logical scalar indicating whether or not to include contributions from censored inter-exceedance times, relating to the first and last observations. See Attalides (2015) for details. |
Details
The K
-gaps IMT is performed a over grid of all
combinations of threshold and K
in the vectors u
and k
. If the estimate of \theta
is 0 then the
IMT statistic, and its associated p
-value is NA
.
For details of the IMT see Suveges and Davison
(2010). There are some typing errors on pages 18-19 that have been
corrected in producing the code: the penultimate term inside {...}
in the middle equation on page 18 should be (c_j(K))^2
, as should
the penultimate term in the first equation on page 19; the {...}
bracket should be squared in the 4th equation on page 19; the factor
n
should be N-1
in the final equation on page 19.
Value
An object (a list) of class c("kgaps_imt", "exdex")
containing
imt |
A |
p |
A |
theta |
A |
u , k |
The input |
References
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
Attalides, N. (2015) Threshold-based extreme value modelling, PhD thesis, University College London. https://discovery.ucl.ac.uk/1471121/1/Nicolas_Attalides_Thesis.pdf
See Also
kgaps
for maximum likelihood estimation of the
extremal index \theta
using the K
-gaps model.
choose_uk
for graphical diagnostic to aid the choice
of the threshold u
and the run parameter K
.
Examples
### Newlyn sea surges
u <- quantile(newlyn, probs = seq(0.1, 0.9, by = 0.1))
imt <- kgaps_imt(newlyn, u = u, k = 1:5)
### S&P 500 index
u <- quantile(sp500, probs = seq(0.1, 0.9, by = 0.1))
imt <- kgaps_imt(sp500, u = u, k = 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 <- kgaps_imt(cheeseboro, u = u, k = 1:5)