multivariate kalman filter
Posted: Wed Mar 27, 2013 8:25 pm
Hi members of the forum,
I really need help to figure out why my multivariate kalman filter won't run properly. I'm trying to estimate the output gap by specifying the phillips curve, the nairu and the unemployment gap all in a system of equations. When I run the first part which is just the output gap, the singular matrix message appears and when I tried for all the equations, the syntax error appears for the phillips equation.
@signal gdp = trend + ygap + [var = exp(c(1))]
@state trend = trend(-1)+dtrend(-1)+ [var = exp(c(2))]
@state dtrend = dtrend(-1) + [var=exp(c(3))]
@state ygap = c(5)*ygap(-1) + c(6)*ygap2(-1) + [var = exp(c(4))]
@state ygap2 = ygap(-1)
@signal dinf=c(7)*dinf(-1)+c(8)*ungap+c(9)*dtfp_cyc+c(10)*dpoil+[var=exp(c(11))]
@signal un=un_hp+ungap
@state ungap=c(12)*ungap(-1)+ c(13)*ygap+[var=exp(c(14))]
@state un_hp=un_hp(-1)+[var=exp(c(15))]
@state dftp_cyc=[var=exp(c(16))]
@state dpoil = c(17)*dpoil(-1)+[var=exp(c(18))]
Desperately need help. Thanks
I really need help to figure out why my multivariate kalman filter won't run properly. I'm trying to estimate the output gap by specifying the phillips curve, the nairu and the unemployment gap all in a system of equations. When I run the first part which is just the output gap, the singular matrix message appears and when I tried for all the equations, the syntax error appears for the phillips equation.
@signal gdp = trend + ygap + [var = exp(c(1))]
@state trend = trend(-1)+dtrend(-1)+ [var = exp(c(2))]
@state dtrend = dtrend(-1) + [var=exp(c(3))]
@state ygap = c(5)*ygap(-1) + c(6)*ygap2(-1) + [var = exp(c(4))]
@state ygap2 = ygap(-1)
@signal dinf=c(7)*dinf(-1)+c(8)*ungap+c(9)*dtfp_cyc+c(10)*dpoil+[var=exp(c(11))]
@signal un=un_hp+ungap
@state ungap=c(12)*ungap(-1)+ c(13)*ygap+[var=exp(c(14))]
@state un_hp=un_hp(-1)+[var=exp(c(15))]
@state dftp_cyc=[var=exp(c(16))]
@state dpoil = c(17)*dpoil(-1)+[var=exp(c(18))]
Desperately need help. Thanks