Page 1 of 1

state space model

Posted: Mon Oct 26, 2015 2:25 pm
by EviewsUser1
The attached shows an example of a state space model that is giving me very odd results. The variables r and smsv4 should have roughly the same mean but they differ by quite a lot. My smoothed states sv5 and sv6 have big spikes at the beginning. Any idea what is going on?

smpl 1960 2015q2
sspace Kozicki
Kozicki.append gap=sv1+(c(4)/2)*(sv5+sv6)

Kozicki.append @state sv1=c(1)*sv1(-1)+c(2)*sv2(-1)+[ename=e1,var=@exp(c(3))]
Kozicki.append @state sv2=sv1(-1)
Kozicki.append @state sv3=r
Kozicki.append @state sv4=sv4(-1)+[ename=e2,var=@exp(c(5))]
Kozicki.append @state sv5=sv3(-1)-sv4(-1)
Kozicki.append @state sv6=sv5(-1)

Kozicki.append @evar cov(e1,e2)=0
Kozicki.append @mprior svec
Kozicki.ml(maxit=1000)

Kozicki.makestates(t=smooth) sm*

qgraph r smsv4