| qpm_round | R Documentation |
A forecast round binds everything that produced a forecast – the
model and its calibration, the data vintage, the filtration, the
forecast with its conditions and judgment – into one object that can
be saved, reloaded, re-run, and compared with later rounds via
compare_rounds(). This is the object an institution archives: next
quarter, "why did the forecast move?" is answered from the rounds, not
from memory.
qpm_round(
name,
model,
data,
observables = NULL,
horizon = 12,
bands = c(0.5, 0.7, 0.9),
measurement_error = 0,
kappa = 1e+06
)
name |
Round name, e.g. |
model |
A |
data |
Data frame in levels with a |
observables |
Columns treated as observed (default: all columns matching declared variables). |
horizon |
Forecast horizon in quarters. |
bands |
Fan coverage levels. |
measurement_error, kappa |
Passed to |
qpm_round() runs the standard pipeline (solve, filter, baseline
forecast). Conditions, scenarios, and judgment are then applied to the
round directly: qpm_condition(), qpm_scenario(), and
add_judgment() all accept a round and update its forecast.
An object of class qpm_round with elements model, data,
solution, fit, and forecast.
m <- qpm_template("bkl")
sol <- qpm_solve(m)
obs <- simulate(sol, nsim = 40, seed = 1, burn = 20)
obs$period <- next_quarters("2016-Q1", 40)
r <- qpm_round("test round", m, obs[, c("period", "pi", "i", "q")],
horizon = 8)
r
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.