smooth_shocks: Extract Smoothed Structural Shocks

View source: R/smoother.R

smooth_shocks.dsge_solutionR Documentation

Extract Smoothed Structural Shocks

Description

Recovers the structural shocks from the smoothed states using the state transition equation: \hat{\varepsilon}_{t+1} = M^+ (x_{t+1|T} - H x_{t|T}) where M^+ is the Moore-Penrose pseudo-inverse of M.

Usage

## S3 method for class 'dsge_solution'
smooth_shocks(x, data, ...)

smooth_shocks(x, ...)

## S3 method for class 'dsge_fit'
smooth_shocks(x, ...)

## S3 method for class 'dsge_bayes'
smooth_shocks(x, ...)

Arguments

x

A dsge_fit or dsge_bayes object.

data

Matrix or data frame of observed data with columns matching the model's observable names. Required when x is a dsge_solution.

...

Additional arguments (currently unused).

Details

From the state transition x_{t+1} = H x_t + M \varepsilon_{t+1}, the smoothed innovation is x_{t+1|T} - H x_{t|T}. The structural shocks are recovered by projecting onto M: \hat{\varepsilon}_{t+1} = (M'M)^{-1} M' (x_{t+1|T} - H x_{t|T}).

Value

An object of class "dsge_smoothed_shocks" containing:

shocks

(T-1) x n_shocks matrix of smoothed structural shocks.

shock_names

Character vector of shock names.


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