add_judgment: Add logged judgment to a forecast

View source: R/judgment.R

add_judgmentR Documentation

Add logged judgment to a forecast

Description

Central-bank forecasts are never raw model output: the desk knows about the announced electricity tariff, the tax change, the one-off the model cannot see. add_judgment() makes that adjustment a first-class, logged operation: you state the change you want (in percentage points, relative to the current forecast), qpmR back-solves the structural shocks needed to support it while keeping the whole forecast model-consistent, records who imposed it and why, and flags judgment that requires implausibly large shocks.

Usage

add_judgment(
  fc,
  ...,
  author = "desk",
  rationale = "",
  anticipated = NULL,
  instruments = NULL
)

Arguments

fc

A qpm_forecast or a qpm_round.

...

Named adjustments: one argument per variable, each a named vector of additions (percentage points, relative to the current forecast) by period, e.g. pi = c("2027-Q1" = 0.4).

author

Who is imposing the judgment (logged).

rationale

Why (logged; make it meaningful – the ledger is the audit trail read back before the policy meeting).

anticipated

Expectation mode for the re-solve; defaults to the forecast's current mode, or unanticipated.

instruments

Shocks allowed to move; defaults to the forecast's current instruments, or all shocks.

Details

Judgment entries are stored as absolute targets, so the ledger is replayable; the full set of conditions and judgment is re-solved jointly each time. Inspect the ledger with judgment_log().

Value

The adjusted qpm_forecast with the entry appended to its judgment ledger.

Examples

sol <- qpm_solve(qpm_template("bkl"))
fc <- qpm_forecast(sol, horizon = 8)
fc2 <- add_judgment(fc, pi = c(h2 = 0.5),
                    author = "desk",
                    rationale = "announced electricity tariff increase")
judgment_log(fc2)

qpmR documentation built on Sept. 29, 2026, 5:10 p.m.