VECM in R: Testing weak exogeneity and imposing restrictions

960 views Asked by At

I estimated VECM and would like to make 4 separate tests of weak exogeneity for each variable.

library(urca)
library(vars)

data(Canada)
               e     prod       rw     U
1980 Q1 929.6105 405.3665 386.1361  7.53
1980 Q2 929.8040 404.6398 388.1358  7.70
1980 Q3 930.3184 403.8149 390.5401  7.47
1980 Q4 931.4277 404.2158 393.9638  7.27
1981 Q1 932.6620 405.0467 396.7647  7.37
1981 Q2 933.5509 404.4167 400.0217  7.13
...

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

t = cajorls(jt, r = 1)
t$rlm$coefficients
                  e.d       prod.d        rw.d         U.d
ect1     -0.005972228  0.004658649 -0.10607044 -0.02190508
e.dl1     0.812608320 -0.063226620 -0.36178542 -0.60482042
prod.dl1  0.208945048  0.275454380 -0.08418285 -0.09031236
rw.dl1   -0.045040603  0.094392696 -0.05462048 -0.01443323
U.dl1     0.218358784 -0.538972799  0.24391761 -0.16978208

t$beta
                  ect1
e.l1        1.00000000
prod.l1     0.08536852
rw.l1      -0.14261822
U.l1        4.28476955
constant -967.81673980

I guess that my equations are:

enter image description here

and I would like to test whether alpha_e, alpha_prod, alpha_rw, alpha_U (they marked red in the picture above) are zeros and impose necessary restrictions on my model. So, my question is: how can I do it?

I guess that my estimated alphas are:

                  e.d       prod.d        rw.d         U.d
ect1     -0.005972228  0.004658649 -0.10607044 -0.02190508

I guess that I should use alrtest function from urca library:

alrtest(z = jt, A = A1, r = 1)

and probably my A matrix for alpha_e should be like this:

A1 = matrix(c(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
     nrow = 4, ncol = 3, byrow = TRUE)

The results of the test:

jt1 = alrtest(z = jt, A = A1, r = 1)
summary(jt1)

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

Eigenvectors, normalised to first column
of the restricted VAR:

                 [,1]
RK.e.l1        1.0000
RK.prod.l1     0.1352
RK.rw.l1      -0.1937
RK.U.l1        3.9760
RK.constant -960.2126

Weights W of the restricted VAR:

        [,1]
[1,]  0.0000
[2,]  0.0084
[3,] -0.1342
[4,] -0.0315

Which I guess means that I can't reject my hypothesis of weak exogeneity of alpha_e. And my new alphas here are: 0.0000, 0.0084, -0.1342, -0.0315.

Now the question is how can I impose this restriction on my VECM model?

If I do:

t1 = cajorls(jt1, r = 1)
t1$rlm$coefficients
                  e.d       prod.d        rw.d         U.d
ect1     -0.005754775  0.007717881 -0.13282970 -0.02848404
e.dl1     0.830418381 -0.049601229 -0.30644063 -0.60236338
prod.dl1  0.207857861  0.272499006 -0.06742147 -0.08561076
rw.dl1   -0.037677197  0.102991919 -0.05986655 -0.02019326
U.dl1     0.231855899 -0.530897862  0.30720652 -0.16277775
t1$beta
                 ect1
e.l1        1.0000000
prod.l1     0.1351633
rw.l1      -0.1936612
U.l1        3.9759842
constant -960.2126150

the new model don't have 0.0000, 0.0084, -0.1342, -0.0315 for alphas. It has -0.005754775 0.007717881 -0.13282970 -0.02848404 instead.

How can I get reestimated model with alpha_e = 0? I want reestimated model with alpha_e = 0 because I would like to use it for predictions (vecm -> vec2var -> predict, but vec2var doesn't accept jt1 directly). And in general - are calculations which I made correct or not?

Just for illustration, in EViews imposing restriction on alpha looks like this (not for this example):

enter image description here

enter image description here

1

There are 1 answers

1
user15808679 On

If you have 1 cointegrating relationship (r=1), as it is in t = cajorls(jt, r = 1), your loading matrix can not have 4 rows and 3 columns:

A1 = matrix(c(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
nrow = 4, ncol = 3, byrow = TRUE)

Matrix A can only have 4 rows and 1 column, if you have 4 variables and 1 cointegrating relationship.