Title: | Bayesian Estimation of Extreme Value Mixture Models |
---|---|
Description: | Fits extreme value mixture models, which are models for tails not requiring selection of a threshold, for continuous data. It includes functions for model comparison, estimation of quantity of interest in extreme value analysis and plotting. Reference: CN Behrens, HF Lopes, D Gamerman (2004) <doi:10.1191/1471082X04st075oa>. FF do Nascimento, D. Gamerman, HF Lopes <doi:10.1007/s11222-011-9270-z>. |
Authors: | Manuele Leonelli [aut, cre, cph]
|
Maintainer: | Manuele Leonelli <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.0.1 |
Built: | 2025-02-18 06:29:18 UTC |
Source: | https://github.com/manueleleonelli/extrememix |
Plot of the traceplot and autocorrelation function for the 0.99 quantile from the posterior sample.
check_convergence(x, ...) ## S3 method for class 'evmm' check_convergence(x, ...)
check_convergence(x, ...) ## S3 method for class 'evmm' check_convergence(x, ...)
x |
the output of a model estimated with |
... |
additional arguments for compatibility. |
Two plots to check if the estimation with fggpd
and mgpd
converged: traceplot and autocorrelation plot for the 99th quantile of the posterior density.
check_convergence(rainfall_ggpd)
check_convergence(rainfall_ggpd)
Computation of the DIC for an extreme value mixture model
DIC(x, ...) ## S3 method for class 'evmm' DIC(x, ...)
DIC(x, ...) ## S3 method for class 'evmm' DIC(x, ...)
x |
the output of a model estimated with |
... |
additional arguments for compatibility. |
Let denote a dataset and
the likelihood of a parametric model with parameter
. The deviance is defined as
. The deviance information criterion (DIC) is defined as
where is the posterior estimate of
and
is referred to as the effective number of parameters and defined as
Models with a smaller DIC are favored.
The DIC of a model estimated with extrememix
Spiegelhalter, David J., et al. "Bayesian measures of model complexity and fit." Journal of the Royal Statistical Society: Series B 64.4 (2002): 583-639.
DIC(rainfall_ggpd)
DIC(rainfall_ggpd)
Computation of the expected shortfall for an extreme value mixture model
ES(x, ...) ## S3 method for class 'evmm' ES(x, values = NULL, cred = 0.95, ...)
ES(x, ...) ## S3 method for class 'evmm' ES(x, values = NULL, cred = 0.95, ...)
x |
the output of a model estimated with |
... |
additional arguments for compatibility. |
values |
numeric vector of values of which to compute the expected shortfall. |
cred |
amplitude of the posterior credibility interval. |
The expected shortfall is the expectation of a random variable conditional of being larger of a specific Value-at-Risk (quantile). For an extreme value mixture model this is equal to:
A list with the following entries:
quantiles
: a matrix containing the estimated shortfall, the posterior credibility intervals and the empirical estimate.
data
: the dataset used to estimate the expected shortfall.
complete
: a matrix with the expected shortfall for each value in the posterior sample.
Lattanzi, Chiara, and Manuele Leonelli. "A changepoint approach for the identification of financial extreme regimes." Brazilian Journal of Probability and Statistics.
ES(rainfall_ggpd)
ES(rainfall_ggpd)
Fit of the GGPD model using an MCMC algorithm.
fggpd(x, it, start = NULL, var = NULL, prior = NULL, thin = 1, burn = 0)
fggpd(x, it, start = NULL, var = NULL, prior = NULL, thin = 1, burn = 0)
x |
A vector of positive observations. |
it |
Number of iterations of the algorithm. |
start |
A list of starting parameter values. |
var |
A list of starting proposal variances. |
prior |
A list of hyperparameters for the prior distribution. |
thin |
Thinning interval. |
burn |
Burn-in length. |
Estimation of the GGPD is carried out using an adaptive block Metropolis-Hastings algorithm. As standard, the user needs to specify the data to use during estimation, the number of iterations of the algorithm, the burn-in period (by default equal to zero) and the thinning interval (by default equal to one). To run the algorithm it is also needed the choice of the starting values, the starting values of the proposal variances, and the parameters of the prior distribution. If not provided, these are automatically set as follows:
starting values: is chosen by the function
ithresh
of the threshr
package; and
are chosen by the
fpot
function of evd
for data over the threshold; and
are chosen as the maximum likelihood estimate of the Gamma distribution over data below the threshold.
variances: variances are chosen as the standard deviation of the normal distribution whose 0.01 quantile is equal to 0.9 times the starting value of the associated parameter.
prior distributions: the prior distribution for and
is the objective prior
The prior for the threshold is Normal with mean chosen as for the starting values and the standard deviation is chosen so that the 0.05 quantile of the prior is equal to the median of the data. The priors for the parameters
and
are Gammas with mean chosen as for the starting values and shapes equal to 0.001 so to give high prior variances.
The user can also select any of the three inputs above.
The starting values start
must be a list with entries xi
, sigma
, u
, mu
, eta
.
The variances var
must be a list with entries xi
, sigma
, u
, mu
, eta
.
The prior prior
must be a list with entries u
, mu
, eta
all containing a vector of length two (for u
giving the mean and the standard deviation of the Normal prior, for mu
and eta
giving the mean and shape of the Gamma prior).
fggpd
returns a list with three elements:
chain
: a matrix of size (it
- burn
)/thin
5, reporting in each column the posterior sample for each parameter.
var
: a matrix of size it
5 reporting the variance of the proposal distribution for each parameter.
data
: the dataset used for estimation.
Behrens, Cibele N., Hedibert F. Lopes, and Dani Gamerman. "Bayesian analysis of extreme events with threshold estimation." Statistical Modelling 4.3 (2004): 227-244.
do Nascimento, Fernando Ferraz, Dani Gamerman, and Hedibert Freitas Lopes. "A semiparametric Bayesian approach to extreme value estimation." Statistics and Computing 22.2 (2012): 661-675.
## Small number of iterations and burn-in for quick execution data(rainfall) model1 <- fggpd(rainfall, it = 250, burn = 50, thin = 25) start <- list(xi = 0.2, sigma = 2, u = 10, mu = 5, eta = 2) var <- list(xi = 0.01, sigma = 1, u = 3, mu = 3, eta = 1) prior <- list(u = c(22,5), mu = c(4,16), eta = c(0.001,0.001)) model2 <- fggpd(rainfall,it = 250, start = start, var =var, prior = prior)
## Small number of iterations and burn-in for quick execution data(rainfall) model1 <- fggpd(rainfall, it = 250, burn = 50, thin = 25) start <- list(xi = 0.2, sigma = 2, u = 10, mu = 5, eta = 2) var <- list(xi = 0.01, sigma = 1, u = 3, mu = 3, eta = 1) prior <- list(u = c(22,5), mu = c(4,16), eta = c(0.001,0.001)) model2 <- fggpd(rainfall,it = 250, start = start, var =var, prior = prior)
Fit of the MGPD model using an MCMC algorithm.
fmgpd(x, it, k, start = NULL, var = NULL, prior = NULL, thin = 1, burn = 0)
fmgpd(x, it, k, start = NULL, var = NULL, prior = NULL, thin = 1, burn = 0)
x |
A vector of positive observations. |
it |
Number of iterations of the algorithm. |
k |
number of mixture components for the bulk. Must be either 2, 3, or 4. |
start |
A list of starting parameter values. |
var |
A list of starting proposal variance. |
prior |
A list of hyperparameters for the prior distribution. |
thin |
Thinning interval. |
burn |
Burn-in. |
Estimation of the MGPD is carried out using an adaptive block Metropolis-Hastings algorithm. As standard, the user needs to specify the data to use during estimation, the number of mixture components for the bulk, the number of iterations of the algorithm, the burn-in period (by default equal to zero) and the thinning interval (by default equal to one). To run the algorithm it is also needed the choice of the starting values, the starting values of the proposal variances, and the parameters of the prior distribution. If not provided, these are automatically set as follows:
starting values: is chosen by the function
ithresh
of the threshr
package; and
are chosen by the
fpot
function of evd
for data over the threshold; and
are chosen as estimates of the
gammamixEM
function from the mixtools
package; is chosen as the vector with entries
.
variances: variances for and
are chosen as the standard deviation of the normal distribution whose 0.01 quantile is equal to 0.9 times the starting value of the associated parameter. The parameters
and
are sampled jointly and the proposal variance is chosen using the same method as for
with respect to the parameter
. The proposal variance for
is 0.1 and the proposal variance for
is 0.1 if negative and 0.25 if positive.
prior distributions: the prior distribution for and
is the objective prior
The prior for the threshold is Normal with mean chosen as for the starting values and the standard deviation is chosen so that the 0.05 quantile of the prior is equal to the median of the data. The priors for the parameters
and
are Gammas with mean chosen as for the starting values and shapes equal to 0.001 so to give high prior variances. The prior for the weigths is the non-informative Dirichlet with parameter 1.
The user can also select any of the three inputs above.
The starting values start
must be a list with entries xi
, sigma
, u
, mu
, eta
and w
. The length of mu
, eta
and w
must be k
.
The variances var
must be a list with entries xi
, sigma
, u
, mu
and w
. The length of mu
must be k
.
The prior prior
must be a list with entries u
, mu_mu
, mu_eta
, eta_mu
and eta_eta
. u
gives the mean and the standard deviation of the Normal prior for . The vectors of length
k
, mu_mu
and eta_mu
give the prior means of and
, whilst
mu_eta
and eta_eta
give their prior shapes.
fmgpd
returns a list with three elements:
chain
: a matrix of size (it
- burn
)/thin
5, reporting in each column the posterior sample for each parameter.
var
: a matrix of size it
5 reporting the variance of the proposal distribution for each parameter.
data
: the dataset used for estimation.
Behrens, Cibele N., Hedibert F. Lopes, and Dani Gamerman. "Bayesian analysis of extreme events with threshold estimation." Statistical Modelling 4.3 (2004): 227-244.
do Nascimento, Fernando Ferraz, Dani Gamerman, and Hedibert Freitas Lopes. "A semiparametric Bayesian approach to extreme value estimation." Statistics and Computing 22.2 (2012): 661-675.
data(rainfall) ## Small number of iterations and burn-in for quick execution model1 <- fmgpd(rainfall, k = 2, it = 250, burn = 50, thin = 25) start <- list(xi = 0.2, sigma = 2, u = 10, mu = c(2,5), eta = c(2,2) , w = c(0.4,0.6)) var <- list(xi = 0.01, sigma = 1, u = 3, mu = c(3,3), w = 0.01) prior <- list(u = c(22,5), mu_mu = c(2,5), mu_eta = c(0.01,0.01), eta_mu = c(3,3),eta_eta = c(0.01,0.01)) model2 <- fmgpd(rainfall, k= 2, it = 250, start = start, var =var, prior = prior)
data(rainfall) ## Small number of iterations and burn-in for quick execution model1 <- fmgpd(rainfall, k = 2, it = 250, burn = 50, thin = 25) start <- list(xi = 0.2, sigma = 2, u = 10, mu = c(2,5), eta = c(2,2) , w = c(0.4,0.6)) var <- list(xi = 0.01, sigma = 1, u = 3, mu = c(3,3), w = 0.01) prior <- list(u = c(22,5), mu_mu = c(2,5), mu_eta = c(0.01,0.01), eta_mu = c(3,3),eta_eta = c(0.01,0.01)) model2 <- fmgpd(rainfall, k= 2, it = 250, start = start, var =var, prior = prior)
Density, distribution function, quantile function and random generation for the GGPD distribution.
dggpd(x, xi, sigma, u, mu, eta, log = FALSE) pggpd(q, xi, sigma, u, mu, eta, lower.tail = TRUE) qggpd(p, xi, sigma, u, mu, eta, lower.tail = TRUE) rggpd(N, xi, sigma, u, mu, eta)
dggpd(x, xi, sigma, u, mu, eta, log = FALSE) pggpd(q, xi, sigma, u, mu, eta, lower.tail = TRUE) qggpd(p, xi, sigma, u, mu, eta, lower.tail = TRUE) rggpd(N, xi, sigma, u, mu, eta)
x , q
|
vector of quantiles. |
xi |
shape parameter of the tail GPD (scalar). |
sigma |
scale parameter of the tail GPD (scalar). |
u |
threshold parameter of the tail GPD (scalar). |
mu |
mean of the gamma bulk (scalar). |
eta |
shape of the gamma bulk (scalar). |
log |
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are |
p |
vector of probabilities. |
N |
number of observations. |
The GGPD distribution is an extreme value mixture model with density
where is the density of the Gamma parametrized by mean
and shape
,
is the distribution function of the Gamma and
is the density of the Generalized Pareto Distribution, i.e.
where is a shape parameter,
is a scale parameter and
is a threshold.
dggpd
gives the density, pggpd
gives the distribution function, qggpd
gives the quantile function, and rggpd
generates random deviates. The length of the result is determined by N
for rggpd
and by the length of x
, q
or p
otherwise.
Behrens, Cibele N., Hedibert F. Lopes, and Dani Gamerman. "Bayesian analysis of extreme events with threshold estimation." Statistical Modelling 4.3 (2004): 227-244.
dggpd(3, xi = 0.5, sigma = 2, u = 5, mu = 3, eta = 3)
dggpd(3, xi = 0.5, sigma = 2, u = 5, mu = 3, eta = 3)
Computation of the log-likelihood of an extreme value mixture model (thus also AIC
and BIC
are available).
## S3 method for class 'evmm' logLik(object, ...)
## S3 method for class 'evmm' logLik(object, ...)
object |
an object of class |
... |
additional parameters for compatibility. |
The log-likelihood of a model estimated with extrememix
logLik(rainfall_ggpd)
logLik(rainfall_ggpd)
Density, distribution function, quantile function and random generation for the mixture of Gamma distribution.
dmgamma(x, mu, eta, w, log = FALSE) pmgamma(q, mu, eta, w, lower.tail = TRUE) qmgamma(p, mu, eta, w, lower.tail = TRUE) rmgamma(N, mu, eta, w)
dmgamma(x, mu, eta, w, log = FALSE) pmgamma(q, mu, eta, w, lower.tail = TRUE) qmgamma(p, mu, eta, w, lower.tail = TRUE) rmgamma(N, mu, eta, w)
x , q
|
vector of quantiles. |
mu |
means of the gamma mixture components (vector). |
eta |
shapes of the gamma mixture components (vector). |
w |
weights of the gamma mixture components (vector). Must sum to one. |
log |
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are |
p |
vector of probabilities. |
N |
number of observations. |
The Gamma distribution has density
where is the mean of the distribution and
is its shape.
The density of a mixture of Gamma distributions with
components is defined as
where , for
,
,
,
and
.
dmgamma
gives the density, pmgamma
gives the distribution function, qmgamma
gives the quantile function, and rmgamma
generates random deviates.
The length of the result is determined by N
for rmgamma
and by the length of x
, q
or p
otherwise.
Wiper, Michael, David Rios Insua, and Fabrizio Ruggeri. "Mixtures of gamma distributions with applications." Journal of Computational and Graphical Statistics 10.3 (2001): 440-454.
dmgamma(3, mu = c(2,3), eta = c(1,2), w = c(0.3,0.7))
dmgamma(3, mu = c(2,3), eta = c(1,2), w = c(0.3,0.7))
Density, distribution function, quantile function and random generation for the MGPD distribution.
dmgpd(x, xi, sigma, u, mu, eta, w, log = FALSE) pmgpd(q, xi, sigma, u, mu, eta, w, lower.tail = TRUE) qmgpd(p, xi, sigma, u, mu, eta, w, lower.tail = TRUE) rmgpd(N, xi, sigma, u, mu, eta, w)
dmgpd(x, xi, sigma, u, mu, eta, w, log = FALSE) pmgpd(q, xi, sigma, u, mu, eta, w, lower.tail = TRUE) qmgpd(p, xi, sigma, u, mu, eta, w, lower.tail = TRUE) rmgpd(N, xi, sigma, u, mu, eta, w)
x , q
|
vector of quantiles. |
xi |
shape parameter of the tail GPD (scalar). |
sigma |
scale parameter of the tail GPD (scalar). |
u |
threshold parameter of the tail GPD (scalar). |
mu |
means of the gamma mixture components (vector). |
eta |
shapes of the gamma mixture components (vector). |
w |
weights of the gamma mixture components (vector). Must sum to one. |
log |
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are |
p |
vector of probabilities. |
N |
number of observations. |
The MGPD distribution is an extreme value mixture model with density
where is the density of the mixture of Gammas,
is the distribution function of the mixture of Gammas and
is the density of the Generalized Pareto Distribution, i.e.
where is a shape parameter,
is a scale parameter and
is a threshold.
dmgpd
gives the density, pmgpd
gives the distribution function, qmgpd
gives the quantile function, and rmgpd
generates random deviates. The length of the result is determined by N
for rmgpd
and by the length of x
, q
or p
otherwise.
do Nascimento, Fernando Ferraz, Dani Gamerman, and Hedibert Freitas Lopes. "A semiparametric Bayesian approach to extreme value estimation." Statistics and Computing 22.2 (2012): 661-675.
dmgpd(3, xi = 0.5, sigma = 2,5, u = 5, mu = c(2,3), eta = c(1,2), w = c(0.3,0.7))
dmgpd(3, xi = 0.5, sigma = 2,5, u = 5, mu = c(2,3), eta = c(1,2), w = c(0.3,0.7))
Plotting methods for objects created with quant
, ES
, return_level
or VaR
.
## S3 method for class 'quant' plot(x, ylim = NULL, ...) ## S3 method for class 'return_level' plot(x, ylim = NULL, ...) ## S3 method for class 'VaR' plot(x, ylim = NULL, ...) ## S3 method for class 'ES' plot(x, ylim = NULL, ...)
## S3 method for class 'quant' plot(x, ylim = NULL, ...) ## S3 method for class 'return_level' plot(x, ylim = NULL, ...) ## S3 method for class 'VaR' plot(x, ylim = NULL, ...) ## S3 method for class 'ES' plot(x, ylim = NULL, ...)
x |
an object of class |
ylim |
limits of the y-axis. |
... |
additional parameters for compatibility. |
Two types of plot can be output: either a line plot in the case the functions quant
, ES
, return_level
or VaR
where called with more than one value for the input values
, or an histogram otherwise.
Appropriate plots for quantities computed with extrememix
.
plot(return_level(rainfall_ggpd)) ## for line plot plot(return_level(rainfall_ggpd, values = 100)) ## for histogram
plot(return_level(rainfall_ggpd)) ## for line plot plot(return_level(rainfall_ggpd, values = 100)) ## for histogram
Plotting method for objects of class evmm
giving an overview of an estimated model.
## S3 method for class 'evmm' plot(x, ...)
## S3 method for class 'evmm' plot(x, ...)
x |
an object of class |
... |
additional parameters for compatibility. |
The plot
method for objects of class evmm
reports four plots:
An histogram of the posterior distribution of xi.
An histogram of the posterior distribution of sigma.
A line plot of the estimated quantiles, their posterior credibility interval, and the empirical ones.
A plot of the predictive distribution together with the data histogram.
Plots of a model estimated with extrememix
.
plot(rainfall_ggpd)
plot(rainfall_ggpd)
Plotting method for the posterior distribution of the upper bound. No plot is reported if the posterior sample of xi has only positive values (unbounded distribution).
## S3 method for class 'upper_bound' plot(x, xlim = c(min(x$bound), max(x$bound)), ...)
## S3 method for class 'upper_bound' plot(x, xlim = c(min(x$bound), max(x$bound)), ...)
x |
an object of class |
xlim |
limits of the x-axis. |
... |
additional parameters for compatibility. |
A histogram for the posterior estimated upper bound of the distribution.
plot(upper_bound(rainfall_ggpd))
plot(upper_bound(rainfall_ggpd))
Plot of the predictive distribution of an extreme value mixture model.
pred(x, ...) ## S3 method for class 'evmm' pred( x, x_axis = seq(min(x$data), max(x$data), length.out = 1000), cred = 0.95, xlim = c(min(x$data), max(x$data)), ylim = NULL, ... )
pred(x, ...) ## S3 method for class 'evmm' pred( x, x_axis = seq(min(x$data), max(x$data), length.out = 1000), cred = 0.95, xlim = c(min(x$data), max(x$data)), ylim = NULL, ... )
x |
the output of a model estimated with |
... |
additional arguments for compatibility. |
x_axis |
vector of points where to estimate the predictive distribution. |
cred |
amplitude of the posterior credibility interval. |
xlim |
limits of the x-axis. |
ylim |
limits of the y-axis. |
Consider an extreme value mixture model and suppose a sample
from the posterior distribution is available. The predictive distribution at the point
is estimated as
A plot of the estimate of the predictive distribution together with the data histogram.
do Nascimento, Fernando Ferraz, Dani Gamerman, and Hedibert Freitas Lopes. "A semiparametric Bayesian approach to extreme value estimation." Statistics and Computing 22.2 (2012): 661-675.
pred(rainfall_ggpd)
pred(rainfall_ggpd)
Collection of printing methods for various objects created by extrememix
.
## S3 method for class 'evmm' print(x, ...) ## S3 method for class 'summary.ggpd' print(x, ...) ## S3 method for class 'quantile' print(x, ...) ## S3 method for class 'return_level' print(x, ...) ## S3 method for class 'VaR' print(x, ...) ## S3 method for class 'ES' print(x, ...) ## S3 method for class 'upper_bound' print(x, ...)
## S3 method for class 'evmm' print(x, ...) ## S3 method for class 'summary.ggpd' print(x, ...) ## S3 method for class 'quantile' print(x, ...) ## S3 method for class 'return_level' print(x, ...) ## S3 method for class 'VaR' print(x, ...) ## S3 method for class 'ES' print(x, ...) ## S3 method for class 'upper_bound' print(x, ...)
x |
an object created by |
... |
additional arguments for compatibility. |
A printed output of a model estimated with extrememix
.
Computation of posterior quantiles for an extreme value mixture model
quant(x, ...) ## S3 method for class 'evmm' quant(x, values = NULL, cred = 0.95, ...)
quant(x, ...) ## S3 method for class 'evmm' quant(x, values = NULL, cred = 0.95, ...)
x |
the output of a model estimated with |
... |
additional arguments for compatibility. |
values |
numeric vector of values of which to compute the quantile. |
cred |
amplitude of the posterior credibility interval. |
For a random variable the p-quantile is the value
such that
. For an extreme value mixture model this can be computed as
where
and is the distribution function of the bulk, parametrized by
.
A list with the following entries:
quantiles
: a matrix containing the quantiles, the posterior credibility intervals and the empirical estimate.
data
: the dataset used to estimate the quantiles.
complete
: a matrix with the quantiles for each value in the posterior sample.
do Nascimento, Fernando Ferraz, Dani Gamerman, and Hedibert Freitas Lopes. "A semiparametric Bayesian approach to extreme value estimation." Statistics and Computing 22.2 (2012): 661-675.
quant(rainfall_ggpd)
quant(rainfall_ggpd)
Monthly maxima of the daily rainfall (measured in mms) recorded at the Retiro station in the city centre of Madrid, Spain, between 1985 and 2020.
data(rainfall)
data(rainfall)
A positive numeric vector of length 414. Observations where the monthly maxima are zero were discarded.
Instituto de Estadistica, Communidad de Madrid.
Estimated ggpd model over the rainfall dataset
data(rainfall_ggpd)
data(rainfall_ggpd)
A list storing the output of the fggpd function over the rainfall dataset.
Estimated mgpd model over the rainfall dataset
data(rainfall_mgpd)
data(rainfall_mgpd)
A list storing the output of the fmgpd function over the rainfall dataset.
Computation of the return levels for an extreme value mixture model
return_level(x, ...) ## S3 method for class 'evmm' return_level(x, values = NULL, cred = 0.95, ...)
return_level(x, ...) ## S3 method for class 'evmm' return_level(x, values = NULL, cred = 0.95, ...)
x |
the output of a model estimated with |
... |
additional arguments for compatibility. |
values |
numeric vector of values of which to compute the value at risk. |
cred |
amplitude of the posterior credibility interval. |
A return level at units of time is defined as the
quantile.
A list with the following entries:
quantiles
: a matrix containing the estimated return levels, the posterior credibility intervals and the empirical estimate.
data
: the dataset used to estimate the return levels.
complete
: a matrix with the return levels for each value in the posterior sample.
do Nascimento, Fernando Ferraz, Dani Gamerman, and Hedibert Freitas Lopes. "A semiparametric Bayesian approach to extreme value estimation." Statistics and Computing 22.2 (2012): 661-675.
return_level(rainfall_ggpd)
return_level(rainfall_ggpd)
Posterior estimates and credibility intervals for the parameters of extreme value mixture models.
## S3 method for class 'evmm' summary(object, ...)
## S3 method for class 'evmm' summary(object, ...)
object |
an object of class |
... |
additional parameters (compatibility). |
A printed summary of a model estimated with extrememix
or any quantity associated with it.
Computation of the upper bound of the distribution
upper_bound(x, ...) ## S3 method for class 'evmm' upper_bound(x, cred = 0.95, ...)
upper_bound(x, ...) ## S3 method for class 'evmm' upper_bound(x, cred = 0.95, ...)
x |
the output of a model estimated with |
... |
additional arguments for compatibility. |
cred |
amplitude of the posterior credibility interval. |
For an extreme value mixture model with a shape parameter the distribution is right-bounded with upper limit equal to
.
upper_bound
returns a list with entries:
bound
: a sample from the posterior distribution of the upper limit of the model, taken over the posterior values of xi which are negative.
prob
: the posterior probability that the distribution is unbounded.
cred
: the requested amplitude of the posterior credibility intervals.
Coles, Stuart, et al. An introduction to statistical modeling of extreme values. Vol. 208. London: Springer, 2001.
upper_bound(rainfall_ggpd)
upper_bound(rainfall_ggpd)
Computation of the Value-at-Risk for an extreme value mixture model.
VaR(x, ...) ## S3 method for class 'evmm' VaR(x, values = NULL, cred = 0.95, ...)
VaR(x, ...) ## S3 method for class 'evmm' VaR(x, values = NULL, cred = 0.95, ...)
x |
the output of a model estimated with |
... |
additional arguments for compatibility. |
values |
numeric vector of values of which to compute the value at risk. |
cred |
amplitude of the posterior credibility interval. |
The Value-at-Risk for level q\
A list with the following entries:
quantiles
: a matrix containing the estimated value at risk, the posterior credibility intervals and the empirical estimate.
data
: the dataset used to estimate the value at risk.
complete
: a matrix with the value at risk for each value in the posterior sample.
Lattanzi, Chiara, and Manuele Leonelli. "A changepoint approach for the identification of financial extreme regimes." Brazilian Journal of Probability and Statistics.
VaR(rainfall_ggpd)
VaR(rainfall_ggpd)
Computation of the WAIC for an extreme value mixture model.
WAIC(x, ...) ## S3 method for class 'evmm' WAIC(x, ...)
WAIC(x, ...) ## S3 method for class 'evmm' WAIC(x, ...)
x |
the output of a model estimated with |
... |
additional arguments for compatibility. |
Consider a dataset ,
the likelihood of a parametric model with parameter
, and
a sample from the posterior distribution
.
Define
and
Then the Widely Applicable Information Criteria is defined as
Models with a smaller WAIC are favored.
The WAIC of a model estimated with extrememix
Gelman, Andrew, Jessica Hwang, and Aki Vehtari. "Understanding predictive information criteria for Bayesian models." Statistics and computing 24.6 (2014): 997-1016.
Watanabe, Sumio. "A widely applicable Bayesian information criterion." Journal of Machine Learning Research 14.Mar (2013): 867-897.
WAIC(rainfall_ggpd)
WAIC(rainfall_ggpd)