by orc » Wed Sep 23, 2009 3:18 am
Hi Tom,
Thanks for all your help..But I am still struggling with the model attached :the bivariate model.. data is also attached...I am doing standart Kalman with DLM ..
but there is something wrong and cant get reasonable results..I expect a positive alfa3 and gama1 close to 1..
I use RATS 6.2 so it is a bit different..
Here is my code:
dec rect g(1,5)
input g
0 0 0 0 1
nonlin gama1 alfa1 alfa2 alfa3 sigmac sigmaz sigmaw sigmat=.056*sigmac
compute alfa1=0.5,alfa2=.01,sigmaz=.05263,sigmat=.000276061,sigmaw=0.69,sigmac=0.00492,alfa3=0.8,gama1=0.8000
dec frml[rect] af
dec rect x0
dec frml[rect] swf
dec rect c
dec frml[rect] yf
compute x0=||0.07|0.07|3.96|0.001|0.003||
frml af = ||alfa1,alfa2,0.0,0.0,alfa3|1.0,0.0,0.0,0.0,0.0|0.0,0.0,1.0,1.0,0.0|0.0,0.0,0.0,1.0,0.0|0.0,0.0,0.0,0.0,gama1||
frml swf = %diag(||sigmaw,0.0,sigmaz,sigmat,sigmac||)
compute c=tr(||1.0,0.0,0.0,0,0|0.0,0.0,1.0,0.0,1.0||)
frml yf = ||inflation|lgdpfix||
dlm(method=simplex,type=smooth,a=af,c=c,y=yf,sw=swf,g=g) / states
*
set gap = states(t)(5)
graph 1
# gap 1995:1 2009:2
- Attachments
-
data.xls
- (24.5 KiB) Downloaded 217 times