View source: R/dsge-var-forecast.R
| forecast.dsge_dsgevar | R Documentation |
Produces unconditional fan-chart forecasts from a DSGE-VAR posterior
returned by bayes_dsge_var or
bayes_dsge_var_mh. For each posterior draw of the VAR
coefficients and innovation covariance, the function iterates the
VAR forward for horizon periods, drawing innovations from the
posterior N(0, \Sigma); quantiles across draws give the fan
chart.
## S3 method for class 'dsge_dsgevar'
forecast(object, horizon = 12L, n_paths = 1L, ...)
## S3 method for class 'dsge_dsgevar_mh'
forecast(object, horizon = 12L, n_paths = 1L, ...)
object |
A |
horizon |
Integer. Forecast horizon. Default 12. |
n_paths |
Integer. Number of forecast paths to simulate per posterior draw (each draw uses fresh innovation shocks). Default 1. |
... |
Additional arguments (currently unused). |
An object of class c("dsge_dsgevar_forecast",
"dsge_forecast") containing:
Tidy data frame (period, variable, value, sd) reporting the posterior mean and standard deviation of the forecast at each (variable, horizon).
Array (horizon x n_var x total_paths) of individual simulated forecast paths.
In-sample data (un-demeaned) for plotting.
Inputs.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.