fevd {bvartools}R Documentation

Forecast Error Variance Decomposition A generic function used to calculate forecast error varianc decompositions.

Description

A plot function for objects of class "bvarfevd".

Usage

fevd(object, ...)

## S3 method for class 'bvarfevd'
plot(x, ...)

Arguments

object

an object of class "bvar".

...

further graphical parameters.

x

an object of class "bvarfevd", usually, a result of a call to fevd.

Examples


# Load data
data("e1")
e1 <- diff(log(e1)) * 100

# Generate model data
model <- gen_var(e1, p = 2, deterministic = 2,
                 iterations = 100, burnin = 10)
# Chosen number of iterations and burnin should be much higher.

# Add prior specifications
model <- add_priors(model)

# Obtain posterior draws
object <- draw_posterior(model)

# Obtain FEVD
vd <- fevd(object, response = "cons")

# Plot
plot(vd)


[Package bvartools version 0.2.4 Index]