全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Gauss专版
12033 18
2013-05-27
      今天跑了这个突变的程序。。之前看到有些前辈发帖子,说这个程序调试的时候有问题,我第一次也没有弄对,后面发现在break.prg这个程序的最后有一行命令:
#include d:\break-p\code\brcode.src            @set the path to where you store the file brcode.src@

把这里的路径改成自己存放文件的地方就可以了运行了。另外,关于里面一些参数,比如q,我理解的q为具有结构突变的变量个数,应该是1,2,3 三种取值吧,分别对应着截距,斜率,系数三种突变情况,不知道这样理解对吗?如果我仅仅是想对某一个时间序列进行单位根检验,那么x设为零即可是吗?最后,检验出突变的个数之后, 比如2个,如何进行数据生成过程的重新分析? 还请前辈指点一二。其实之前看Bai 和Perron的那篇文章的时候,并没有在意模型的设定,今天回过头来看本版的那篇帖子,才意识到我可以做一个回归方程中部分变量突变,而部分变量系数稳定的检验。 这如果直接用到E-G协整方程估计里面可以吗?比如,四变量,一个因变量,三个解释变量,检验其中一个解释变量发生突变,如果存在突变,加入虚拟变量,估计变结构以后新的协整方程,这只是一个非常浅显的主观想法,不对之处还请指正!
       最后,贴一个运行的程序,请前辈们帮忙指导解读下,看的不是太懂,

这是我的数据好参数输入

load yyy[93,2] = D:\process\GAUSS\data\data1.txt;      @read data@
bigt=93;                        @set effective sample size@
y=yyy[1:93,1];                  @set up the data, y is the dependent variable
                                z is the matrix of regressors (bigt,q) whose
                                coefficients are allowed to change, x is a
                                (bigt,p) matrix of regressors with coefficients
                                fixed across regimes. Note: initialize x to
                                something, say 0, even if p = 0.@
z=ones(bigt,1);
x=0;
q=1;                         @number of regressors z@
                               (变量 Z 为突变部分的虚拟变量 ?)   
p=0;                         @number of regressors x@
m=5;                        @maximum number of structural changes allowed@
eps1=.15;      

