statsmodels.tsa.statespace.cfa_simulation_smoother.CFASimulationSmoother¶
- class statsmodels.tsa.statespace.cfa_simulation_smoother.CFASimulationSmoother(model, cfa_simulation_smoother_classes=None)[source]¶
“Cholesky Factor Algorithm” (CFA) simulation smoother
- Parameters:
- model
Representation
The state space model.
- model
Notes
This class allows simulation smoothing by the “Cholesky Factor Algorithm” (CFA) described in [1] and [2], which essentially takes advantage of the existence of an efficient sparse Cholesky factor algorithm for banded matrices that are held in a sparse matrix format.
In particular, this simulation smoother computes the joint posterior mean and covariance matrix for the unobserved state vector all at once, rather than using the recursive computations of the Kalman filter and smoother. It then uses these posterior moments to sample directly from this joint posterior. For some models, it can be more computationally efficient than the simulation smoother based on the Kalman filter and smoother.
Important caveat:
However, this simulation smoother cannot be used with all state space models, including several of the most popular. In particular, the CFA algorithm cannot support degenerate distributions (i.e. positive semi-definite covariance matrices) for the initial state (which is the prior for the first state) or the observation or state innovations.
One practical problem with this algorithm is that an autoregressive term with order higher than one is typically put into state space form by augmenting the states using identities. As identities, these augmenting terms will not be subject to random innovations, and so the state innovation will be degenerate. It is possible to take these higher order terms directly into account when constructing the posterior covariance matrix, but this has not yet been implemented.
Similarly, some state space forms of SARIMA and VARMA models make the observation equation an identity, which is not compatible with the CFA simulation smoothing approach.
This simulation smoother has so-far found most of its use with dynamic factor and stochastic volatility models, which satisfy the restrictions described above.
Not-yet-implemented:
There are several features that are not yet available with this simulation smoother:
It does not yet allow diffuse initialization of the state vector.
It produces simulated states only for exactly the observations in the model (i.e. it cannot produce simulations for a subset of the model observations or for observations outside the model).
References
[1]McCausland, William J., Shirley Miller, and Denis Pelletier. “Simulation smoothing for state-space models: A computational efficiency analysis.” Computational Statistics & Data Analysis 55, no. 1 (2011): 199-212.
[2]Chan, Joshua CC, and Ivan Jeliazkov. “Efficient simulation and integrated likelihood estimation in state space models.” International Journal of Mathematical Modelling and Numerical Optimisation 1, no. 1-2 (2009): 101-120.
- Attributes:
posterior_cov
Posterior covariance of the states conditional on the data
posterior_cov_inv_chol_sparse
Sparse Cholesky factor of inverse posterior covariance matrix
posterior_mean
Posterior mean of the states conditional on the data
Methods
simulate
([variates, update_posterior])Perform simulation smoothing (via Cholesky factor algorithm)
Properties
Posterior covariance of the states conditional on the data
Sparse Cholesky factor of inverse posterior covariance matrix
Posterior mean of the states conditional on the data