dgaps | R Documentation |
Calculates maximum likelihood estimates of the extremal index \theta
based on a model for threshold inter-exceedances times of
Holesovsky and Fusek (2020). We refer to this as the D
-gaps model,
because it uses a tuning parameter D
, whereas the related K
-gaps
model of Suveges and Davison (2010) has a tuning parameter K
.
dgaps(data, u, D = 1, inc_cens = TRUE)
data |
A numeric vector or numeric matrix of raw data. If If |
u |
A numeric scalar. Extreme value threshold applied to data. |
D |
A numeric scalar. The censoring parameter |
inc_cens |
A logical scalar indicating whether or not to include
contributions from right-censored inter-exceedance times, relating to the
first and last observations. It is known that these times are greater
than or equal to the time observed.
If |
If inc_cens = FALSE
then the maximum likelihood estimate of
the extremal index \theta
under the D
-gaps model of
Holesovsky and Fusek (2020) is calculated. Under this model
inter-exceedance times that are less than or equal to D
are
left-censored, as a strategy to mitigate model mis-specification resulting
from the fact that inter-exceedance times that are equal to 0 are expected
under the model but only positive inter-exceedance times can be observed
in practice.
If inc_cens = TRUE
then information from the right-censored
first and last inter-exceedance times are also included in the likelihood
to be maximized.
For an explanation of the idea see Attalides (2015). The form of the
log-likelihood is given in the Details section of
dgaps_stat
.
It is possible that the estimate of \theta
is equal to 1, and also
possible that it is equal to 0. dgaps_stat
explains the
respective properties of the data that cause these events to occur.
An object (a list) of class c("dgaps", "exdex")
containing
theta |
The maximum likelihood estimate (MLE) of
|
se |
The estimated standard error of the MLE, calculated
using an algebraic expression for the observed information. If the
estimate of |
se_exp |
The estimated standard error of the MLE,
calculated using an algebraic expression for the expected information.
If the estimate of |
ss |
The list of summary statistics returned from
|
D, u, inc_cens |
The input values of |
max_loglik |
The value of the log-likelihood at the MLE. |
call |
The call to |
Holesovsky, J. and Fusek, M. Estimation of the extremal index using censored distributions. Extremes 23, 197-213 (2020). \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/s10687-020-00374-3")}
Suveges, M. and Davison, A. C. (2010) Model misspecification in peaks over threshold analysis, Annals of Applied Statistics, 4(1), 203-221. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1214/09-AOAS292")}
dgaps_confint
to estimate confidence intervals
for \theta
.
dgaps_methods
for S3 methods for "dgaps"
objects.
dgaps_imt
for the information matrix test, which
may be used to inform the choice of the pair (u, D
).
choose_ud
for a diagnostic plot based on
dgaps_imt
.
dgaps_stat
for the calculation of sufficient
statistics for the D
-gaps model.
### S&P 500 index
u <- quantile(sp500, probs = 0.60)
theta <- dgaps(sp500, u = u, D = 1)
theta
summary(theta)
coef(theta)
nobs(theta)
vcov(theta)
logLik(theta)
### Newlyn sea surges
u <- quantile(newlyn, probs = 0.60)
theta <- dgaps(newlyn, u = u, D = 2)
theta
summary(theta)
### Uccle July temperatures
# Using vector input, which merges data from different years
u <- quantile(uccle720$temp, probs = 0.9, na.rm = TRUE)
theta <- dgaps(uccle720$temp, u = u, D = 2)
theta
# Using matrix input to separate data from different years
u <- quantile(uccle720m, probs = 0.9, na.rm = TRUE)
theta <- dgaps(uccle720m, u = u, D = 2)
theta
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.