| qpm_block | R Documentation |
A block is a documented, reusable bundle of variables, shocks,
parameters and equations that adapts a template to a country. Blocks
are how a technical-assistance engagement customizes the canonical
model without forking it: add_block() applies one, qpm_diff()
shows exactly what changed, and the result is an ordinary
qpm_model.
qpm_block(
name,
variables = NULL,
shocks = NULL,
params = list(),
sigma = NULL,
equations = NULL,
description = ""
)
name |
Block name, used in printing and in the model's history. |
variables |
New variables, from |
shocks |
New shocks, from |
params |
Named list of new parameters (optional). |
sigma |
Named vector of standard deviations for the new shocks (optional; default 1). |
equations |
Equations, from |
description |
One-line description of what the block does. |
Equations whose left-hand side names a variable that already exists replace that variable's equation; equations for newly declared variables are appended. Left-hand sides must be bare variable names.
An object of class qpm_block.
block_food_cpi(), block_fx_intervention()
b <- qpm_block(
name = "risk premium shifter",
params = list(prem_extra = 0),
equations = eqs(prem ~ rho_prem * prem[-1] +
(1 - rho_prem) * (prem_ss + prem_extra) + eps_prem)
)
m <- add_block(qpm_template("bkl"), b)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.