statsmodels.tsa.statespace.simulation_smoother.SimulationSmoother.simulation_smoother#

SimulationSmoother.simulation_smoother(simulation_output=None, method='kfs', results_class=None, prefix=None, nobs=-1, rng=None, **kwargs)[source]#

Retrieve a simulation smoother for the statespace model.

Parameters:
simulation_outputint, optional

Determines which simulation smoother output is calculated. Default is all (including state and disturbances).

method{‘kfs’, ‘cfa’}, optional

Method for simulation smoothing. If method=’kfs’, then the simulation smoother is based on Kalman filtering and smoothing recursions. If method=’cfa’, then the simulation smoother is based on the Cholesky Factor Algorithm (CFA) approach. The CFA approach is not applicable to all state space models, but can be faster for the cases in which it is supported.

results_classclass, optional

Default results class to use to save output of simulation smoothing. Default is SimulationSmoothResults. If specified, class must extend from SimulationSmoothResults.

prefixstr, optional

The prefix of the datatype. Usually only used internally.

nobsint, optional

The number of observations to simulate. If set to anything other than -1, only simulation will be performed (i.e. simulation smoothing will not be performed), so that only the generated_obs and generated_state attributes will be available. Default is -1, which uses the number of observations in the model.

rng{None, int, numpy.random.Generator, numpy.random.RandomState}, optional

If rng is None or an int, a new Generator is created (seeded with rng if an int is given). If rng is already a Generator or RandomState instance, that instance is used.

random_state{None, int, array_like[int], numpy.random.Generator, numpy.random.RandomState}, optional

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

**kwargs

Additional keyword arguments, used to set the simulation output. See set_simulation_output for more details.

Returns:
SimulationSmoothResults

Object holding the output of the simulation smoother.