stata误差修正模型讲解.docx
《stata误差修正模型讲解.docx》由会员分享,可在线阅读,更多相关《stata误差修正模型讲解.docx(25页珍藏版)》请在冰点文库上搜索。
stata误差修正模型讲解
误差修正模型:
如果用两个变量,人均消费y和人均收入x(从格林的数据获得)来研究误差修正模型。
令z=(yx)'则模型为:
k
LZt二Ao二Zt二.7PfZtj亠二
i4
其中,二-「_'
如果令k=1,即滞后项为1,则模型为
LZt=Ao•P^Zt1■;t
实际上为两个方程的估计:
yt二aybnyt□,皿人」-皿細」-Pi^":
xtj■Mt
-xt-axb21yt1b22xtJ'p21=yt二'p22=xt」■;2t
用OlS命令做出的结果:
gent=_n
tssett
timevariable:
t,1to204
genly=L.y
(1missingvaluegenerated)
genlx=L.x
(1missingvaluegenerated)
regD.ylylxD.lyD.lx
Source|
+
SS
df
MS
Model|
37251.2525
4
9312.81313
Residual|
+
87073.3154
197
441.996525
Total|
124324.568
201
618.530189
Numberofobs=202
F(4,197)=21.07
Prob>F=0.0000
R-squared=0.2996
AdjR-squared=0.2854
RootMSE=21.024
D.y|
+
Coef.
Std.Err.
t
P>|t|
[95%Conf.Interval]
ly|
.0417242
.0187553
2.22
0.027
.0047371
.0787112
lx|
-.0318574
.0171217
-1.86
0.064
-.0656228
.001908
ly|
D1.|
.1093189
.082368
1.33
0.186
-.0531173
.2717552
lx|
D1.|
.0792758
.0566966
1.40
0.164
-.0325344
.1910861
cons|
2.533504
3.757158
0.67
0.501
-4.875909
9.942916
这是yt^aybnyt4th2xt4'P1「yt4'卩册叹二’;1t的回归结果,其中ay=2.5335,
bii=0.04172,bi2=-0.03186,pii=0.10932,pi2=0.07928
同理可得Lxt=axb2iytjb22xtd-p2i二yt」-p2^xtJ■;2t的回归结果,见下
regD.xlylxD.lyD.lx
Source|
SS
df
MS
Numberofobs=
202
+
F(4,197)=
11.18
Model|
36530.2795
4
9132.56988
Prob>F=
0.0000
Residual|
160879.676
197
816.648101
R-squared=
0.1850
+
AdjR-squared=
0.1685
Total|
197409.955
201
982.139082
RootMSE=
28.577
D.x|
+
Coef.
Std.Err.tP>|t|
[95%Conif.Interval]
ly1
.037608
.0254937
1.48
0.142
-.0126676
.0878836
lx|
-.0307729
.0232732
-1.32
0.188
-.0766694
.0151237
ly1
D1.|
.4149475
.111961
3.71
0.000
.1941517
.6357434
lx|
D1.|
-.1812014
.0770664
-2.35
0.020
-.3331825
-.0292203
_cons|
11.20186
5.10702
2.19
0.029
1.130419
21.27331
如果用vec命令
vecyx,pi
Vectorerror-correctionmodel
Sample:
3-204
No.ofobs=
AIC
202
=18.29975
=18.35939
=18.44715
Loglikelihood=-1839.275
RMSE
R-sq
HQIC
SBIC
chi2P>chi2
Det(Sigma_ml)=
Equation
277863.4
Parms
D_y
4
20.9706
0.6671
396.78180.0000
D_x
4
28.5233
0.5328
225.83130.0000
|
-1-
Coef.
Std.Err.
z
P>|z|
[95%Conf.Interval]
D_y
|
_ce1|L1.|
x/1
.0418615
.0069215
6.05
0.000
.0282956
.0554273
y|
LD.|
V1
.1091985
.0807314
1.35
0.176
-.0490323
.2674292
x|
LD.|
.0793652
.055411
1.43
0.152
-.0292384
.1879687
_cons|
+
-3.602279
3.759537
-0.96
0.338
-10.97084
3.766278
D_x
|
_ce1|L1.|y|
LD.|
V1
.0256414
.0094143
2.72
0.006
.0071897
.044093
.4254495
.1098075
3.87
0.000
.2102308
.6406683
x|
LD.|
-.1889879
.0753677
-2.51
0.012
-.3367058
-.04127
_cons|
5.880993
5.113562
1.15
0.250
-4.141405
15.90339
这里_ce1L1显示的是速度调整参数a的估计值,上述结果没有n的估计,而是在下面的表
格中。
Cointegratingequations协整公式
EquationParmschi2P>chi2
_ce11853.90780.0000
Identification:
betaisexactlyidentified
Johansennormalizationrestrictionimposed
beta|
+
Coef.Std.Err.
zP>|z|
[95%Conf.Interval]
_ce1
|
y|
1.
X|
-.764085.0261479
-29.220.000
-.8153339-.7128362
_cons|
146.9988.
上表中
beta显示的
3的估计值。
Impactparameters
Equation
Parms
chi2
P>chi2
D_y
1
36.57896
0.0000
D_x
1
7.418336
0.0065
Pi|
Coef.
Std.Err.
z
P>|z|
[95%Conf.Interval]
+
D_y
|
y|
L1.|
.0418615
.0069215
6.05
0.000
.0282956
.0554273
X|
L1.|
-.0319857
.0052886
-6.05
0.000
-.0423512
-.0216203
+
D_x
|
y|
L1.|
.0256414
.0094143
2.72
0.006
.0071897
.044093
X|
L1.|
-.0195922
.0071933
-2.72
0.006
-.0336908
-.0054935
命令pi显示n的估计值,上表中显示,在第一个方程中协整向量n中,y的L1(滞后一期)的估计值为0.0418615,x的L1(滞后一期)的估计值为-0.0319857,这与ols估计的b11=0.04172,b12=-0.03186很类似;在第二个方程中协整向量n的估计与ols估计的有些差别,可能暗示第二个方程对均衡误差没有反应。
检验协整向量的秩,
vecrankyx
Johanson协整检验
Johansentestsforcointegration
Trend:
constant
Numberofobs=
Lags=
202
2
Sample:
3-204
5%
maximum
trace
critical
rank
parms
LL
eigenvalue
statistic
value
0
6
-1856.3997
34.5784
15.41
1
9
-1839.2746
0.15596
0.3282*
3.76
2
10
-1839.1105
0.00162
tracestatistic表明拒绝rank(n)=0的假设,但是不能拒绝rank(n)=1的假设,所以人
均消费和人均收入的模型中,协整向量的秩为1。
也表明人均消费和人均收入符合误差修正
模型。
(不在第一个上就说明至少有一个协整关系)
vecyx,al
al显示a的估计值,即速度调整参数的估计
Equation
Parmschi2P>chi2
D_y
136.578960.0000
D_x
17.4183360.0065
Adjustmentparameters
alpha|
+
Coef.
Std.Err.
z
P>|z|
[95%Conf.Interval]
D_y
|
_ce1|
L1.|
+
.0418615
.0069215
6.05
0.000
.0282956
.0554273
D_x
|
_ce1|
L1.|
.0256414
.0094143
2.72
0.006
.0071897
.044093
而3矩阵的估计为:
beta|
+
Coef.
Std.Err.
zP>|z|
[95%Conf.Interval]
_ce1
|
y|
1
x|
-.764085
.0261479
-29.220.000
-.8153339-.7128362
_cons|146.9988
即146.9988+y-0.764085x=0
而a3'即为n,即a'=(0.04186150.0256414),3'=(1-0.764085),
n的第一行即为第一个方程中的n的估计值(0.0418615-0.0319857)
其中,0.0418615*(-0.764085)=-0.0319857
n的第二行即为第二个方程中的n的估计值(0.0256414-0.0195922)
Pi|
+
Coef.
Std.Err.
z
P>|z|
[95%Conf.Interval]
D_y
|y|L1.|
.0418615
.0069215
6.05
0.000
.0282956
.0554273
x|
L1.|
+
-.0319857
.0052886
-6.05
0.000
-.0423512
-.0216203
D_x
|y|L1.|
.0256414
.0094143
2.72
0.006
.0071897
.044093
x|
L1.|
-.0195922
.0071933
-2.72
0.006
-.0336908
-.0054935
此时虽然3矩阵的估计中有截距项,但在n的显示结果中没有截距项,此时截距项被放在误差修正模型中了。
如果用t(rc)命令,则截距项出现在n中,而误差修正模型中没有截距项。
vecyx,t(rc)pial
Vectorerror-correctionmodel
Sample:
3-204No.ofobs=202
AIC=18.30856
Loglikelihood=-1841.164HQIC=18.36157Det(Sigma_ml)=283111.1SBIC=18.43958
Equation
Parms
RMSE
R-sq
chi2
P>chi2
D_y
3
20.9329
0.6666
395.9259
0.0000
D_x
3
28.5972
0.5280
221.5231
0.0000
|
+
Coef.
Std.Err.
z
P>|z|[95%Conf.Interval]
D_y
|
_ce1|
L1.|
.041464
.0045894
9.03
0.000
.0324688
.0504591
y|
LD.|
.1128688
.0801805
1.41
0.159
-.044282
.2700196
x|
LD.|
+
.0765203
.054746
1.40
0.162
-.0307799
.1838205
D_x
|
_ce1|
L1.|
.0386104
.0062698
6.16
0.000
.0263218
.050899
y|
LD.|
.4012721
.1095377
3.66
0.000
.1865822
.6159621
x|
LD.|
-.1705861
.0747907
-2.28
0.023-
.3171732
-.0239991
Cointegratingequations
EquationParmschi2P>chi2
Identification:
betaisexactlyidentified
Johansennormalizationrestrictionimposed
beta|
+
Coef.
Std.Err.
z
P>|z|
[95%Conf.Interval]
_ce1
|y|
1
x|
-.773902
.025458
-30.40
0.000
-.8237986
-.7240053
_cons|
105.6838
81.37255
1.30
0.194
-53.8035
265.171
Adjustmentparameters
Equation
Parms
chi2
P>chi2
D_y
1
81.62498
0.0000
D_x
1
37.92271
0.0000
alpha|
Coef.
Std.Err.
z
P>|z|
[95%Conf.Interval]
-+
D_y
|
_ce1|
L1.|
.041464
.0045894
9.03
0.000
.0324688
.0504591
-+
D_x
|
_ce1|
L1.|
.0386104
.0062698
6.16
0.000
.0263218
.050899
Impactparameters
Equation
Parms
chi2
P>chi2
D_y
1
81.62498
0.0000
D_x
1
37.92271
0.0000
Pi|
+
Coef.
Std.Err.
z
P>|z|
[95%Conf.Interval]
D_y
|
y|
L1.|
.041464
.0045894
9.03
0.000
.0324688
.0504591
x|
L1.|
-.032089
.0035518
-9.03
0.000
-.0390504
-.0251277
cons|
4.382067
.4850288
9.03
0.000
3.431428
5.332706
D_x
此时在
+
|y|
L1.|
7I
.0386104
.0062698
6.16
0.000
.0263218
.050899
x|
L1.|
-.0298806
.0048522
-6.16
0.000
-.0393908
-.0203705
_cons|
4.080489
.6626169
6.16
0.000
2.781784
5.379194
n的矩阵估计中,有截距项,但是在误差修正模型中没有截距项。
如果用t(rt)命令,在协整向量3中有趋势项的估计(即对时间t的系数的估计),而在整个
误差修正模型中没有趋势项,但是有截距项的估计。
在n的估计中,只有趋势项,没有截距
项,因为截距项的估计已经包含在误差修正模型中了。
vecyx,t(rt)pial
Vectorerror-correctionmodel
Sample:
3-204
Loglikelihood=-1837.553
Det(Sigma_ml)=273167.6
EquationParmsRMSE
D_y420.8735
D_x428.0435
No.ofobs=
AIC
HQIC=
SBIC
202=18.292618.35887=18.45638
R-sqchi2P>chi2
0.6702400.2960.0000
0.5484239.24240.0000
|
-1-
Coef.
Std.Err.
z
P>|z|
[95%Conf.Interval]
D_y
|_ce1|L1.|
.0769485
.01239
6.21
0.000
.0526645
.1012325
y|
LD.|
V1
.0861433
.0819685
1.05
0.293
-.0745121
.2467986
x|
LD.|
.0989288
.0554018
1.79
0.074
-.0096569
.2075144
_cons|
+
-2.443936
3.5442
-0.69
0.490
-9.390441
4.502569
D_x
|_ce1|L1.|
.0632409
.016646
3.80
0.000
.0306153
.0958664
y|LD.|
x|LD.|
.3552693
.1101247
3.23
0.001
.1394288
.5711098
-.1724981
.0744324
-2.32
0.020
-.3183828
-.0266133
_cons|
2.973666
4.761634
0.62
0.532
-6.358965
12.3063
Cointegratingequations
EquationParmschi2P>chi2
Identification:
betaisexactlyidentified
Johansennormalizationrestrictionimposed
beta|
+
Coef.
Std.Err.
z
P>|z|
[95%Conf.Interval]
_ce1|
y|
1
x|
-1.093286
.0913076
-11.97
0.000
-1.272246
-.9143263
_trend|
6.923713
2.414737
2.87
0.004
2.190915
11.65651
_cons|
265.9482
Adjustmentparameters
Equation
Parms
chi2
P>chi2
D_y
1
38.57054