【问题标题】:VECM in R: Testing weak exogeneity and imposing restrictionsR中的VECM:测试弱外生性并施加限制
【发布时间】:2021-01-25 02:56:07
【问题描述】:

我估计了 VECM,并希望对每个变量的弱外生性分别进行 4 次测试。

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

我猜我的方程式是:

我想测试是否 alpha_ealpha_prodalpha_rwalpha_U(它们在上图)为零并对我的模型施加了必要的限制。 那么,我的问题是:我该怎么做?

我猜我估计的 alphas 是:

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

我想我应该使用 urca 库中的 alrtest 函数:

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

也许我的 alpha_eA 矩阵应该是这样的:

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

测试结果:

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

我猜这意味着我不能拒绝我的 alpha_e 弱外生性假设。我的新 alphas 是:0.0000、0.0084、-0.1342、-0.0315。

现在的问题是如何将这个限制施加到我的 VECM 模型上?

如果我这样做:

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

对于alphas,新模型没有 0.0000、0.0084、-0.1342、-0.0315。它有 -0.005754775 0.007717881 -0.13282970 -0.02848404。

如何获得 alpha_e = 0 的重新估计模型?我想要使​​用 alpha_e = 0 重新估计的模型,因为我想将它用于预测(vecm -> vec2var -> predict,但 vec2var 不直接接受 jt1)。总的来说 - 我所做的计算是否正确?

只是为了说明,在 EViews 中对 alpha 施加限制看起来像这样(不适用于本示例):

【问题讨论】:

    标签: r time-series error-correction eviews vector-auto-regression


    【解决方案1】:

    如果你有 1 个协整关系 (r=1),就像在 t = cajorls(jt, r = 1) 中一样, 您的加载矩阵不能有 4 行和 3 列:

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

    矩阵A只能有4行1列,如果你有4个变量和1个协整关系。

    【讨论】:

    • 说实话,我完全误解了如何构造A矩阵。互联网上几乎没有任何信息。如果我想测试 alpha_1 是否等于零,你能澄清一下我的 A 矩阵应该是什么样子吗?如果我想测试 alpha_1 和 alpha_3 是否同时等于 0,我的 A 矩阵应该是什么样子?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-11-29
    • 2010-12-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-08-23
    相关资源
    最近更新 更多