knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "README-" )
The exdex
package uses threshold inter-exceedance times based on the $K$-gaps
model described in Suveges and Davison (2010) and the method described in Northrop (2015) that is based on block maxima to estimate the extremal index. The extremal index measures how strong is the dependence between the threshold exceedances.
You can install exdex from github with:
# install.packages("devtools") devtools::install_github("ConstantinosChr/exdex")
The two main functions in the exdex
are kgaps_mle
and spm_mle
which are used to estimate the extremal index $\theta$. The user chooses the extreme value model and provides the data. Additionally, the user for the $K$-gaps model chooses an extreme value threshold thresh that is applied to data, whereas for the block maxima method he chooses $b$, the block size.
For the $K$-gaps method:
library(exdex) thresh <- quantile(newlyn, probs = 0.90) k_res <- kgaps_mle(newlyn, thresh, conf = 95) k_res$theta_mle k_res$theta_se k_res$theta_ci
For the block maxima method:
library(exdex) spm_mle(newlyn, 20) spm_mle(newlyn, 20, sliding = FALSE)
See vignette("exdex-vignette", package = "exdex")
for an overview of the package.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.