kgaps_stat {exdex}R Documentation

Sufficient statistics for the KK-gaps model

Description

Calculates sufficient statistics for the KK-gaps model for the extremal index θ\theta. Called by kgaps.

Usage

kgaps_stat(data, u, q_u, k = 1, inc_cens = TRUE)

Arguments

data

A numeric vector of raw data.

u

A numeric scalar. Extreme value threshold applied to data.

q_u

A numeric scalar. An estimate of the probability with which the threshold u is exceeded. If q_u is missing then it is calculated using mean(data > u, na.rm = TRUE).

k

A numeric scalar. Run parameter KK, 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 KK-gap equal to zero. Specifically, the KK-gap SS corresponding to an inter-exceedance time of TT is given by S=max(TK,0)S = \max(T - K, 0).

inc_cens

A logical scalar indicating whether or not to include contributions from right-censored inter-exceedance times relating to the first and last observation. It is known that these times are greater than or equal to the time observed. See Attalides (2015) for details.

Details

The sample KK-gaps are S0,S1,...,SN1,SNS_0, S_1, ..., S_{N-1}, S_N, where S1,...,SN1S_1, ..., S_{N-1} are uncensored and S0S_0 and SNS_N are right-censored. Under the assumption that the KK-gaps are independent, the log-likelihood of the KK-gaps model is given by

l(θ;S0,,SN)=N0log(1θ)+2N1logθθq(S0++SN),l(\theta; S_0, \ldots, S_N) = N_0 \log(1 - \theta) + 2 N_1 \log \theta - \theta q (S_0 + \cdots + S_N),

where

The differing treatment of uncensored and right-censored KK-gaps reflects differing contributions to the likelihood. Right-censored KK-gaps that are equal to zero add no information to the likelihood. For full details see Suveges and Davison (2010) and Attalides (2015).

If N1=0N_1 = 0 then we are in the degenerate case where there is one cluster (all KK-gaps are zero) and the likelihood is maximized at θ=0\theta = 0.

If N0=0N_0 = 0 then all exceedances occur singly (all KK-gaps are positive) and the likelihood is maximized at θ=1\theta = 1.

Value

A list containing the sufficient statistics, with components

N0

the number of zero KK-gaps.

N1

contribution from non-zero KK-gaps (see Details).

sum_qs

the sum of the (scaled) KK-gaps, that is, q(S0++SN)q (S_0 + \cdots + S_N), where qq is estimated by the proportion of threshold exceedances.

n_kgaps

the number of KK-gaps that contribute to the log-likelihood.

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 KK-gaps model.

Examples

u <- quantile(newlyn, probs = 0.90)
kgaps_stat(newlyn, u)

[Package exdex version 1.2.3 Index]