4.8.6.3.2. statsmodels.tsa.kalmanf.kalmanfilter.kalmanfilter¶
-
statsmodels.tsa.kalmanf.kalmanfilter.
kalmanfilter
(F, A, H, Q, R, y, X, xi10, ntrain, history=False)[source]¶ Returns the negative log-likelihood of y conditional on the information set
Assumes that the initial state and all innovations are multivariate Gaussian.
Parameters: F : array-like
The (r x r) array holding the transition matrix for the hidden state.
A : array-like
The (nobs x k) array relating the predetermined variables to the observed data.
H : array-like
The (nobs x r) array relating the hidden state vector to the observed data.
Q : array-like
(r x r) variance/covariance matrix on the error term in the hidden state transition.
R : array-like
(nobs x nobs) variance/covariance of the noise in the observation equation.
y : array-like
The (nobs x 1) array holding the observed data.
X : array-like
The (nobs x k) array holding the predetermined variables data.
xi10 : array-like
Is the (r x 1) initial prior on the initial state vector.
ntrain : int
The number of training periods for the filter. This is the number of observations that do not affect the likelihood.
Returns: likelihood
The negative of the log likelihood
history or priors, history of posterior
If history is True.
Notes
No input checking is done.