Covariances from DLM

Discussion of State Space and Dynamic Stochastic General Equilibrium Models
jonasdovern
Posts: 97
Joined: Sat Apr 11, 2009 10:30 am

Covariances from DLM

Unread post by jonasdovern »

Hallo,
I want to use the DLM-function to perform the E-step in an EM-algorithm. In my M-step I need to compute E[f_t*f_t-1'] at one point (f_t is the vector of states). Is there an easy way to get Cov(f_t,f_t-1') from DLM?

Best regards, Jonas
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Covariances from DLM

Unread post by TomDoan »

Since the state equation is f(t)=Af(t-1)+Fw(t) and f(t-1) and w(t) are uncorrelated by construction, Ef(t)f(t-1)'=AEf(t-1)f(t-1)'. If there are no unit or unstable roots in A, then Ef(t-1)f(t-1)' is just the ergodic variance for the state space model, which you can compute with %PSDINIT or %DLMINIT.
Post Reply