level or first difference in the VECM

Questions and discussions on Vector Autoregressions
ege_man
Posts: 85
Joined: Sat Jul 07, 2012 2:39 pm

level or first difference in the VECM

Unread post by ege_man »

Dear Tom,
I estimated the following model and found three cointegrating vectors. But I am confused about the use of level or first differenced data. Should use the following VAR model with ect instruction or estimate the same model with the first differenced endogenous variables in line with the specification of error correction model?
Regards

Code: Select all

open data 28_sept_level.xlsx
calendar(m) 1994
data(format=xlsx,org=columns) 1994:2 2015:6
table
compute p =2
compute k =5
compute  nstep= 16
@johmle(lags=2,det=rc,vectors=cvectors)
# int lm2 ltl lcpi lip
equation(coeffs=%xcol(cvectors,1)) ect1 *
# int lm2 ltl lcpi lip constant
equation(coeffs=%xcol(cvectors,2)) ect2 *
# int lm2 ltl lcpi lip constant
equation(coeffs=%xcol(cvectors,3)) ect3 *
# int lm2 ltl lcpi lip constant
set dlip = lip - lip{1}
set dlcpi = lcpi - lcpi{1}
set dlm2 = lm2 - lm2{1}
set dltl = ltl - ltl{1}
set dint = int - int{1}
*
system(model=creditmodel)
variables int lm2 ltl lcpi lip
lags 1 to 2
det constant crisis 
ect ect1 ect2 ect3
end(system, cv=cvlin)
estimate(resids=varresids, noprint, OUTSIGMA=vlin)
impulse(model=creditmodel,window="Impulse Responses", steps=nstep)
source mcvardodraws3.src
@MCVARDoDraws3(model=creditmodel, steps=16)
@MCProcessIRF(model=creditmodel,irf=irflin,center=mean, lower=lowerlin, upper = upperlin, STDDEV=.75)
@MCGraphIRF(model=creditmodel,center=mean, page= byshock,header='linear',STDDEV=1,INCLUDE=||3,4,5||)
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: level or first difference in the VECM

Unread post by TomDoan »

You have that set up correctly. Note the phrase I put in italics:
User's Guide wrote:To estimate a VAR in error correction form, start out as if you were doing the standard
form (30). That is, your variables aren’t differenced, and you count the number
of lags you want on the undifferenced variables. Create the error correction equations,
and use ECT to add them to the system. You don’t have to fill in the coefficients
when setting up the var, but you at least need to have created the equations.
ege_man
Posts: 85
Joined: Sat Jul 07, 2012 2:39 pm

Re: level or first difference in the VECM

Unread post by ege_man »

Dear Tom
Thanks. I need to also use exogenous variables in the cointegration test. As I understand johmle procedure does no allow the introduction of exogenous variables. So I write the following code based on CATS. Can I introduce cats equations to the ecm model like this? When running the code I get the following error just after the cats instruction. Could you please tell me what is wrong?
## I2. Expected Instruction Here
>>>>#<<<<

Regards

Code: Select all

open data 28_sept_2015_level_gr.xlsx
calendar(m) 1994
data(format=xlsx,org=columns) 1994:2 2015:6
table
compute qex =1
compute p =2
compute k =5
compute  nstep= 16
@VARLagSelect(lags=12,crit=hq)
# int lm2 ltl lcpi lip

@CATS(LAGS=2,DETTREND=CIDRIFT,r=2,nomenu,export=ecm,dummy)
# INT LM2 LTL LCPI LIP
# lipus{1 to qex} lcompri{1 to qex} ffr{1 to qex}
# crisis 
com catseq1= %CATSeq(1)
com catseq2= %CATSeq(2)
disp catseq1
disp catseq2
system(model=creditmodel)
variables int lm2 ltl lcpi lip
lags 1 to p
det constant crisis lipus{1 to qex} lcompri{1 to qex} ffr{1 to qex}
ect catseq1 catseq2
end(system, cv=cvlin)
estimate(resids=varresids, noprint, OUTSIGMA=vlin)
impulse(model=creditmodel,window="Impulse Responses", steps=nstep)
@MCVARDoDraws(model=creditmodel, steps=16)
@MCProcessIRF(model=creditmodel,irf=irflin,center=mean, lower=lowerlin, upper = upperlin, STDDEV=.75)
@MCGraphIRF(model=creditmodel,center=mean, page= byshock,header='linear',STDDEV=1,INCLUDE=||3,4,5||)
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: level or first difference in the VECM

Unread post by TomDoan »

You're missing the EXO option, and you also have the exogenous variables in the wrong form---the (weakly) exogenous variables are listed similar to the endogenous variables, as they are treated just like the endogenous variables except they aren't included directly in the likelihood. (That is, you just want

# lipus lcompri ffr
ege_man
Posts: 85
Joined: Sat Jul 07, 2012 2:39 pm

Re: level or first difference in the VECM

Unread post by ege_man »

Dear Tom
I made your suggested changes. The code is running without any error. Could you please tell me cats equations are exported successfully? Should I have to introduce all the exogenous variables like below? Is there any instruction to obtain rank statistics trace and eigenvalue without using rank test statistics in the I1) menu?
Regards

Code: Select all

open data 28_sept_level_gr.xlsx
calendar(m) 1994
data(format=xlsx,org=columns) 1994:2 2015:6
table
compute p =2
compute k =5
compute  nstep= 24
@VARLagSelect(lags=12,crit=sbc)
# int lm2 ltl lcpi lip
*
@CATS(LAGS=p,DETTREND=CIDRIFT,r=2,nomenu,export=ecm,exo,dummy)
# INT LM2 LTL LCPI LIP
# lipus lcompri ffr 
# crisis
com catseq1= %CATSeq(1)
com catseq2= %CATSeq(2)
*
system(model=creditmodel)
variables int lm2 ltl lcpi lip
lags 1 to p
det constant  lipus{1 to p} lcompri{1 to p} ffr{1 to p} crisis
ect catseq1 catseq2
end(system, cv=cvlin)
estimate(resids=varresids, noprint, OUTSIGMA=vlin)
impulse(model=creditmodel,window="Impulse Responses", steps=nstep)
@MCVARDoDraws(model=creditmodel, steps=16)
@MCProcessIRF(model=creditmodel,irf=irflin,center=mean, lower=lowerlin, upper = upperlin, STDDEV=1.0)
@MCGraphIRF(model=creditmodel,center=mean, page= byshock,header='linear',STDDEV=1.0,INCLUDE=||3,4,5||)
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: level or first difference in the VECM

Unread post by TomDoan »

Much will depend upon what you mean by "exogenous". In the CATS setup, exogenous means "weakly exogenous for the cointegrating vector"---they're I(1) variables which are included in the cointegrating vector(s) but have zero loadings on it (them).
ege_man
Posts: 85
Joined: Sat Jul 07, 2012 2:39 pm

Re: level or first difference in the VECM

Unread post by ege_man »

Dear Tom
Thanks for your quick reply. I will use this code if there is no problem.
Regards
Post Reply