statsmodels.tsa.statespace.simulation_smoother.SimulationSmoother.simulation_smoother

SimulationSmoother.simulation_smoother(simulation_output=None, method='kfs', results_class=None, prefix=None, nobs=-1, random_state=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

The prefix of the datatype. Usually only used internally.

nobsint

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.

random_state{None, int, Generator, RandomState}, optional

If seed is None (or np.random), the numpy.random.RandomState singleton is used. If seed is an int, a new numpy.random.RandomState instance is used, seeded with seed. If seed is already a numpy.random.Generator or numpy.random.RandomState instance then that instance is used.

**kwargs

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

Returns:
SimulationSmoothResults

Last update: Dec 16, 2024