| qpm_forecast | R Documentation |
Iterates the solved model forward from an initial state and computes analytic forecast uncertainty from the shock variances,
V_h = P V_{h-1} P' + Q S Q'
giving Gaussian fan bands around the mean path. The result can then be
conditioned on assumed paths with qpm_condition(), shifted by shock
scenarios with qpm_scenario(), or adjusted with logged judgment via
add_judgment().
qpm_forecast(
object,
from = NULL,
horizon = 12,
bands = c(0.5, 0.7, 0.9),
sigma = NULL
)
object |
A |
from |
Initial state: a |
horizon |
Forecast horizon in quarters. |
bands |
Coverage levels for the fan, e.g. |
sigma |
Optional named vector of shock standard deviations. |
An object of class qpm_forecast: a list with paths (long
data frame: variable, h, mean, and lo_*/hi_* per band, in
levels), forecast-period labels in $periods, plus the machinery
needed for conditioning.
sol <- qpm_solve(qpm_template("bkl"))
histq <- simulate(sol, nsim = 40, seed = 7, burn = 20)
fc <- qpm_forecast(sol, from = histq, horizon = 12)
fc
plot(fc, vars = c("pi", "i", "y_gap", "q"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.