## Weakly exogenous VECM

Questions and discussions on Vector Autoregressions

### Weakly exogenous VECM

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
lambert89

Posts: 2
Joined: Fri Apr 13, 2012 12:24 am

### Re: Weakly exogenous VECM

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.ratcalendar(q) 1960all 1979:8data(format=rats) / fyff fygm3 fygmyr*cmom# fyff fygm3 fygmyreigen %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 fygmyrlags 1 to 4det constantect rcointend(system)estimate(noprint)** Parallel model with the zeroed out ECT*system(model=fakemodel)var fyff fygm3 fygmyrlags 1 to 4det constantect rfakeend(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)`
TomDoan

Posts: 2725
Joined: Wed Nov 01, 2006 5:36 pm

### Re: Weakly exogenous VECM

Thank you very much for the help.
lambert89

Posts: 2
Joined: Fri Apr 13, 2012 12:24 am