The last values of the states are so large
The last values of the states are so large
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
Re: The last values of the states are so large
I can't tell much without the full program and the data set. However, your trend model seems rather odd with both a stochastic trend rate (the second state) and an added fixed trend rate (the mu---which here will be a growth rate, not a mean).
Also, have you checked your data?
Also, have you checked your data?
Re: The last values of the states are so large
oh,
I just re-estimate the model without Z option (no fixed trend mu).
and I attached here the full program and the data set
It still has the problem in which the last values (at 2013:03) are too larges for both trend and cycle component.
So,Please tell me what solution could i take to solve this problem?
Thank you very much
I just re-estimate the model without Z option (no fixed trend mu).
and I attached here the full program and the data set
It still has the problem in which the last values (at 2013:03) are too larges for both trend and cycle component.
So,Please tell me what solution could i take to solve this problem?
Thank you very much
- Attachments
-
- PETROL estimate.RPF
- (1.46 KiB) Downloaded 891 times
-
- Petrol.RAT
- (1.25 KiB) Downloaded 895 times
Re: The last values of the states are so large
Didn't you notice that the DLM estimation doesn't converge?
You're trying to fit a model that provides a very poor description of the data. Your model has PETROL as a "local trend" plus an AR(2) cycle, basically a series dominated by a slowing changing trend. Your data don't match that at all---it might have some piecewise trends, but definitely not slowly changing ones.
You're trying to fit a model that provides a very poor description of the data. Your model has PETROL as a "local trend" plus an AR(2) cycle, basically a series dominated by a slowing changing trend. Your data don't match that at all---it might have some piecewise trends, but definitely not slowly changing ones.
Re: The last values of the states are so large
Oh,
Thanks a lot for your advices.
I review the series and try to find the better models.
Can you suggest me one? Please.
Thanks a lot for your advices.
I review the series and try to find the better models.
Can you suggest me one? Please.
Re: The last values of the states are so large
Is there a particular reason that you're doing an unobservable components model rather than a ARIMA model? A simple ARIMA(0,1,||2||) model seems to work fine.
You can get a UC model to fit OK by forcing Veta_T to be zero. However, it doesn't fit as well as the simpler ARIMA model.
You can get a UC model to fit OK by forcing Veta_T to be zero. However, it doesn't fit as well as the simpler ARIMA model.
Re: The last values of the states are so large
Thank you very much,
I've run the model ARIMA(0,1,2) with the armadlm and DLM estimate. Il works better than UC model with Veta_T=0.0.
This result will be take as an exogenous variable of the complete model which i have asked you in the second post.
I hope for a good result.
Many thanks for your advises.
I've run the model ARIMA(0,1,2) with the armadlm and DLM estimate. Il works better than UC model with Veta_T=0.0.
This result will be take as an exogenous variable of the complete model which i have asked you in the second post.
I hope for a good result.
Many thanks for your advises.