Calculates maximum likelihood estimates of the extremal index \(\theta\) based on the \(K\)-gaps model for threshold inter-exceedances times of Holesovsky and Fusek (2019).

cgaps(data, u, D = 0, inc_cens = FALSE)

Arguments

data

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

u

A numeric scalar. Extreme value threshold applied to data.

D

A numeric scalar. Censoring parameter \(D\).

inc_cens

A logical scalar indicating whether or not to include contributions from censored inter-exceedance times relating to the first and last observation.

Value

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

theta

The maximum likelihood estimate (MLE) of \(\theta\).

se

The estimated standard error of the MLE.

ss

The list of summary statistics returned from kgaps_stat.

D, u, inc_cens

The input values of D, u and inc_cens.

call

The call to cgaps.

Details

Add details.

See also

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

kgaps_stat for the calculation of sufficient statistics for the \(K\)-gaps model.

spm for estimation of the extremal index \(\theta\) using a semiparametric maxima method.

iwls: iterated weighted least squares estimator.

Examples

### S&P 500 index u <- quantile(sp500, probs = 0.60) theta <- kgaps(sp500, u) theta
#> #> Call: #> kgaps(data = sp500, u = u) #> #> Estimate of the extremal index theta: #> [1] 0.6953
summary(theta)
#> #> Call: #> kgaps(data = sp500, u = u) #> #> Estimate Std. Error #> theta 0.6953 0.007234
### Newlyn sea surges u <- quantile(newlyn, probs = 0.60) theta <- kgaps(newlyn, u, k= 2) theta
#> #> Call: #> kgaps(data = newlyn, u = u, k = 2) #> #> Estimate of the extremal index theta: #> [1] 0.1756
summary(theta)
#> #> Call: #> kgaps(data = newlyn, u = u, k = 2) #> #> Estimate Std. Error #> theta 0.1756 0.009216