The code given below estimates a VEC model with 4 cointegrating vectors. It is a reproducible code, so just copy and paste into your R console (or script editor).

nobs = 200
e = rmvnorm(n=nobs,sigma=diag(c(.5,.5,.5,.5,.5)))
e1.ar1 = arima.sim(model=list(ar=.75),nobs,innov=e[,1])
e2.ar1 = arima.sim(model=list(ar=.75),nobs,innov=e[,2])
e3.ar1 = arima.sim(model=list(ar=.75),nobs,innov=e[,3])
e4.ar1 = arima.sim(model=list(ar=.75),nobs,innov=e[,4])
y5 = cumsum(e[,5])
y1 = y5 + e1.ar1
y2 = y5 + e2.ar1
y3 = y5 + e3.ar1
y4 = y5 + e4.ar1
data = cbind(y1,y2,y3,y4,y5)

jcointt = ca.jo(data,ecdet="const",type="trace",K=2,spec="transitory")

vecm <- cajorls(jcointt,r=4)

I want to re-estimate the model with the following restrictions put on the coinegrating vectors:

            ect1   ect2  ect3   ect4
y1.l1        1      0      0     0
y2.l1      b1.1     1      0     0
y3.l1      b2.1     0      1     0
y4.l1      b3.1     0      0     1
y5.l1      b4.1    b4.2   b4.3   b4.4
constant    c1      c2     c3    c4

here, b1.1 through to b4.1 are the coefficients ($\beta_1, \beta_2, \beta_3, \beta_4 $) of the first cointegrating vector. Similarly, b4.4 and c4 are coefficients of the fourth cointegrating equation. Then, in order to test the restrictions on Coinegrating Vectors, I run the following code:

test <- blrtest(jcointt,H=H1,r=4)

However, I do not know how I should specify the H1 matrix in this instance. I was wondering if someone could demonstrate how I should go ahead with testing the restrictions on long run equations and then re-estimate the model using the above restrictions:

vecm2 <- cajorls(test,r=4)
  • $\begingroup$ Have you checked Pfaff "Analysis of Integrated and Cointegrated Time Series" (2008)? There are a few examples on p. 139-140 and around. You might need to use bh5lrtest or another function instead of blrtest. $\endgroup$ – Richard Hardy Oct 12 '15 at 19:15
  • $\begingroup$ Just to clarify, I need to re-parameterize the first co-integrating equation through imposing restrictions. This requires, first, to impose the restrictions and to run the likelihood ratio test and then, if accepted, to estimate the restricted VAR whereby ect1 will have the new parameter values with a normalisation on the first variable. What I am not sure about is the $H$ matrix in the blrtest, how should I specify this so that I have the right restrictions imposed correctly. $\endgroup$ – mr.rox Oct 13 '15 at 10:26

A nice resource, which also gives a good example on imposing linear restrictions on a VECM can be found in Lecture 12 of Sebastian Fossati as part of his econ 509 course at the University of Alberta. [1]

Additionally I would like to add, that the code example provided needs the library(dae), which includes rmvnorm.

[1] - https://www.ualberta.ca/~sfossati/e509/ - https://www.ualberta.ca/~sfossati/e509/files/slides/Lec12.pdf

  • $\begingroup$ These links require username and password. The site says "Authorized Students only" :( $\endgroup$ – square_one Sep 19 '19 at 14:54
  • $\begingroup$ Sorry, that's the problem with link-only answers. In my local copy it says, that it's based on the work by Eric Zivot and his Econ 582 course, which can be found here faculty.washington.edu/ezivot/econ582/econ582.htm $\endgroup$ – hannes101 Sep 20 '19 at 5:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.