Page 1 of 1

Weakly exogenous VECM

Posted: Fri Apr 13, 2012 4:07 pm
by lambert89
Hi,

I am new to using RATS and am struggling a bit at the moment. I want to estimate a VECM model with consumption and output as the dependent variables, then I want to impose weak exogeneity so that only the change in output is affected by the error correction term, that is, the error correction term in the (change in) consumption equation is restricted to zero.

So far I have:

lin(define=acony) ca 1984:1 2011:4 resids
# constant ya

system(model=avecm)
var ca ya
lags 1
det constant
ect acony
end(system)
estimate(outsigma=s, residuals=resid) 1984:1 2011:4

Any help or hints would be greatly appreciated.

Regards

Re: Weakly exogenous VECM

Posted: Thu Apr 19, 2012 10:40 am
by TomDoan
That's fairly easy to do with CATS. With RATS, the easiest way to do it is to estimate the model both with and without the cointegrating vector (actually, to get the setup to be parallel, with a "fake" cointegrating vector in the second case) and replace the coefficients for the equation that needs the restriction. Doing this lets RATS handle all the differencing and undifferencing.

Code: Select all

open data swjasa.rat
calendar(q) 1960
all 1979:8
data(format=rats) / fyff fygm3 fygmyr
*
cmom
# fyff fygm3 fygmyr
eigen %cmom eigval eigvec
*
* Set the cointegrating vector into an error correction equation
*
equation(coeffs=%xcol(eigvec,3)) rcoint
# fyff fygm3 fygmyr
*
* And make a second copy of it with zero coefficients
*
equation(coeffs=%zeros(3,1)) rfake
# fyff fygm3 fygmyr
*
* Original ECM model
*
system(model=ratemodel)
var fyff fygm3 fygmyr
lags 1 to 4
det constant
ect rcoint
end(system)
estimate(noprint)
*
* Parallel model with the zeroed out ECT
*
system(model=fakemodel)
var fyff fygm3 fygmyr
lags 1 to 4
det constant
ect rfake
end(system)
estimate(noprint)
*
* Pull the two sets of coefficients
*
compute ecmcoeffs=%modelgetcoeffs(ratemodel) 
compute ecfcoeffs=%modelgetcoeffs(fakemodel)
*
* Replace the coefficients for the 3rd equation
*
compute %psubmat(ecmcoeffs,1,3,%xcol(ecfcoeffs,3))
*
* And reset them in the main model
*
compute %modelsetcoeffs(ratemodel,ecmcoeffs)

Re: Weakly exogenous VECM

Posted: Sun Apr 22, 2012 4:36 pm
by lambert89
Thank you very much for the help.