PerturbationDSGEPosterior.impulse_responses#
- PerturbationDSGEPosterior.impulse_responses(*, horizon=40, size=1.0, n_draws=200, seed=None)[source]#
Posterior draws of the responses.
Returns
(states, controls)of shapes(n_draws, n_eps, horizon, n_x)and(n_draws, n_eps, horizon, n_y).Each draw resolves the model at one kept parameter draw, so the band is the posterior of the response and not the response at the posterior mean.
At most
n_keptdraws are used, chosen without replacement, so the leading dimension ismin(n_draws, n_kept).n_drawsis not otherwise validated: zero or a negative value raises NumPy’sValueError.- Parameters:
- Return type:
- Returns:
The state responses and the control responses, indexed by draw, shock, period, and variable.
- Raises:
SpecificationError – If the horizon is not positive.