Skip to contents

Specifying a model

Declare a model in R, or start from the canonical small open economy template and check it before you use it.

qpm_model()
Define a quarterly projection model
vars()
Declare the endogenous variables of a model
var()
Declare a model variable with a label and unit
shocks()
Declare the structural shocks of a model
eqs()
Declare model equations
E()
Expectations operator (equation syntax only)
qpm_calibrate()
Update a model's calibration
qpm_template()
Shipped model templates
qpm_lint()
Check a model for common specification problems

Adapting a model to a country

Extension blocks bundle the changes a country needs — disaggregated food inflation, a managed exchange rate — so an adaptation is reviewable as a diff rather than a fork.

qpm_block()
Model extension blocks
add_block()
Apply an extension block to a model
block_food_cpi()
Disaggregated CPI: food and core inflation
block_fx_intervention()
Foreign-exchange intervention (managed float)
qpm_diff()
Compare two models structurally

Solving and model properties

The generalized Schur solution, its diagnostics, and what the model implies about transmission.

qpm_solve()
Solve a model under model-consistent expectations
steady_state()
Steady state of a model or solution
eigen_table()
Generalized eigenvalues of a solved model
irf()
Impulse response functions
fevd() plot(<qpm_fevd>)
Forecast error variance decomposition
model_properties()
Model-implied moments, and how they compare with the data
simulate(<qpm_solution>)
Simulate a solved model
state_space()
State-space representation of a solved model

Filtering the data

Infer the latent states — output gap, neutral rate, equilibrium exchange rate — and the historical shocks behind them.

qpm_filter()
Estimate latent states from data (Kalman filter/smoother)
qpm_decompose() plot(<qpm_decomposition>)
Historical shock decomposition

Forecasting and policy analysis

The baseline projection, assumed paths, alternative scenarios, and judgment as a logged and auditable operation.

qpm_forecast()
Model forecast with uncertainty bands
qpm_condition()
Conditional forecasts: impose paths, back out the shocks
qpm_scenario()
Shock-based alternative scenarios
add_judgment()
Add logged judgment to a forecast
judgment_log()
Print a forecast's judgment ledger
qpm_risk()
Express a balance of risks (skewed fan charts)
risk_log()
Print a forecast's balance-of-risks assessment
posterior_forecast()
Forecast with parameter uncertainty (posterior fan)

Forecast rounds

A round binds model, calibration, data vintage and forecast into one replayable artefact — then answers why the forecast moved, and whether the archive still reproduces.

qpm_round()
Forecast rounds: one replayable artifact per forecast
save_round() load_round() list_rounds()
Save, load, and list forecast rounds
compare_rounds() plot(<qpm_revision>)
Compare two forecast rounds: the revision decomposition
verify_round()
Verify that an archived round still reproduces

Estimation

Priors, posterior sampling over the Kalman-filter likelihood, identification diagnostics and marginal likelihoods.

priors()
Declare priors for Bayesian estimation
qpm_estimate() coef(<qpm_estimate>)
Estimate model parameters (Bayesian or maximum likelihood)
apply_estimate()
Recalibrate a model at an estimate's point values
qpm_identify()
Identification diagnostics (Iskrev-style Jacobian analysis)
marginal_likelihood()
Marginal likelihood of an estimated model

Reporting

The deliverables a policy round is discussed from.

qpm_report()
Write (and optionally render) a monetary policy report
chart_pack()
The standard forecast-round chart pack

Policy experiments

What if the rule were different, and what would history have looked like if it had been followed?

qpm_rule_eval() plot(<qpm_rule_eval>)
Evaluate alternative policy rules
qpm_counterfactual() plot(<qpm_counterfactual>)
Historical counterfactuals
qpm_compare_models() plot(<qpm_model_comparison>)
Compare the behaviour of two or more models

Preparing data

qpm_disaggregate() plot(<qpm_disaggregation>)
Temporal disaggregation of low-frequency data

Configuration

qpm_use_cpp()
Use the compiled Kalman filter

Standard methods

qpmR objects work with the usual R generics, so AIC(), BIC() and ordinary data-frame workflows need no special handling.

logLik(<qpm_filtration>) logLik(<qpm_estimate>)
Log-likelihood of a filtration or an estimate
nobs(<qpm_filtration>) nobs(<qpm_estimate>)
Number of observations
residuals(<qpm_filtration>) fitted(<qpm_filtration>)
One-step-ahead prediction errors and fitted values
vcov(<qpm_estimate>) confint(<qpm_estimate>)
Posterior covariance and credible intervals
summary(<qpm_estimate>)
Summarise an estimate
summary(<qpm_filtration>)
Summarise a filtration

Interoperability and data

write_dynare()
Export a model to a Dynare .mod file
czechia
Czech quarterly macroeconomic dataset
next_quarters()
Generate consecutive quarter labels