Page 1 of 1

Sspace data members: Kalman state covariance

Posted: Sun Mar 12, 2023 6:34 pm
by LaPadre
Hi,

I am wondering if it is possible to provide more specific details on the data members in sspace objects?
Specifically, the state covariances and state error covariances.
Am I right in thinking that @curr_statecov and @sm_statecov are equivalent to what is often written as P_{t|t} and P_{t|T}?
For example, the 'updated (a posteriori) estimate covariance P_{k|k}' in the Wikipedia entry https://en.wikipedia.org/wiki/Kalman_filter

Without the mathematical definition of the data member, it is difficult to be confident in using the correct output.

Many thanks,
-Alex

Re: Sspace data members: Kalman state covariance

Posted: Sun Mar 12, 2023 8:01 pm
by EViews Glenn
Yes. Your understanding is correct.

There are three sets of results, "pred" are the one-step ahead, "curr" are the contemporaneous filtered, and "sm" are the smoothed, as defined in the doc chapter and corresponding to the view and proc menĂºs.

So t|t-1, t|t, and t|T in terms of information sets.

I hope that this answers your question.

Re: Sspace data members: Kalman state covariance

Posted: Mon Mar 13, 2023 3:03 pm
by LaPadre
Thanks.

And can you tell me exactly what the smoothed state error covariance @sm_stateerrcov is?
In the Kalman filter literature it appears that some papers refer to the state covariance matrix @sm_statecov as the 'state error covariance matrix', so without the formal definition also provided the data member is ambiguous (to me at least).

Re: Sspace data members: Kalman state covariance

Posted: Tue Mar 14, 2023 12:10 pm
by EViews Glenn
I see the issue. Those terms, "state covariances" and "state error covariances" line up with what we describe in the documentation, where the states are the alpha and the state errors are the v. So as we indicate in the docs, what we term the state covariances are the P, and the state error covariances are the Q.

Re: Sspace data members: Kalman state covariance

Posted: Tue Mar 14, 2023 12:14 pm
by EViews Glenn
One last note which you probably already know, but I'll mention to help those playing along at home...

If you don't need the full covariances, the state space object views and procs allow you to view and get estimates and standard errors for the states and errors directly.