returnLevel {lite} | R Documentation |
Frequentist threshold-based inference for return levels
Description
Calculates point estimates and confidence intervals for m
-year
return levels for stationary time series fitted extreme value model objects
returned from flite
. Two types of interval may be returned:
(a) intervals based on approximate large-sample normality of the maximum
likelihood estimator for return level, which are symmetric about the point
estimate, and (b) profile likelihood-based intervals based on an (adjusted)
log-likelihood.
Usage
returnLevel(
x,
m = 100,
level = 0.95,
ny,
prof = TRUE,
inc = 1/100,
type = c("vertical", "cholesky", "spectral", "none")
)
Arguments
x |
An object inheriting from class |
m |
A numeric scalar. The return period, in years. |
level |
A numeric scalar in (0, 1). The confidence level required for
confidence interval for the |
ny |
A numeric scalar. The (mean) number of observations per year. Setting this appropriately is important. See Details. |
prof |
A logical scalar. Should we calculate intervals based on profile log-likelihood? |
inc |
A numeric scalar in (0, 1/2]. Only relevant if |
type |
A character scalar. The argument |
Details
For information about return levels see the "Introducing lite" vignette.
ny
provides information about the (intended) frequency of
sampling in time, that is, the number of observations that would be
observed in a year if there are no missing values. If the number of
observations may vary between years then ny
should be set equal to
the mean number of observations per year.
Supplying ny
.
The value of ny
may have been set in the call to
flite
. If ny
is supplied by the user in the call to
returnLevel
then this will be used in preference to the value
stored in the fitted model object. If these two values differ then no
warning will be given.
For details of the definition and estimation of return levels see the Inference for return levels vignette.
The profile likelihood-based intervals are calculated by
reparameterising in terms of the m
-year return level and estimating
the values at which the (adjusted) profile log-likelihood reaches
the critical value logLik(x) - 0.5 * stats::qchisq(level, 1)
.
This is achieved by calculating the profile log-likelihood for a sequence
of values of this return level as governed by inc
. Once the profile
log-likelihood drops below the critical value the lower and upper limits
are estimated by interpolating linearly between the cases lying either
side of the critical value. The smaller inc
the more accurate (but
slower) the calculation will be.
Value
A object (a list) of class "returnLevel", "lite"
with the
components
rl_sym , rl_prof |
Named numeric vectors containing the respective
lower 100 |
rl_se |
Estimated standard error of the return level. |
max_loglik , crit , for_plot |
If |
m , level |
The input values of |
ny |
The value of |
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
See Also
returnLevelMethods
, including plotting the (adjusted)
profile log-likelihood for a return level.
Examples
### Cheeseboro wind gusts
# Make inferences
cdata <- exdex::cheeseboro
# Each column of the matrix cdata corresponds to data from a different year
# flite() sets cluster automatically to correspond to column (year)
cfit <- flite(cdata, u = 45, k = 3)
# These data are hourly for one month (January) year so ny = 31 * 24
# Large inc set here for speed, sacrificing accuracy
# Default 95% confidence intervals
rl <- returnLevel(cfit, inc = 1 / 10, ny = 31 * 24)
summary(rl)
rl
oldrl <- plot(rl)
oldrl
# Quickly recalculate/replot the intervals based on profile log-likelihood
# provided that level is smaller than that used to produce rl
newrl <- plot(rl, level = 0.9)
newrl