UnobservedComponentsResult.state_space#

property UnobservedComponentsResult.state_space: _LinearGaussianStateSpace[source]#

The fitted system, re-applicable to data it was not estimated on.

The exact linear-Gaussian emitter: filtering a new series through it reads that series with this decomposition’s estimated variances, and its loglikelihood on the estimation sample reproduces llf. The initial covariance is the approximate-diffuse one the likelihood was computed under.

Example

>>> import numpy as np
>>> rng = np.random.default_rng(0)
>>> y = np.cumsum(0.2 * rng.standard_normal(200)) + rng.standard_normal(200)
>>> res = UnobservedComponents(y).fit()
>>> system = res.state_space
>>> system.k_states, bool(abs(system.loglikelihood(y) - res.llf) < 1e-8)
(1, True)