数据结构:
Y X1 X2 X3 X4 0.86 0.82 1224.9 9800.3 0.01 0.54 0.81 1285.1 10979 0.03 0.13 0.8 1224.9 14584 0.03 0.16 0.8 1344 16266 0.03 0.3 0.79 1262.1 17606 0.05 0.91 0.77 1300.5 20260 0.08 0.44 0.75 1381.1 23629 0.07 0.48 0.73 1466.9 26417 0.05 0.61 0.68 1512.9 31211 0.05 0.6 0.66 1770.2 37363 0.07
Adf test of Y
Step 1
ADF Test Statistic
-1.24970839478
1% Critical Value*
-2.90752835038
5% Critical Value
-1.9835221635
10% Critical Value
-1.63571110037
*MacKinnon critical values for rejection of hypothesis of a unit root.
Augmented Dickey-Fuller Test Equation
Dependent Variable: D(Y)
Method: Least Squares
Date: 10/09/08 Time: 15:27
Sample(adjusted): 2 10
Included observations: 9 after adjusting endpoints
Variable
Coefficient
Std. Error
t-Statistic
Prob.
Y(-1)
-0.229958032928
0.184009352813
-1.24970839478
0.246726940496
R-squared
0.156314066162
Mean dependent var
-0.0288888888889
Adjusted R-squared
0.156314066162
S.D. dependent var
0.334493813263
S.E. of regression
0.307240521638
Akaike info criterion
0.582067492906
Sum squared resid
0.75517390509
Schwarz criterion
0.603981334832
Log likelihood
-1.61930371808
Durbin-Watson stat
1.95813491942
Step 2
ADF Test Statistic
-3.11840843356
1% Critical Value*
-2.96767495573
5% Critical Value
-1.9890499413
10% Critical Value
-1.63822498918
*MacKinnon critical values for rejection of hypothesis of a unit root.
Augmented Dickey-Fuller Test Equation
Dependent Variable: D(Y,2)
Method: Least Squares
Date: 10/09/08 Time: 15:30
Sample(adjusted): 3 10
Included observations: 8 after adjusting endpoints
Variable
Coefficient
Std. Error
t-Statistic
Prob.
D(Y(-1))
-1.10315789474
0.353756705782
-3.11840843356
0.0168812689653
R-squared
0.578772835346
Mean dependent var
0.03875
Adjusted R-squared
0.578772835346
S.D. dependent var
0.517809603729
S.E. of regression
0.336068870493
Akaike info criterion
0.773467337149
Sum squared resid
0.790596
Schwarz criterion
0.783397529859
Log likelihood
-2.09386934859
Durbin-Watson stat
2.15240153153
Y 是一阶单整;
Adf test of X1
ADF Test Statistic
-3.56753212396
1% Critical Value*
-2.90752835038
5% Critical Value
-1.9835221635
10% Critical Value
-1.63571110037
*MacKinnon critical values for rejection of hypothesis of a unit root.
Augmented Dickey-Fuller Test Equation
Dependent Variable: D(X1)
Method: Least Squares
Date: 10/09/08 Time: 15:32
Sample(adjusted): 2 10
Included observations: 9 after adjusting endpoints
Variable
Coefficient
Std. Error
t-Statistic
Prob.
X1(-1)
-0.0224026154961
0.00627958339761
-3.56753212396
0.00731993746544
R-squared
-0.0917286528975
Mean dependent var
-0.0177777777778
Adjusted R-squared
-0.0917286528975
S.D. dependent var
0.0139443337756
S.E. of regression
0.0145698514542
Akaike info criterion
-5.51528545532
Sum squared resid
0.00169824457117
Schwarz criterion
-5.49337161339
Log likelihood
25.8187845489
Durbin-Watson stat
1.21400817987
X1 没有单位根
Adf test of X2
ADF Test Statistic
2.88906002271
1% Critical Value*
-4.64050620794
5% Critical Value
-3.33497487009
10% Critical Value
-2.81685004383
*MacKinnon critical values for rejection of hypothesis of a unit root.
Augmented Dickey-Fuller Test Equation
Dependent Variable: D(X2)
Method: Least Squares
Date: 10/09/08 Time: 15:36
Sample(adjusted): 3 10
Included observations: 8 after adjusting endpoints
Variable
Coefficient
Std. Error
t-Statistic
Prob.
X2(-1)
0.976807507209
0.338105646656
2.88906002271
0.0342243059951
D(X2(-1))
-1.24180336229
0.480653515137
-2.58357282987
0.0492185263564
C
-1210.60044258
446.432624705
-2.71172037074
0.0421894835766
R-squared
0.657254246897
Mean dependent var
60.6375
Adjusted R-squared
0.520155945656
S.D. dependent var
106.068077027
S.E. of regression
73.4741810848
Akaike info criterion
11.7117415707
Sum squared resid
26992.2764304
Schwarz criterion
11.7415321488
Log likelihood
-43.8469662826
F-statistic
4.79403640269
Durbin-Watson stat
2.6241221641
Prob(F-statistic)
0.0687749376894
X2 在假设存在常数项的情况下检验,在95%的概率下通过:没有单位根。但在没有常数项的情况下检验在95%概率下不通过,在90%的概率下通过没有单位根。
Adf test of X3
ADF Test Statistic
2.60687487097
1% Critical Value*
-2.96767495573
5% Critical Value
-1.9890499413
10% Critical Value
-1.63822498918
*MacKinnon critical values for rejection of hypothesis of a unit root.
Augmented Dickey-Fuller Test Equation
Dependent Variable: D(X3)
Method: Least Squares
Date: 10/09/08 Time: 15:39
Sample(adjusted): 3 10
Included observations: 8 after adjusting endpoints
Variable
Coefficient
Std. Error
t-Statistic
Prob.
X3(-1)
0.184309286735
0.0707012403191
2.60687487097
0.0402889270165
D(X3(-1))
-0.14502614751
0.510141739643
-0.284285986109
0.785747463303
R-squared
0.549403573406
Mean dependent var
3298
Adjusted R-squared
0.474304168974
S.D. dependent var
1585.77056528
S.E. of regression
1149.7611205
Akaike info criterion
17.1448139509
Sum squared resid
7931703.80529
Schwarz criterion
17.1646743363
Log likelihood
-66.5792558036
Durbin-Watson stat
1.36753313325
X3在假设没有常数项的前提下没有单位根(95%)
Adf test of X4
ADF Test Statistic
-2.71416039811
1% Critical Value*
-3.05069791541
5% Critical Value
-1.99615708419
10% Critical Value
-1.64145713193
*MacKinnon critical values for rejection of hypothesis of a unit root.
Augmented Dickey-Fuller Test Equation
Dependent Variable: D(X4,2)
Method: Least Squares
Date: 10/09/08 Time: 15:41
Sample(adjusted): 4 10
Included observations: 7 after adjusting endpoints
Variable
Coefficient
Std. Error
t-Statistic
Prob.
D(X4(-1))
-1.19137466307
0.438947773279
-2.71416039811
0.0420668502387
D(X4(-1),2)
0.649595687332
0.340007483153
1.91053350152
0.114308014409
R-squared
0.595163949441
Mean dependent var
0.00285714285714
Adjusted R-squared
0.51419673933
S.D. dependent var
0.0221466970557
S.E. of regression
0.0154361566659
Akaike info criterion
-5.26925197073
Sum squared resid
0.00119137466307
Schwarz criterion
-5.28470621386
Log likelihood
20.4423818976
Durbin-Watson stat
1.08138088327
X4存在单位根,一阶单整。
结论:Y和X4 是一阶协整,X1、X2、X3不存在单位根。
滞后一阶的Granger Causality
Pairwise Granger Causality Tests
Date: 10/09/08 Time: 15:47
Sample: 1 10
Lags: 1
Null Hypothesis:
Obs
F-Statistic
Probability
X1 does not Granger Cause Y
9
0.892535272818
0.381263630894
Y does not Granger Cause X1
0.131547115503
0.729267123282
X2 does not Granger Cause Y
9
0.432613131431
0.535113716964
Y does not Granger Cause X2
0.415712630321
0.542934145248
X3 does not Granger Cause Y
9
1.33973024694
0.291073178046
Y does not Granger Cause X3
1.04591385816
0.345902054529
X4 does not Granger Cause Y
9
0.467395725164
0.519702590718
Y does not Granger Cause X4
0.0227796409288
0.884977974178
X2 does not Granger Cause X1
9
1.15035840082
0.324706204896
X1 does not Granger Cause X2
34.6441983879
0.00106648026535
X3 does not Granger Cause X1
9
1.12236905291
0.330182772381
X1 does not Granger Cause X3
6.07625792641
0.0487869671525
X4 does not Granger Cause X1
9
0.222451395114
0.653840846121
X1 does not Granger Cause X4
0.42553581166
0.538360947319
X3 does not Granger Cause X2
9
4.95581960724
0.0676215894838
X2 does not Granger Cause X3
1.01466184177
0.352669808582
X4 does not Granger Cause X2
9
0.161436072031
0.701758373975
X2 does not Granger Cause X4
0.186727991496
0.680751760998
X4 does not Granger Cause X3
9
0.0868040049626
0.77820814714
X3 does not Granger Cause X4
0.636019038333
0.455549633303
滞后2阶的GrangerCausality
Pairwise Granger Causality Tests
Date: 10/09/08 Time: 15:46
Sample: 1 10
Lags: 2
Null Hypothesis:
Obs
F-Statistic
Probability
X1 does not Granger Cause Y
8
0.584878210387
0.610261332436
Y does not Granger Cause X1
1.14818632405
0.426298771351
X2 does not Granger Cause Y
8
1.36107300581
0.379615099809
Y does not Granger Cause X2
0.441952151239
0.678858251548
X3 does not Granger Cause Y
8
1.91892672661
0.290604408789
Y does not Granger Cause X3
0.843719143888
0.512010111097
X4 does not Granger Cause Y
8
0.666077930153
0.576269683126
Y does not Granger Cause X4
1.7527671387
0.313153613806
X2 does not Granger Cause X1
8
0.0367374212119
0.964356002817
X1 does not Granger Cause X2
7.61611554935
0.0667455254798
X3 does not Granger Cause X1
8
1.04865847326
0.45151213222
X1 does not Granger Cause X3
10.7641725128
0.0427739652534
X4 does not Granger Cause X1
8
0.334397165872
0.739429601203
X1 does not Granger Cause X4
3.03322210305
0.190338390297
X3 does not Granger Cause X2
8
11.3572530864
0.0398487405196
X2 does not Granger Cause X3
0.921972690861
0.487397195278
X4 does not Granger Cause X2
8
0.284097508228
0.770919460124
X2 does not Granger Cause X4
1.29547903996
0.393054278525
X4 does not Granger Cause X3
8
0.707109053423
0.560274943226
X3 does not Granger Cause X4
2.67795356189
0.215125293511
GrangerCausality 对阶数比较敏感,因而需要更多的数据,考察在多滞后几阶的情况下结论的变化情况。本例每组只有10个数据,最多滞后2阶能得到因果检验的结果,3阶及以上是不能做的。
因果关系的结论是:X1对X2、X3有Granger因果关系(1阶和2阶,90%),X3对X2有因果关系(2阶,95%),重要的结论处我已经用颜色标记出来了,请查阅。欢迎交流~