blite | R Documentation |
Performs threshold-based Bayesian inference for 3 aspects of stationary time series extremes: the probability that the threshold is exceeded, the marginal distribution of threshold excesses and the extent of clustering of extremes, as summarised by the extremal index.
blite(
data,
u,
cluster,
k = 1,
inc_cens = TRUE,
ny,
gp_prior = revdbayes::set_prior(prior = "mdi", model = "gp"),
b_prior = revdbayes::set_bin_prior(prior = "jeffreys"),
theta_prior_pars = c(1, 1),
n = 1000,
type = c("vertical", "none"),
...
)
data |
A numeric vector or numeric matrix of raw data. If If |
u |
A numeric scalar. The extreme value threshold applied to the data.
See Details for information about choosing |
cluster |
This argument is used to set the argument If |
k , inc_cens |
Arguments passed to |
ny |
A numeric scalar. The (mean) number of observations per year.
Setting this appropriately is important when making predictive inferences
using |
gp_prior |
A list to specify a prior distribution for the GP parameters
( |
b_prior |
A list to specify a prior distribution for the Bernoulli
parameter |
theta_prior_pars |
A numerical vector of length 2 containing the
respective values of the parameters |
n |
An integer scalar. The size of posterior sample required. |
type |
A character scalar. Either |
... |
Further arguments to be passed to the function
|
See flite
for details of the (adjusted) likelihoods
on which these Bayesian inferences are based.
The likelihood is based on a model for 3 independent aspects.
A Bernoulli(p
u) model
for whether a given observation exceeds the threshold u
.
A generalised Pareto,
GP(\sigma
u,
\xi
), model for the marginal distribution of threshold
excesses.
The K
-gaps model for the extremal index \theta
.
The general approach follows Fawcett and Walshaw (2012).
The contributions to the likelihood for
p
u and
(\sigma
u, \xi
)
are based on the vertically-adjusted likelihoods described in
flite
. This is an example of Bayesian inference using a
composite likelihood Ribatet et al (2012). Priors for
p
u
(\sigma
u, \xi
)
and \theta
are set using the arguments gp_prior
,
b_prior
and theta_prior_pars
.
Currently, only priors where
p
u
(\sigma
u, \xi
)
and \theta
are independent a priori are allowed.
Two tuning parameters need to be chosen: a threshold u
and the
K
-gaps run parameter K
. The exdex
package has a function choose_uk
to inform this
choice.
Random samples are simulated from the posteriors for
p
u and
(\sigma
u, \xi
)
(using ru
) and \theta
(using
kgaps_post
).
An object of class c("blite", "lite", "chandwich")
.
This object is an n
\times 4
matrix containing the
posterior samples, with column names
c("p[u]", "sigma[u]", "xi", "theta")
.
The object also has the attributes "Bernoulli"
, "gp"
,
"theta"
, which provide the fitted model objects returned from
adjust_loglik
(for "Bernoulli"
and
"gp"
) and kgaps
(for "theta"
).
The named input arguments are returned in a list as the attribute
inputs
. If ny
was not supplied then its value is NA
.
The call to blite
is provided in the attribute "call"
.
A call to flite
is used to create adjusted log-likelihoods
for p
u and
(\sigma
u, \xi
).
The object returned from the call is provided as the attribute
"flite_object"
.
Objects inheriting from class "blite"
have coef
,
nobs
, plot
, summary
, vcov
and confint
methods. See bliteMethods
.
predict.blite
can be used to make predictive inferences about
the largest value to be observed in N years.
Fawcett, L. and Walshaw, D. (2012), Estimating return levels from serially dependent extremes. Environmetrics, 23, 272-283. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1002/env.2133")}
Ribatet, M., Cooley, D., & Davison, A. C. (2012). Bayesian inference from composite likelihoods, with an application to spatial extremes. Statistica Sinica, 22(2), 813-845.
bliteMethods
, including plotting the posterior
samples.
predict.blite
to make predictive inferences about
future extreme values.
flite
for frequentist threshold-based inference
for time series extremes.
choose_uk
to inform the choice of the
threshold u
and run parameter K
.
### Cheeseboro wind gusts
cdata <- exdex::cheeseboro
# Each column of the matrix cdata corresponds to data from a different year
# blite() sets cluster automatically to correspond to column (year)
cpost <- blite(cdata, u = 45, k = 3)
summary(cpost)
## Plots of posterior samples
plot(cpost)
## Credible intervals
confint(cpost)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.