statsmodels.tsa.statespace.simulation_smoother.SimulationSmoother.impulse_responses¶
- SimulationSmoother.impulse_responses(steps=10, impulse=0, orthogonalized=False, cumulative=False, direct=False)¶
Impulse response function
- Parameters:
- steps
int
,optional
The number of steps for which impulse responses are calculated. Default is 10. Note that the initial impulse is not counted as a step, so if steps=1, the output will have 2 entries.
- impulse
int
or array_like If an integer, the state innovation to pulse; must be between 0 and k_posdef-1 where k_posdef is the same as in the state space model. Alternatively, a custom impulse vector may be provided; must be a column vector with shape (k_posdef, 1).
- orthogonalizedbool,
optional
Whether or not to perform impulse using orthogonalized innovations. Note that this will also affect custum impulse vectors. Default is False.
- cumulativebool,
optional
Whether or not to return cumulative impulse responses. Default is False.
- steps
- Returns:
- impulse_responses
ndarray
Responses for each endogenous variable due to the impulse given by the impulse argument. A (steps + 1 x k_endog) array.
- impulse_responses
Notes
Intercepts in the measurement and state equation are ignored when calculating impulse responses.
TODO: add note about how for time-varying systems this is - perhaps counter-intuitively - returning the impulse response within the given model (i.e. starting at period 0 defined by the model) and it is not doing impulse responses after the end of the model. To compute impulse responses from arbitrary time points, it is necessary to clone a new model with the appropriate system matrices.