statsmodels.tsa.vector_ar.irf.IRAnalysis.plot#

IRAnalysis.plot(orth=False, *, impulse=None, response=None, signif=0.05, plot_params=None, figsize=(10, 10), subplot_params=None, plot_stderr=True, stderr_type='asym', repl=1000, rng=None, component=None, err_bands=None)#

Plot impulse responses

Parameters:
orthbool, optional

Compute orthogonalized impulse responses. The default is False.

impulsestr or int, optional

Name or index of the variable providing the impulse. If None, plots impulses from all variables.

responsestr or int, optional

Name or index of the variable affected by the impulse. If None, plots responses of all variables.

signiffloat, optional

Significance level for the confidence interval, between 0 and 1. The default is 0.05, giving a 95% confidence interval.

subplot_paramsdict, optional

To pass to subplot plotting functions. Example: if fonts are too big, pass {‘fontsize’ : 8} or some number to your taste.

plot_paramsdict, optional

Keyword arguments to pass to the individual plotting functions.

figsizetuple of float, optional

Figure size (width, height in inches). The default is (10, 10).

plot_stderrbool, optional

Plot standard impulse response error bands. The default is True.

stderr_type{“asym”, “mc”, “sz1”, “sz2”, “sz3”}, optional

The method used to compute the error bands. “asym” computes asymptotic standard errors and is the default. “mc” computes Monte Carlo standard errors using repl replications. “sz1”, “sz2”, and “sz3” compute Sims-Zha error bands using replications and, optionally, component.

replint, optional

Number of replications for Monte Carlo and Sims-Zha standard errors. The default is 1000.

rngint, array_like of int, numpy.random.Generator, or numpy.random.RandomState, optional

Source of random numbers used for the Monte Carlo replications. If rng is None, a new Generator is created using fresh entropy from the operating system. If rng is an int, a new RandomState instance is created, seeded with rng; this integer-seeding behavior is deprecated and will change to creating a Generator in a future release. If rng is already a Generator or RandomState instance, that instance is used.

seedint, array_like of int, numpy.random.Generator, or numpy.random.RandomState, optional

Deprecated since version 0.15: seed has been deprecated. In-line with SPEC-007, use rng for passing a random number generator or seed.

componentarray_like of int, optional

Index of the principal component to use for the Sims-Zha “sz1”/”sz2” (shape (neqs, neqs)) or “sz3” (length neqs) error bands. If None, the component with the largest eigenvalue is used for each element. Ignored unless stderr_type is “sz1”, “sz2”, or “sz3”.

err_bandsndarray of shape (2, periods + 1, neqs, neqs), optional

Pre-computed error bands. The first dimension contains the lower and upper bounds of the confidence interval, respectively. If provided, the internal calculation of standard errors is bypassed and stderr_type is used only for plot formatting.