statsmodels.tsa.statespace.kalman_smoother.KalmanSmoother.smooth#

KalmanSmoother.smooth(smoother_output=None, smooth_method=None, results=None, run_filter=True, prefix=None, complex_step=False, update_representation=True, update_filter=True, update_smoother=True, **kwargs)[source]#

Apply the Kalman smoother to the statespace model.

Parameters:
smoother_outputint, optional

Determines which Kalman smoother output to calculate. Default is all (including state, disturbances, and all covariances).

smooth_methodint, optional

Determines which Kalman smoothing approach to use. Default is the smoother method specified by smooth_method in the current state space model.

resultsclass or object, optional

If a class, then that class is instantiated and returned with the result of both filtering and smoothing. If an object, then that object is updated with the smoothing data. If None, then a SmootherResults object is returned with both filtering and smoothing results.

run_filterbool, optional

Whether or not to run the Kalman filter prior to smoothing. Default is True.

prefixstr

The prefix of the datatype. Usually only used internally.

complex_stepbool, optional

Whether or not to compute the complex-step derivative. Default is False.

update_representationbool, optional

Whether or not to update the state space representation with the current model’s parameters. Default is True.

update_filterbool, optional

Whether or not to update the filter results in the results object with the output of the Kalman filter. Default is True.

update_smootherbool, optional

Whether or not to update the smoother results in the results object with the output of the Kalman smoother. Default is True.

**kwargs

Additional keyword arguments to pass to the Kalman filter. See KalmanFilter.filter for more details.

Returns:
SmootherResults object