| irf.dsge_bayes | R Documentation |
Computes the impulse-response functions (IRFs) from a fitted or solved DSGE model. An IRF traces the dynamic response of control and state variables to a one-standard-deviation shock.
## S3 method for class 'dsge_bayes'
irf(
x,
periods = 20L,
impulse = NULL,
response = NULL,
se = TRUE,
level = 0.95,
n_draws = 200L,
...
)
irf(
x,
periods = 20L,
impulse = NULL,
response = NULL,
se = TRUE,
level = 0.95,
...
)
x |
A |
periods |
Integer. Number of periods to compute. Default is 20. |
impulse |
Character vector of shock names. If |
response |
Character vector of variable names. If |
se |
Logical. If |
level |
Confidence level for bands. Default is 0.95. |
n_draws |
Integer. Number of posterior draws to use for IRF
computation. Default is 200. Set to |
... |
Additional arguments passed to methods. |
An object of class "dsge_irf" containing a data frame with
columns: period, impulse, response, value, and optionally
se, lower, upper.
irf(dsge_bayes): Compute posterior IRFs from a Bayesian DSGE fit.
Returns pointwise posterior median and credible bands.
m <- dsge_model(
obs(y ~ z),
state(z ~ rho * z),
start = list(rho = 0.5)
)
sol <- solve_dsge(m, params = c(rho = 0.8))
irfs <- irf(sol, periods = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.