下面是运行的结果 ,不懂的地方我会有红色标注
The options chosen are:
h =  13.0000
eps1 =  0.1500
hetdat =  1.0000
hetvar =  1.0000
hetomega =  1.0000
hetq =  1.0000
robust =  1.0000 (prewhit =  1.0000 )
The maximum number of breaks is:  5.0000
********************************************************
Output from the global optimization
********************************************************
(前面一段1到4个断点估计的程序删了)
The model with 5.0000 breaks has SSR :  2.2840      
The dates of the breaks are:  
17.0000
35.0000
48.0000
61.0000
74.0000
********************************************************
Output from the testing procedures
********************************************************
a) supF tests against a fixed number of breaks(这个就是sup F统计量的结果吧,下面是临界值
--------------------------------------------------------------
The supF test for 0 versus 1.0000 breaks (scaled by q) is: 0.4998
The supF test for 0 versus 2.0000 breaks (scaled by q) is: 4.7697
The supF test for 0 versus 3.0000 breaks (scaled by q) is: 6.4273
The supF test for 0 versus 4.0000 breaks (scaled by q) is: 10.0038
The supF test for 0 versus 5.0000 breaks (scaled by q) is: 8.8310
-------------------------
The critical values at the  10.0000 % level are (for k=1 to  5.0000 ):   (为何只是 k=1 to 5,如果我选sup F for 0 vs 2 要看哪个统计量?)
7.0400  6.2800  5.2100  4.4100  3.4700
The critical values at the  5.0000 % level are (for k=1 to  5.0000 ):
8.5800  7.2200  5.9600  4.9900  3.9100
The critical values at the  2.5000 % level are (for k=1 to  5.0000 ):
10.1800  8.1400  6.7200  5.5100  4.3400
The critical values at the  1.0000 % level are (for k=1 to  5.0000 ):
12.2900  9.3600  7.6000  6.1900  4.9100
--------------------------------------------------------------
b) Dmax tests against an unknown number of breaks
--------------------------------------------------------------
The UDmax test is:  10.0038     (意味著序列中确实存在结构突变对吗)
(the critical value at the  10.0000 % level is:  7.4600 )
(the critical value at the  5.0000 % level is: 8.8800 )
(the critical value at the  2.5000 % level is:  10.3900 )
(the critical value at the  1.0000 % level is:  12.3700 )
********************************************************
---------------------
The WDmax test at the  10.0000 % level is:  17.9165    (WDmax 也表明结构突变对吗)
(The critical value is:  8.2000 )
---------------------
The WDmax test at the  5.0000 % level is:  19.3786
(The critical value is:  9.9100 )
---------------------
The WDmax test at the  2.5000 % level is:  20.7142
(The critical value is:  11.6700 )
---------------------
The WDmax test at the  1.0000 % level is:  22.1045
(The critical value is:  13.8300 )
********************************************************
supF(l+1|l) tests using global otimizers under the null   (类似于 J-J 协整里面的TMax检验吧)
--------------------------------------------------------------
The supF( 2.0000 | 1.0000 ) test is :  10.6483
It corresponds to a new break at:  35.0000
The supF( 3.0000 | 2.0000 ) test is :  3.0646
It corresponds to a new break at:  74.0000
The supF( 4.0000 | 3.0000 ) test is :  1.5785
It corresponds to a new break at:  48.0000
The supF( 5.0000 | 4.0000 ) test is :  0.5742
It corresponds to a new break at:  61.0000
********************************************************
The critical values of supF(i+1|i) at the  10.0000 % level are (for i=1 to  5.0000 ) are: (怎么去看这个检验的临界值选取?)
7.0400  8.5100  9.4100  10.0400  10.5800
The critical values of supF(i+1|i) at the  5.0000 % level are (for i=1 to  5.0000 ) are:
8.5800  10.1300  11.1400  11.8300  12.2500
The critical values of supF(i+1|i) at the  2.5000 % level are (for i=1 to  5.0000 ) are:
10.1800  11.8600  12.6600  13.4000  13.8900
The critical values of supF(i+1|i) at the  1.0000 % level are (for i=1 to  5.0000 ) are:
12.2900  13.8900  14.8000  15.2800  15.7600
********************************************************
Output from the application of Information criteria
--------------------------------------------------------------
Values of BIC and lwz with  0.0000  breaks: -1.9909 -1.9801
Values of BIC and lwz with  1.0000  breaks: -2.6549 -2.5660
Values of BIC and lwz with  2.0000  breaks: -3.2263 -3.0587
Values of BIC and lwz with  3.0000  breaks: -3.2435 -2.9967
Values of BIC and lwz with  4.0000  breaks: -3.3114 -2.9849
Values of BIC and lwz with  5.0000  breaks: -3.2193 -2.8125
The number of breaks chosen by BIC is : 4.0000
The number of breaks chosen by LWZ is : 2.0000   
********************************************************    *(下面程序不太明白,是我的程序运行出错了吗)
Output from the sequential procedure at significance level  10.0000 %
--------------------------------------------------------------
----------------------------------------------------
The sequential procedure estimated the number of breaks at: 0.0000 (这个应该是序列统计量选择的突变个数结果吧)
********************************************************
Output from the sequential procedure at significance level  5.0000 %
--------------------------------------------------------------
----------------------------------------------------
The sequential procedure estimated the number of breaks at: 0.0000
********************************************************
Output from the sequential procedure at significance level  2.5000 %
--------------------------------------------------------------
----------------------------------------------------
The sequential procedure estimated the number of breaks at: 0.0000
********************************************************
Output from the sequential procedure at significance level  1.0000 %
--------------------------------------------------------------
----------------------------------------------------
The sequential procedure estimated the number of breaks at: 0.0000
********************************************************
Output from the repartition procedure for the  10.0000 % significance level
********************************************************
The sequential procedure found no break and
the repartition procedure is skipped.
********************************************************
********************************************************
Output from the repartition procedure for the  5.0000 % significance level
********************************************************
The sequential procedure found no break and
the repartition procedure is skipped.
********************************************************
********************************************************
Output from the repartition procedure for the  2.5000 % significance level
********************************************************
The sequential procedure found no break and
the repartition procedure is skipped.
********************************************************
********************************************************
Output from the repartition procedure for the  1.0000 % significance level
********************************************************
The sequential procedure found no break and
the repartition procedure is skipped.
********************************************************
********************************************************
Output from the estimation of the model selected by BIC
--------------------------------------------------------------
Valid cases:                    93      Dependent variable:                   Y
Missing cases:                   0      Deletion method:                   None
Total SS:                   12.701      Degrees of freedom:                  88
R-squared:                   0.819      Rbar-squared:                     0.811
Residual SS:                 2.296      Std error of est:                 0.162
F(5,88):                    79.744      Probability of F:                 0.000
Durbin-Watson:               0.639
                         Standard                 Prob   Standardized  Cor with
