irf_2nd_order: Generalized IRFs Using Second-Order Approximation

View source: R/second-order.R

irf_2nd_orderR Documentation

Generalized IRFs Using Second-Order Approximation

Description

Computes impulse-response functions using the second-order solution. These differ from first-order IRFs because responses depend on the initial state and shock sign.

Usage

irf_2nd_order(sol, shock, size = 1, periods = 40L, initial = NULL)

Arguments

sol

A dsge_solution object with order = 2.

shock

Character. Name of the shock.

size

Numeric. Shock size in standard deviations. Default 1.

periods

Integer. Number of IRF periods. Default 40.

initial

Named numeric vector of initial state deviations. Default is zero (ergodic mean under second-order).

Value

A data frame with columns: period, variable, response, type.


dsge documentation built on Sept. 25, 2026, 5:08 p.m.