Impulse response function
Array of model parameters.
The number of steps for which impulse responses are calculated. Default is 1. Note that for time-invariant models, the initial impulse is not counted as a step, so if steps=1, the output will have 2 entries.
If an integer, the state innovation to pulse; must be between 0 and k_posdef-1. If a str, it indicates which column of df the unit (1) impulse is given. Alternatively, a custom impulse vector may be provided; must be shaped k_posdef x 1.
Whether or not to perform impulse using orthogonalized innovations. Note that this will also affect custum impulse vectors. Default is False.
Whether or not to return cumulative impulse responses. Default is False.
Time point within the sample for the state innovation impulse. Type depends on the index of the given endog in the model. Two special cases are the strings ‘start’ and ‘end’, which refer to setting the impulse at the first and last points of the sample, respectively. Integer values can run from 0 to nobs - 1, or can be negative to apply negative indexing. Finally, if a date/time index was provided to the model, then this argument can be a date string to parse or a datetime type. Default is ‘start’.
New observations of exogenous regressors for our-of-sample periods, if applicable.
Whether or not params is already transformed. Default is True.
If parameters were previously fixed with the fix_params method, this argument describes whether or not params also includes the fixed parameters, in addition to the free parameters. Default is False.
If the model has time-varying design or transition matrices and the combination of anchor and steps implies creating impulse responses for the out-of-sample period, then these matrices must have updated values provided for the out-of-sample steps. For example, if design is a time-varying component, nobs is 10, anchor=1, and steps is 15, a (k_endog x k_states x 7) matrix must be provided with the new design matrix values.
Responses for each endogenous variable due to the impulse given by the impulse argument. For a time-invariant model, the impulse responses are given for steps + 1 elements (this gives the “initial impulse” followed by steps responses for the important cases of VAR and SARIMAX models), while for time-varying models the impulse responses are only given for steps elements (to avoid having to unexpectedly provide updated time-varying matrices).
Simulate a time series according to the given state space model, optionally with specified series for the innovations.
Intercepts in the measurement and state equation are ignored when calculating impulse responses.
- TODO: add an option to allow changing the ordering for the
orthogonalized option. Will require permuting matrices when constructing the extended model.