Variable     Estimate      Error      t-value     >|t|     Estimate    Dep Var    (这些X是什么意思啊?)
-------------------------------------------------------------------------------
X1           7.244803    0.039179  184.914962     0.000    0.396091    0.396091
X2           8.293839    0.038075  217.827567     0.000    0.466590    0.466590
X3           7.734838    0.044803  172.640977     0.000    0.369800    0.369800
X4           7.953104    0.031681  251.040796     0.000    0.537733    0.537733
X5           7.719819    0.037060  208.307495     0.000    0.446198    0.446198
--------------------------------------------------------------
Corrected standard errors for the coefficients
--------------------------------------------------------------
The corrected standard error for coefficient 1.0000 is: 1.0631
The corrected standard error for coefficient 2.0000 is: 0.1323
The corrected standard error for coefficient 3.0000 is: 0.1668
The corrected standard error for coefficient 4.0000 is: 0.0283
The corrected standard error for coefficient 5.0000 is: 0.0315
the procedure to get critical values for the break dates has
reached the upper bound on the number of iterations. This may
be due to incorrect specifications of the upper or lower bound
in the procedure cvg. The resulting confidence interval for this
break date is incorrect.
--------------------------------------------------------------
Confidence intervals for the break dates   (下面的程序怎么解读?)
--------------------------------------------------------------
The 95% C.I. for the 1.0000 th break is:  16.0000  18.0000
The 90% C.I. for the 1.0000 th break is:  16.0000  18.0000
The 95% C.I. for the 2.0000 th break is:  21.0000  46.0000
The 90% C.I. for the 2.0000 th break is:  24.0000  43.0000
The 95% C.I. for the 3.0000 th break is:  45.0000  82.0000
The 90% C.I. for the 3.0000 th break is:  46.0000  82.0000
The 95% C.I. for the 4.0000 th break is:  69.0000  79.0000
The 90% C.I. for the 4.0000 th break is:  70.0000  77.0000
********************************************************
********************************************************
for the  5.0000 % level, the model is the same as for the  10.0000 % level.
The estimation is not repeated.
----------------------------------------------------------------
for the  2.5000 % level, the model is the same as for the  5.0000 % level.
The estimation is not repeated.
----------------------------------------------------------------
for the  1.0000 % level, the model is the same as for the  2.5000 % level.
The estimation is not repeated.
----------------------------------------------------------------

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2013-5-27 16:40:12
程序运行过程中没出现任何错误提示,但是序列统计量却没有显示出来,是哪里出了问题?请教各位前辈
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2013-5-28 22:21:21
没有找到突变点呀
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2013-5-28 23:07:32
xuelida 发表于 2013-5-28 22:21
没有找到突变点呀
序列是上证A指数, 2005年7月到2013年的,按理说应该是有突变才对
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2013-5-28 23:14:20
xuelida 发表于 2013-5-28 22:21
没有找到突变点呀
会不会是程序问题?比如我下载的程序本身出问题了
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2013-5-29 01:54:19
不会的,数据和直觉不一样的
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群