qpm_compare_models: Compare the behaviour of two or more models

View source: R/compare_models.R

qpm_compare_modelsR Documentation

Compare the behaviour of two or more models

Description

qpm_diff() compares model structure — what a country team changed in the code. This compares model behaviour: the transmission of a given shock and the moments each specification implies. When a calibration is revised, both questions matter, and the second is the one a policy audience asks.

Usage

qpm_compare_models(models, shock = NULL, vars = NULL, horizon = 20)

## S3 method for class 'qpm_model_comparison'
plot(x, vars = NULL, ...)

Arguments

models

A named list of qpm_model or qpm_solution objects.

shock

Shock whose impulse responses are compared. Default: the first shock common to every model.

vars

Variables to compare. Default: those common to all models, capped at the usual headline set.

horizon

Impulse-response horizon.

x

A qpm_model_comparison.

...

Unused.

Value

An object of class qpm_model_comparison holding the impulse responses and, for stationary models, the implied moments.

Examples

base <- qpm_template("bkl")
flat <- qpm_calibrate(base, b2 = 0.05)   # a much flatter Phillips curve
cmp <- qpm_compare_models(list(baseline = base, flat = flat),
                          shock = "eps_y")
cmp
plot(cmp, vars = c("pi", "i"))

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