Dear Tom:
I had read this paper that estimate double drifts. I also had read another paper "The Clark Model with Correlated Components," with Kum Hwa Oh. January, which estimate UC-ARMA(2,1) with Correlated Components
I slightly modefied MZN's UC-AR(2) to UC-ARMA(2,1) based on previous paper. I modified af,zf,f matrics.
However, I encounter problem. "## MAT6. Trying to Store 2 x 2 Matrix Into VECTOR "
I do not know which is 2 x 2 Matrix. When I estimate UC-arma(2,1) even Uc-arma(2,2) without correlated components, estimation are rightly worked but coef. of MA insignificent.
- Code: Select all
open data lgdp.txt
calendar(q) 1947
data(format=free,org=columns) 1947:01 1998:02 lgdp
set lgdp = 100.0*lgdp
* UC-Ur decomposition with ARMA(2,1) cycle, fixed trend rate.
nonlin mu sn ph1 ph2 th1 se rho
*
dec frml[rect] af
dec frml[vect] zf
dec frml[symm] swf
*
frml af = ||1.0,0.0,0.0,0.0|$
0.0,ph1,ph2,th1|$
0.0,1.0,0.0,0.0|$
0.0,0.0,0.0,0.0||
frml zf = ||mu,0.0,0.0,0.0||
frml swf = %diag(||sn^2|rho*sn*se,se^2||)
*
compute [vect] c=||1.0,1.0,0.0,0.0||
compute [rect] f=||1.0,0.0|$
0.0,1.0|$
0.0,0.0|$
0.0,1.0||
*
* Get initial guess values
filter(type=hp) lgdp / gdp_hp
set gap_hp = lgdp - gdp_hp
linreg gap_hp
# gap_hp{1 2}
compute ph1=%beta(1),ph2=%beta(2),se=sqrt(%seesq)
set trend = t
linreg gdp_hp
# constant trend
compute mu=%beta(2)
compute sn=sqrt(.1*%seesq)
compute th1=0.0
compute rho=0.0
*
dlm(presample=ergodic,a=af,z=zf,sw=swf,c=c,f=f,y=lgdp,method=bfgs,type=filter) / states0
*
*set cycle0 = states0(t)(2)
*set trend0 = states0(t)(1)
*
Regards
Hardmann