statsmodels.tsa.statespace.mlemodel.MLEModel.simulate¶

MLEModel.
simulate
(params, nsimulations, measurement_shocks=None, state_shocks=None, initial_state=None)[source]¶ Simulate a new time series following the state space model
Parameters:  params (array_like) – Array of model parameters.
 nsimulations (int) – The number of observations to simulate. If the model is timeinvariant this can be any number. If the model is timevarying, then this number must be less than or equal to the number
 measurement_shocks (array_like, optional) – If specified, these are the shocks to the measurement equation, \(\varepsilon_t\). If unspecified, these are automatically generated using a pseudorandom number generator. If specified, must be shaped nsimulations x k_endog, where k_endog is the same as in the state space model.
 state_shocks (array_like, optional) – If specified, these are the shocks to the state equation, \(\eta_t\). If unspecified, these are automatically generated using a pseudorandom number generator. If specified, must be shaped nsimulations x k_posdef where k_posdef is the same as in the state space model.
 initial_state (array_like, optional) – If specified, this is the state vector at time zero, which should be shaped (k_states x 1), where k_states is the same as in the state space model. If unspecified, but the model has been initialized, then that initialization is used. If unspecified and the model has not been initialized, then a vector of zeros is used. Note that this is not included in the returned simulated_states array.
Returns: simulated_obs – An (nsimulations x k_endog) array of simulated observations.
Return type: array