13
$\begingroup$

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")
summary(jcointt)

I went ahead with four cointegrating vectors and estimated a VECM:

vecm <- cajorls(jcointt,r=4)
summary(vecm$rlm)
print(vecm)

Here are the estimated cointegrating vectors:

$beta

           ect1    ect2    ect3    ect4
y1.l1       1        0       0      0
y2.l1       0        1       0      0
y3.l1       0        0       1      0
y4.l1       0        0       0      1
y5.l1      -1.07    -1.05   -0.985 -1.05
constant   -0.16    0.505   -0.05   0.116

Now, I would like to impose restrictions on the first cointegrating vector (on ect1 parameters) so that I can analyse the long run relationship between the variables. Here is what I want to obtain after imposing and reparameterising the cointegrating 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   b0.1    b0.2   b0.3   b0.4

here, b1.1 through to b0.1 are the coefficients ($\beta_1,\beta_2,\beta_3,\beta_4$) of the first cointegrating vector labelled as ect1, which could now be written as $y_{1,t-1}=\beta_0-\beta_1y_{2,t-1}-\beta_2y_{3,t-1}-\beta_3y_{4,t-1}-\beta_4y_{5,t-1}$. Similarly, b4.2 and b0.2 are coefficients of the second cointegrating equation etc.

I was wondering if you could help proceed further in imposing the restrictions and re-estimating the VECM with the restrictions. urca package has a bltest(), bh6lrtest(), and bh5lrtest() functions to test restrictions on cointegrating vectors, though, I need some guidance on how to construct my H matrix (restrictions matrix) Thanks.

$\endgroup$

2 Answers 2

6
$\begingroup$

I know this was asked almost two years ago, but I thought I'd answer the question.

It appears that the H that you want to estimate is identical to the values you received from the Johansen test, with the exception of rows 1:4 and columns 2:4. You only need to set those values to zeroes and ones, which is fairly easy considering that the diagonal is (very nearly) one and the other values are small enough that they can be rounded to where they need to be.

Code for that:

# Set H to found cointegrating vectors
H <- vecm$beta 

# Replace needed rows with rounded values
H[1:4, 2:4] <- round(H[1:4, 2:4])

This has the effect of creating the intended restriction matrix, which looks like this:

                  ect1        ect2        ect3      ect4
y1.l1     1.000000e+00  0.00000000  0.00000000  0.000000
y2.l1     6.001737e-17  1.00000000  0.00000000  0.000000
y3.l1    -2.103352e-17  0.00000000  1.00000000  0.000000
y4.l1     3.744563e-17  0.00000000  0.00000000  1.000000
y5.l1    -9.857458e-01 -1.00335472 -1.01229025 -1.066448
constant  5.632217e-02  0.02311308  0.07969588 -0.519249

Now, running the blrtest function:

blrresult <- blrtest(jcointt, H, 4)

And it's result:

> summary(blrresult)

###################### 
# Johansen-Procedure # 
###################### 

Estimation and testing under linear restrictions on beta 

The VECM has been estimated subject to: 
beta=H*phi and/or alpha=A*psi

                  ect1        ect2        ect3      ect4
y1.l1     1.000000e+00  0.00000000  0.00000000  0.000000
y2.l1     6.001737e-17  1.00000000  0.00000000  0.000000
y3.l1    -2.103352e-17  0.00000000  1.00000000  0.000000
y4.l1     3.744563e-17  0.00000000  0.00000000  1.000000
y5.l1    -9.857458e-01 -1.00335472 -1.01229025 -1.066448
constant  5.632217e-02  0.02311308  0.07969588 -0.519249

Eigenvalues of restricted VAR (lambda):
[1] 0.2009 0.1479 0.1410 0.0963

The value of the likelihood ratio test statistic:
0 distributed as chi square with 8 df.
The p-value of the test statistic is: 1 

Eigenvectors, normalised to first column
of the restricted VAR:

            [,1]    [,2]    [,3]    [,4]
y1.l1     1.0000  1.0000  1.0000  1.0000
y2.l1    -0.7020  1.1557 -0.2307 -3.3582
y3.l1     0.5135 -0.3613 -0.2651 -6.0261
y4.l1    -0.2599  0.1480  2.9151 -1.5204
y5.l1    -0.5241 -1.9374 -3.5946 10.1052
constant  0.2160 -0.0226 -1.4838  0.2879

Weights W of the restricted VAR:

        [,1]    [,2]    [,3]   [,4]
y1.d -0.2594 -0.1574  0.0141 0.0035
y2.d  0.1290 -0.1118  0.0467 0.0214
y3.d -0.1813  0.0618  0.0085 0.0302
y4.d  0.0270  0.0014 -0.0560 0.0097
y5.d -0.0629 -0.0009  0.0254 0.0065

Hopefully this helps you or someone else.

$\endgroup$
0
$\begingroup$

Even though it's two years, this might be helping. So, as far as I know, blrtest tests the same restrictions on every cointegrating vector. For example, here, it can be used to test for the exclusion of the constant from all of the 4 cointegrating vector.

Because of this, it is not identifying as well (since it is the same restriction on every vector).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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