Param Estimator
ImpulseResponseFunction
Calculation of Impulse Response Parameters for various time-series forecasters.
Quickstart
python
from sktime.param_est.impulse import ImpulseResponseFunction
estimator = ImpulseResponseFunction(model=None, steps=1, impulse=0, orthogonalized=False, cumulative=False, anchor=None, transformed=True, includes_fixed=False)Parameters(8)
- modelAny
A previous fitted
sktimetime series forecaster fromsktime.forecasting. See above for the current supportedsktimemodels.- stepsint, optional, default=1
- 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.
- impulseint, str or array_like, optional, default=0
- 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.
- orthogonalizedbool, optional, default=False
- Whether or not to perform impulse using orthogonalized innovations. Note that this will also affect custom impulse vectors.
- cumulativebool, optional, default=False
- Whether or not to return cumulative impulse responses.
- anchorint, str, or datetime, optional, default = #start#
- 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.
- transformedbool, optional, default=True
- Whether or not params is already transformed.
- includes_fixedbool, optional, default=False
- 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.
Examples
>>> from sktime.datasets import load_airline
>>> from sktime.param_est.impulse import ImpulseResponseFunction
>>> from sktime.forecasting.dynamic_factor import DynamicFactor as skdyn
>>> import pandas as pd
>>> X = load_airline ()
>>> X2 = X. shift (1). bfill ()
>>> df = pd. DataFrame ({ "X": X, "X2": X2 })
>>> fitted_model = skdyn (k_factors = 1, factor_order = 2). fit (df)
>>> sktime_irf = ImpulseResponseFunction (fitted_model, orthogonalized = True)
>>> sktime_irf. fit (df) ImpulseResponseFunction(
... )
>>> print (sktime_irf. get_fitted_params ()["irf" ]) [[1414.75907225 1401.6016836 ] [-1.45858745 -1.44502246]]References
- [1 ] Ballarin, G. 2025: Impulse Response Analysis of Structural Nonlinear Time Series Models, https://arxiv.org/html/2305.19089v5 [2 ] Statsmodels (last visited 15/02/2026): https://www.statsmodels.org/stable/generated/statsmodels.tsa.statespace.varmax.VARMAX.impulse_responses.html [3 ] Statsmodels (last visited 15/02/2026): https://www.statsmodels.org/stable/generated/statsmodels.tsa.statespace.dynamic_factor.DynamicFactor.impulse_responses.html [4 ] Statsmodels (last visited 01/03/2026): https://www.statsmodels.org/stable/generated/statsmodels.tsa.vector_ar.irf.IRAnalysis.html