irf: Impulse response functions

View source: R/irf.R

irfR Documentation

Impulse response functions

Description

Impulse response functions

Usage

irf(x, ...)

## S3 method for class 'qpm_solution'
irf(x, shock = NULL, horizon = 24, size = NULL, vars = NULL, ...)

Arguments

x

A qpm_solution from qpm_solve().

...

Passed to methods.

shock

Shock name(s); default all shocks.

horizon

Number of quarters after impact.

size

Shock size(s). Default is one standard deviation (from the model's sigma); a named vector or a single number can override.

vars

Variables to include; default all declared (non-auxiliary) variables.

Value

A data frame of class qpm_irf in long format with columns shock, variable, horizon, value (deviations from steady state). Printing shows peak effects; plot() draws panel charts.

Examples

sol <- qpm_solve(qpm_template("bkl"))
ir <- irf(sol, shock = "eps_i", horizon = 16)
ir
plot(ir, vars = c("pi", "y_gap", "i", "q"))

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