statsmodels.tsa.vector_ar.svar_model.SVARResults.simulate_var#
- SVARResults.simulate_var(steps=None, offset=None, rng=None, initial_values=None, nsimulations=None)#
Simulate the VAR(p) process for the desired number of steps
- Parameters:
- steps
int,optional number of observations to simulate, this includes the initial observations to start the autoregressive process. If offset is not None, then exog of the model are used if they were provided in the model
- offset
ndarrayorNone,optional If not None, then offset is added as an observation specific intercept to the autoregression. If it is None and either trend (including intercept) or exog were used in the VAR model, then the linear predictor of those components will be used as offset. This should have the same number of rows as steps, and the same number of columns as endogenous variables (neqs).
- rng
int, array_likeofint,numpy.random.Generator,ornumpy.random.RandomState,optional Source of random numbers used for the simulation. If rng is None, a new
Generatoris created using fresh entropy from the operating system. If rng is an int, a newRandomStateinstance is created, seeded with rng; this integer-seeding behavior is deprecated and will change to creating aGeneratorin a future release. If rng is already aGeneratororRandomStateinstance, that instance is used.- seed
int, array_likeofint,numpy.random.Generator,ornumpy.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.
- initial_valuesarray_like,
optional Initial values for use in the simulation. Shape should be (nlags, neqs) or (neqs,). Values should be ordered from less to most recent. Note that this values will be returned by the simulation as the first values of endog_simulated and they will count for the total number of steps.
- nsimulations
int,optional Number of simulations to perform. If nsimulations is None it will perform one simulation and return value will have shape (steps, neqs).
- steps
- Returns:
- endog_simulated
ndarray Endog of the simulated VAR process. Shape will be (nsimulations, steps, neqs) or (steps, neqs) if nsimulations is None.
- endog_simulated