首页 > 解决方案 > 如何在 R 中对原始平稳和转换后的平稳时间序列进行格兰杰测试?

问题描述

我有三个时间序列的每日频率,分别命名为abc。我已经通过动物园转换了三个时间序列,然后运行三个测试来检查平稳性,这里也有详细说明:

这告诉我c是静止的,而ab不是。要将两个非平稳时间序列转换为平稳,我使用 diff()

diffa <- diff(a)
diffb <- diff(b)

所以现在我有了时间序列cdiffadiffbc的长度为 230、diffadiff 229。由于它们的长度不同,我无法在cdiffadiffb上运行grangertest()

我的问题:

编辑:我还运行了 Johansen-Procedure

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

Test type: trace statistic , with linear trend 

Eigenvalues (lambda):
[1] 0.2870433 0.2059927 0.1364341

Values of teststatistic and critical values of test:

           test 10pct  5pct  1pct
r <= 2 |  26.70  6.50  8.18 11.65
r <= 1 |  68.68 15.66 17.95 23.52
r = 0  | 130.25 28.71 31.52 37.22

Eigenvectors, normalised to first column:
(These are the cointegration relations)

                  a.l2  c.l2        b.l2
a.l2       1.000000000  1.00000000  1.000000000
c.l2  0.002389741 -0.01354087 -0.009186882
b.l2      -0.721484628  0.63371350 -5.025730289

Weights W:
(This is the loading matrix)

                a.l2 c.l2      b.l2
a.d       -0.4943852 -0.1442216 0.03055074
c.d -28.8624865 22.6674082 5.20934270
b.d        0.3205697 -0.1668201 0.05236327

编辑 2:来自 tsDyn 的 VECM 输出

AIC 7310.527    BIC 7364.995    SSR 107996319896
Cointegrating vector (estimated by 2OLS):
   a       c         b
r1  1 -0.0003824692 -0.5213095


                 ECT                  Intercept               a -1               c -1          b -1               
Equation a      -0.5926(0.1377)***   8.7668(12.0209)         0.1257(0.1237)      0.0011(0.0006)*     -0.2109(0.0768)**   
Equation c 14.7790(21.2262)     -26.1263(1852.6566)     1.3814(19.0588)     -0.1389(0.0852)     -0.8560(11.8419)    
Equation b      0.1636(0.2013)       2.6051(17.5698)         0.0168(0.1807)      0.0035(0.0008)***   -0.3475(0.1123)**   

标签: rtime-series

解决方案


VECM 与非平稳序列一起工作,因此您将有一个积分顺序为平稳 I(1)。在此处输入图像描述

https://pdf4pro.com/view/vector-error-correction-models-215587.html


推荐阅读