Covariances from DLM

Discussion of State Space and Dynamic Stochastic General Equilibrium Models

Covariances from DLM

Postby jonasdovern » Wed Apr 28, 2010 7:48 am

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
jonasdovern
 
Posts: 68
Joined: Sat Apr 11, 2009 10:30 am

Re: Covariances from DLM

Postby TomDoan » Wed Apr 28, 2010 12:55 pm

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.
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm


Return to State Space Models/DSGE

Who is online

Users browsing this forum: No registered users and 1 guest