The last values of the states are so large
Posted: Mon Jan 06, 2014 11:31 am
Dear Tom,
Please help me to see why the last values of the estimated states are very very large in comparison with the others values of the states in this case.
Many thanks for your helps.
*
* Create the matrix
dec frml[rect] a
dec frml[vect] z
dec frml[symm] sw
*
nonlin mu Veta_T ph1 ph2 Veta_C Veta_V
*
frml a = ||1.0,1.0,0.0,0.0|$
0.0,1.0,0.0,0.0|$
0.0,0.0,ph1,ph2|$
0.0,0.0,1.0,0.0||
frml z = ||mu,0.0,0.0,0.0||
frml sw = %diag(||Veta_T,Veta_v,Veta_C||)
compute [vect] c=||1.0,0.0,1.0,0.0||
compute [rect] f=%identity(3)~~%zeros(1,3)
display f
* Initial value
filter(type=hp) PETROL / HP
set gap_hp = PETROL - HP
linreg gap_hp
# gap_hp{1 2}
compute ph1=%beta(1),ph2=%beta(2),Veta_C=%seesq
*
set trend = t
linreg HP
# constant trend
compute mu=%beta(2)
compute Veta_T=0.1*%seesq
*
dlm(presample=ergodic,a=a,z=z,sw=sw,c=c,f=f,y=PETROL,$
method=bfgs,type=filter,vhat=vhat,svhat=svhat,yhat=Yhat) 2000:01 * states vstates
*
*Extract the cycle component and the trend component of growth rate
set Cyclecom 2000:01 *= states(t)(3)
set trendcom 2000:01 *= states(t)(1)
*
graph 1
# Cyclecom
Graph 1
# trendcom
Please help me to see why the last values of the estimated states are very very large in comparison with the others values of the states in this case.
Many thanks for your helps.
*
* Create the matrix
dec frml[rect] a
dec frml[vect] z
dec frml[symm] sw
*
nonlin mu Veta_T ph1 ph2 Veta_C Veta_V
*
frml a = ||1.0,1.0,0.0,0.0|$
0.0,1.0,0.0,0.0|$
0.0,0.0,ph1,ph2|$
0.0,0.0,1.0,0.0||
frml z = ||mu,0.0,0.0,0.0||
frml sw = %diag(||Veta_T,Veta_v,Veta_C||)
compute [vect] c=||1.0,0.0,1.0,0.0||
compute [rect] f=%identity(3)~~%zeros(1,3)
display f
* Initial value
filter(type=hp) PETROL / HP
set gap_hp = PETROL - HP
linreg gap_hp
# gap_hp{1 2}
compute ph1=%beta(1),ph2=%beta(2),Veta_C=%seesq
*
set trend = t
linreg HP
# constant trend
compute mu=%beta(2)
compute Veta_T=0.1*%seesq
*
dlm(presample=ergodic,a=a,z=z,sw=sw,c=c,f=f,y=PETROL,$
method=bfgs,type=filter,vhat=vhat,svhat=svhat,yhat=Yhat) 2000:01 * states vstates
*
*Extract the cycle component and the trend component of growth rate
set Cyclecom 2000:01 *= states(t)(3)
set trendcom 2000:01 *= states(t)(1)
*
graph 1
# Cyclecom
Graph 1
# trendcom