how to specify ecm code
Posted: Tue Apr 01, 2014 5:32 am
Hi all
I am using eviews 7, and to do some ecm model
how to correctly specifiy the long run and the short run model
only put the short run
or
put also the long run too
the result is different though
and I can not do programmtically to put all the coefficient
here is how to estimate
is there any tips to program ecm model
thanks for the assistance
regards,
ginanjar
I am using eviews 7, and to do some ecm model
how to correctly specifiy the long run and the short run model
only put the short run
Code: Select all
model _bopmodel
_bopmodel.merge eq_dm
_bopmodel.merge eq_dx
_bopmodel.append TB = X - M
put also the long run too
Code: Select all
model _bopmodel
_bopmodel.append EC_M = LOG(M) - (2.31873071534*LOG(Y)-1.92167062414*LOG(E)+7.28343455044)
_bopmodel.append EC_X = LOG(X) - (0.735607626835*LOG(YK)-1.12278185277*LOG(E)+ 9.25927784867)
_bopmodel.merge eq_dm
_bopmodel.merge eq_dx
_bopmodel.append TB = X - M
and I can not do programmtically to put all the coefficient
here is how to estimate
Code: Select all
'--------------------------------
' Estimating imports
'--------------------------------
coef(10) c_m
smpl 2008M1 2013M1
genr ec_m=0
equation eq_m1.ls(p) log(m)=c_m(1)*log(y)+c_m(2)*log(e)
equation eq_m2.ls(p) log(m)=c_m(1)*log(y)+c_m(2)+[ar(1)=c_m(3)]
equation eq_m3.ls(p) log(m)=c_m(1)*log(y)+c_m(2)*log(e)+c_m(3)
equation eq_m4.ls(p) log(m)=c_m(1)*log(y)+c_m(2)*log(e)+c_m(3)+[ar(1)=c_m(4)]
equation eq_m.ls(p) log(m)=c_m(1)*log(y)+c_m(2)*log(e)+c_m(3)+ ec_m
genr ec_m=resid
'short run
coef(10) c_dm
smpl 2008M1 2013M1
genr ec_dm=0
equation eq_dm1.ls(p) dlog(m)=c_dm(1) + c_dm(2)*dlog(e(-1)) + c_dm(3)*dlog(y(-1)) + c_dm(4)*ec_m(-1)
equation eq_dm2.ls(p) dlog(m)=c_dm(1) + c_dm(2)*dlog(e) + c_dm(3)*dlog(y) - c_dm(4)*(log(m(-1)) - c_dm(5)*log(y) - c_dm(6)*log(e)) + c_dm(7)*ec_m(-1)
equation eq_dm.ls(p) dlog(m)=c_dm(1) + c_dm(2)*dlog(e(-1)) + c_dm(3)*dlog(y(-1)) + c_dm(4)*ec_m(-1) + ec_dm
genr ec_dm=resid
'--------------------------------
' Estimating exports
'--------------------------------
coef(10) c_x
smpl 2008M1 2013M1
genr ec_x=0
equation eq_x1.ls(p) log(x)=c_x(1)*log(yk)+c_x(2)
equation eq_x2.ls(p) log(x)=c_x(1)*log(yk)+c_x(2)*log(e)+c_x(3)
equation eq_x3.ls(p) log(x)=c_x(1)*log(yk)+c_x(2)*log(e)+[ar(1)=c_x(3)]
equation eq_x.ls(p) log(x)=c_x(1)*log(yk)+c_x(2)*log(e)+ c_x(3)+ ec_x
genr ec_x=resid
'short run
coef(10) c_dx
smpl 2008M1 2013M1
genr ec_dx=0
equation eq_dx1.ls(p) dlog(x)=c_dx(1) + c_dx(2)*dlog(e(-1)) + c_dx(3)*dlog(yk(-1)) + c_dx(4)*ec_x(-1)
equation eq_dx2.ls(p) dlog(x)=c_dx(1) + c_dx(2)*log(e) + c_dx(3)*log(yk) + c_dx(4)*(log(x(-1)) -c_dx(5)*log(yk) -c_dx(6)*log(e)) + c_dx(7)*ec_x(-1)
equation eq_dx.ls(p) dlog(x)=c_dx(1) + c_dx(2)*dlog(e(-1)) + c_dx(3)*dlog(yk(-1)) + c_dx(4)*ec_x(-1) + ec_dx
genr ec_dx=resid
thanks for the assistance
regards,
ginanjar