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).

kgaps_mle(data, thresh, k = 1, inc_cens = FALSE, conf = NULL)

Arguments

data

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

thresh

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.

conf

A numeric scalar. If conf is supplied then a conf% likelihood-based confidence interval for \(\theta\) is estimated.

Value

A list containing

  • theta_mle : The maximum likelihood estimate (MLE) of \(\theta\).

  • theta_se : The estimated standard error of the MLE.

  • theta_ci : (If conf is supplied) a numeric vector of length two giving lower and upper confidence limits for \(\theta\).

  • ss : The list of summary statistics returned from kgaps_stats.

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 maximised, following Attalides (2015). The form of the log-likelihood is given in the Details section of kgaps_stats.

References

Suveges, M. and Davison, A. C. (2010) Model misspecification in peaks over threshold analysis, The 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.

See also

kgaps_stats for the calculation of sufficient statistics for the K-gaps model.

Examples

thresh <- quantile(newlyn, probs = 0.90)
# MLE and SE only
kgaps_mle(newlyn, thresh)
#> $theta_mle
#> [1] 0.3779466
#> 
#> $theta_se
#> [1] 0.02275285
#> 
#> $ss
#> $ss$N0
#> [1] 184
#> 
#> $ss$N1
#> [1] 104
#> 
#> $ss$sum_qs
#> [1] 254.5477
#> 
#> 
# MLE, SE and 95% confidence interval
kgaps_mle(newlyn, thresh, conf = 95)
#> $theta_mle
#> [1] 0.3779466
#> 
#> $theta_se
#> [1] 0.02275285
#> 
#> $theta_ci
#> [1] 0.3344465 0.4235232
#> 
#> $ss
#> $ss$N0
#> [1] 184
#> 
#> $ss$N1
#> [1] 104
#> 
#> $ss$sum_qs
#> [1] 254.5477
#> 
#>