irf {bvartools} | R Documentation |
Impulse Response Function A generic function used to calculate impulse response functions.
Description
A plot function for objects of class "bvarirf".
Usage
irf(x, ...)
## S3 method for class 'bvarirf'
plot(x, ...)
Arguments
x |
an object of class "bvarirf", usually, a result of a call to |
... |
further graphical parameters. |
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)
# Number of iterations and burnin should be much higher.
# Add prior specifications
model <- add_priors(model)
# Optain posterior draws
object <- draw_posterior(model)
# Calculate IR
ir <- irf(object, impulse = "invest", response = "cons")
# Plot IR
plot(ir)
[Package bvartools version 0.2.4 Index]