choose_b {exdex} | R Documentation |
Block length diagnostic for the semiparametric maxima estimator
Description
Creates data for a plot to aid the choice of the block length b
to
supply to spm
. The general idea is to select the smallest
value of b
above which estimates of the extremal index \theta
appear to be constant with respect to b
, taking into account sampling
variability. plot.choose_b
creates the plot.
Usage
choose_b(
data,
b,
bias_adjust = c("BB3", "BB1", "N", "none"),
constrain = TRUE,
varN = TRUE,
level = 0.95,
interval_type = c("norm", "lik"),
conf_scale = c("theta", "log"),
type = c("vertical", "cholesky", "spectral", "none")
)
Arguments
data |
A numeric vector of raw data. No missing values are allowed. |
b |
A numeric scalar. The block size. |
bias_adjust |
A character scalar. Is bias-adjustment of the
raw estimate of |
constrain |
A logical scalar. If |
varN |
A logical scalar. If |
level |
A numeric scalar in (0, 1). The confidence level required. |
interval_type |
A character scalar: |
conf_scale |
A character scalar. If If Any bias-adjustment requested in the original call to |
type |
A character scalar. The argument |
Details
For each block size in b
the extremal index \theta
is estimated using spm
. The estimates of \theta
approximate conf
% confidence intervals for \theta
are
stored for plotting (by plot.choose_b
)
to produce a simple graphical diagnostic to inform the choice of
block size. This plot is used to choose a block size above which the
underlying value of \theta
may be approximately constant.
This is akin to a threshold stability plot: see Chapter 4 of Coles (2001),
for example.
The nature of the calculation of the sampling variances of the estimates
of \theta
(see spm
for details) means that
choose_b
may be a little slow to run if b
contains many
values, particularly if some of them are small.
For very small block sizes it may not be possible to estimate the
confidence intervals. See Details in spm
.
For any such block sizes the intervals will be missing from the plot.
Value
An object of class c("choose_b", "exdex")
containing
theta_sl , theta_dj |
numeric |
lower_sl , lower_dj |
Similarly for the lower limits of the confidence intervals. |
upper_sl , upper_dj |
Similarly for the upper limits of the confidence intervals. |
b |
the input |
call |
the call to |
References
Coles, S. G. (2001) An Introduction to Statistical Modeling of Extreme Values, Springer-Verlag, London. doi:10.1007/978-1-4471-3675-0_3
Northrop, P. J. (2015) An efficient semiparametric maxima estimator of the extremal index. Extremes 18(4), 585-603. doi:10.1007/s10687-015-0221-5
Berghaus, B., Bucher, A. (2018) Weak convergence of a pseudo maximum likelihood estimator for the extremal index. Ann. Statist. 46(5), 2307-2335. doi:10.1214/17-AOS1621
See Also
plot.choose_b
to produce the block length diagnostic
plot.
Examples
# Newlyn seas surges
# Plot like the top left of Northrop (2015)
# Remove the last 14 values because 2880 has lots of factors
b_vals <- c(2,3,4,5,6,8,9,10,12,15,16,18,20,24,30,32,36,40,45,48,54,60)
res <- choose_b(newlyn[1:2880], b_vals)
# Some b are too small for the sampling variance of the sliding blocks
# estimator to be estimated
plot(res)
plot(res, estimator = "BB2018")
plot(res, maxima = "disjoint")
# S&P 500 index: similar to Berghaus and Bucher (2018), Fig 4 top left
b_vals <- c(10, seq(from = 25, to = 350, by = 25), 357)
res500 <- choose_b(sp500, b_vals)
plot(res500, ylim = c(0, 1))
plot(res500, estimator = "BB2018", ylim = c(0, 1))