全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Gauss专版
6569 13
2013-07-10
这是上一个完成的帖子之后,第二个关于gauss 编程应用于学科前沿二:非线性单位根

三个方面的内容:
结构突变的单位根
阈值单位根
马尔科夫转制单位根

各位坛友不用着急,程序以及说明太多,还有一些文章需要上传,所以这个过程会很慢的。

我要说明的是,有些程序在网上很容易找到,这个我就不进行详细说明。
有些是我通过其他途径很不容易找到,这部分我会详细说明的,可能需要付一些费用,敬请大家原谅。


二维码

扫码加我 拉你入群

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

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

全部回复
2013-7-10 18:13:46
结构突变的单位根:
大家可以先看Junsoo Lee教授的程序,基本上说明了几个最出名的例子:包括已知突变点的单位根检验和未知(内生)突变点的单位根检验,含一个或多个突变点。相关程序读者可以到他的主页上下载,这里就不多说了。
1、Tests with Structural Breaks With Given Break Points
Perron's (augmented type) Test (Econometrica, 1989) (perron.txt)
Amsler and Lee's LM (augmented type) Test (Econometric Theory, 1995) (AL.txt)
Stationarity Test with Multiple Breaks (Editor's book, Lee) (stat.txt)
2、With Data-dependent Break Points
Zivot and Andrews Test (One break) (JBES, 1992) (ZA.txt)
Lumsdaine and Papell Test (Two breaks) (Restat, 1997) (LPtwo.txt)
Lee and Strazicich LM Test (One break) (ls.txt)
Lee and Strazicich LM Test (Two breaks, Restat, 2003) (LStwo.txt)

二维码

扫码加我 拉你入群

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

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

2013-7-10 18:37:58
先把几篇结构突变的单位根检验论文帖上来,供大家阅读。

2.Banerjee, A., Lumsdaine R. L. and J. H. Stock (1992)“Recursive and sequential tests of the unit-root and trend break hypotheses:theory and international evidence”, Journal of Business and EconomicStatistics, 10, 271-287

Banerjee, Lumsdaine and Stock(1992) use various recursive and sequential tests which endogenise thebreakpoint. They consider the recursive maximum and minimum DF test and thedifference between them deriving the asymptotic distribution of the recursiveand sequential test statistics and tabulating the relative critical values.

3.Perron, P. (1989)“The great crash, the oil-price shock and the unit root hypothesis”, Econometrica,57, 1361-1401

Perron (1989) first showed theimportance of such tests, arguing that if there is a break in the deterministictrend, unit root tests tend to under-reject the null of a unit root. Taking thebreakpoint as exogenous, he suggests a modification of the Dickey-Fuller testwith three different types of deterministic trend functions. These allow, inturn, for a one-off change in the intercept, a change in slope of the trend,and both of them. The null of a unit root is then tested against thealternative of a broken trend stationary. After Perron’s (1989) seminal paperseveral testing methods have been developed where the break point is assumed tobe unknown. This is often referred to as an endogenous breakpoint. Theseprocedures comprise recursive (using sub-samples), rolling (using a fixed-sizewindow that moves along the sample), and sequential methods (includingswitching dummies in the full sample).

4.Zivot , E. and D.W.K. Andrews (1992) “Further evidence onthe great crash, the oil-price shock and he unit root hypothesis”, Journalof Business and Economic Statistics, 10, 251-270

Zivot and Andrews (1992) use asequential unit root test, derive its distribution, and tabulate its criticalvalues.

5.Lumsdaine R. L. and D. H. Papell (1997) “Multiple trendbreaks and the unit root hypothesis”, Review of Economics and Statistics,79, 212-218

Lumsdaine and Papell (1997)extend the analysis to the case of multiple breaks with unknown breakpoints.

6.Gregory, A. W., Nason, J. M. and D. Watt (1996) “Testingfor structural breaks in cointegrated relationships”, Journal ofEconometrics, 71, 324-341

Gregory, Nason and Watt (1996)study the sensitivity of the ADF test for cointegration in the presence of asingle permanent break. Using Monte Carlomethods they show that the presence of a break results in under-rejection ofthe null of no cointegration implying the inappropriateness of constantparameter cointegration analysis in such cases.

7.Hansen B. E., (1992) “Tests for parameter instability inregressions with I(1) processes”, Journal of Business and EconomicStatistics, 10, 321-335

Hansen (1992) derives theasymptotic distribution of a LM test for parameter instability against severalalternatives in the context of cointegrated regression models.

8.Gregory, A. and B. E. Hansen, (1996) “Residual –basedtests for cointegration in models with regime shifts”, Journal ofEconometrics, 70, 99-126

Gregory and Hansen (1996) proposeseveral tests for the null of no cointegration against the alternative ofcointegration in the presence of a possible break in the intercept or the slopecoefficients in the cointegrating relation at an unknown point in time.

9.Seo, B. (1998)“Tests for structural change in cointegrated systems” Econometric Theory,14, 222-259

Seo (1998) defines LM tests statistics for structuralchanges in both the cointegrating vector and the vector of adjustmentparameters for both the cases of a known and unknown breakpoint. Using Monte Carlo methods he finds that the tests forstructural change of the cointegrating vector have a non-standard distributionthat is equal to the one found by Hansen (1992) using the FM technique.

10.VOGELSANG, T. J. (1997) Wald-typetests for detecting breaks in the trend function of a dynamic time series,Econometric Theory, 13: 818-849.

11.PERRON, P., T. J. VOGELSANG. (1993)Testing for a Unit Root in a Time Series with a Shift in Mean: Corrections andExtensions. Journal of Business and Economic Statistics, 10: 467-470.

12.PERRON, P., T. J. VOGELSANG. (1998)Additional Tests for Unit Root Allowing the Possibilityof Breaks in the TrendFunction. International Economic Review, 39: 1073-110.

We consider unit root tests that allowa shift in trend at an unknown time. We focus on the additive outlier approach,but also give results for the innovational outlier approach. Various methods ofchoosing the break date are considered. New limiting distributions are derived,including the case where a shift in trend occurs under the unit root nullhypothesis. Limiting distributions are invariant to mean shifts but not toslope shifts. Simulations are used to assess finite sample size and power. We focuson the effects of a break under the null and the choice of break date.

13.PERRON, P., G. RODRIGUEZ.(2003) GLS detrending, efficient unit root tests and structural change. Journalof Econometrics, 115:1-27.

We extend the class of M-tests for a unit root analyzed by Perron and Ng (Rev.Econ. Studies63(1996)435)and Ng and Perron (Econometrica 69 (2001)1519)to the case whereachange in the trend function is allowed to occur at an unknown time.Thesetests (M GLS )adoptthe GLSdetrending approach developed by Elliott etal.(Econometrica 64 (1996)813)(ERS) following the results of Dufour and King(J.Econometrics 47 (1991)115).Following Perron (Econometrica 57 (1989)1361),weconsider two models:one allowing for a change in slope and the other for both achange in intercept and slope.We derive the asymptotic distributions of thetests as well as that of the feasible point optimal test (P GLS )suggested byERS.Also, we compute the non-centrality parameter used for the local GLSdetrendingthat permits the test P GLS T to have 50%asymptotic power at that value.The asymptoticcritical values of the tests are tabulated.We show that the M GLS and P GLS Ttests have an asymptotic power function close to the power envelope.Asimulation study analyzes the size and power in nite samples under variousmethods to select the truncation lag for the autoregressive spectral

density estimator.Anempirical application is also provided.

14.PERRON, P. (1997) Further evidenceon breaking trend functions in macroeconomic variables.Journal of Econometrics,80: 355-385.

This study first reexamines thefindings of Perron (1989) regarding the claim that most macroeconomic timeseries are best construed as stationary fluctuations around a deterministictrend function if allowance is made for the possibility of a shift in theintercept of the trend function in 1929 (a crash) and a shift in slope in 1973(a slowdown in growth). Unlike that previous study, the date of possible changeis not fixed a priori but is considered as unknown. We consider various methodsto select the break points and the asymptotic and finite sample distributionsof the corresponding statistics. A

detailed discussion about the choice ofthe truncation lag parameter in the autoregression and of its effect on thecritical values is also included. Most of the rejections reported in Perron(1989) are confirmed using this approach. Secondly, this paper investigates aninternational data set of post-war quarterly real GNP (or GDP) series for theG-7 countries. Our results are compared and contrasted to those of Banerjee etal. (1992) and Zivot and Andrews (1992). In contrast to the theoretical resultscontained in these papers, we derive the limiting distribution of thesequential test without trimming.


附件列表

perron突变.rar

大小:10.81 MB

 马上下载

二维码

扫码加我 拉你入群

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

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

2013-7-11 02:05:24
new; cls;
let data=
80
78
71
73
70
71
72
76
76
78
80
80
77
69
69
68
67
66
67
70
69
68
69
69
68
63
63
63
58
60
57
53
55
65
64
62
64
64
66
69
70
69
65
64
63
60
62
60
61
60
;

y=data;
n=rows(y);
p=1;
x=seqa(1,1,n)^seqa(0,1,p+1)'; @生成常数项和趋势项@


w=wstat(y,x);
n=rows(w);
library pgraph;
graphset;
title("standardized recursive residuals");
xy(seqa(1,1,n),w);   


proc wstat(y,x);
local n,k,w,ylag,xlag,bhatlag,e,t,v;
   n=rows(x);
   k=cols(x);
   w=zeros(n-k,1);
   t=k+1;
   do while t<=n;      @递归开始@
      xlag=x[1:t-1,.];   
      ylag=y[1:t-1,.];
      bhatlag=inv(xlag'xlag)*xlag'*ylag;
      e=y[t,.]-x[t,.]*bhatlag;
      v=1+x[t,.]*inv(xlag'xlag)*x[t,.]';
      w[t-k,.]=e/sqrt(v);
      t=t+1;
   endo;
   retp(w);
endp;
二维码

扫码加我 拉你入群

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

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

2013-7-11 02:15:34
上一个例子是递归残差的计算程序,使用同样的数据,则cusum检验程序如下所示:
/*使用标准的递归残差w,可以进行结构突变的CUSUM test         
null hypothesis is no structural change,test statistic:

    wj=(Sum[w] from i=1 to j)/sig.

sig是w的standard deviation,如果检验统计量高于上限或低于下限,拒绝零假设,
上限:wmax=theta*sqrt(n-k)+2*theta*(j-k)/sqrt(n-k)
下限:wmin=-wmax
这个程序不太难。

*/

call cusumtest(y,x);

proc(4)=cusumtest(y,x);
local theta,n,k,w,ylag,xlag,bhatlag,e,t,v,j,sig2,wj,wmin,wmax;
   theta=0.948;     @5% confidence level@
   /* standardized recursive residuals */
   n=rows(x);
   k=cols(x);
   w=zeros(n-k,1);
   t=k+1;
   do while t<=n;
      xlag=x[1:t-1,.];
      ylag=y[1:t-1,.];
      bhatlag=inv(xlag'xlag)*xlag'*ylag;
      e=y[t,.]-x[t,.]*bhatlag;
      v=1+x[t,.]*inv(xlag'xlag)*x[t,.]';
      w[t-k,.]=e/sqrt(v);
      t=t+1;
   endo;
   /* CUSUM test */
   j=seqa(k+1,1,n-k);
   sig2=(w-meanc(w))'(w-meanc(w))/(n-k);
   wj=cumsumc(w)./sqrt(sig2);
   wmax=theta*sqrt(n-k)+2*theta*(j-k)/sqrt(n-k);
   wmin=-wmax;
   if wj>=wmin and wj<=wmax;
      print "CUSUM test(RESULT:NOT reject H0)";            
   else;
      print "CUSUM test(RESULT:Reject H0)";
   endif;
   /* graph */
   library pgraph;
   graphset;
   _pltype={1,1,6};
   title("CUMSUM TEST"); xlabel("time j"); ylabel("CUSUM");
   xy(j,wmin~wmax~wj);
retp(j,wmin,wj,wmax);
endp;
二维码

扫码加我 拉你入群

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

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

2013-7-11 02:22:36
CUSUMSQ test
/*检验统计量:
qj=(Sum[w[i]^2] from i=1 to j)/(Sum[w[i]^2] from i=1 to n)
the upper bound qmax=c+(j-k)/(n-k)
the lower bound qmin=-c+(j-k)/(n-k)
*/

call cusumsqtest(y,x);

proc(4)=cusumsqtest(y,x);
   local c,n,k,w,ylag,xlag,bhatlag,e,t,v,qj,qmin,qmax,j;
   c=0.25379;   @c=0.25379 is the constant for 5% confidence level@
   /* standardized recursive residuals */
   n=rows(x); k=cols(x);
   w=zeros(n-k,1);
   t=k+1;
   do while t<=n;
      xlag=x[1:t-1,.]; ylag=y[1:t-1,.];
      bhatlag=inv(xlag'xlag)*xlag'*ylag;
      e=y[t,.]-x[t,.]*bhatlag;
      v=1+x[t,.]*inv(xlag'xlag)*x[t,.]';
      w[t-k,.]=e/sqrt(v);
      t=t+1;
   endo;
   /* CUSUMSQ test */
   j=seqa(k+1,1,n-k);
   qj=cumsumc(w^2)./sumc(w^2);
   qmax=c+(j-k)/(n-k);
   qmin=-c+(j-k)/(n-k);
   if qj>=qmin and qj<=qmax;
      print "CUSUMSQ test(RESULT:NOT reject H0)";           
   else;
      print "CUSUMSQ test(RESULT:Reject H0)";
   endif;
   /* graph */
   library pgraph;
   graphset;
   _pltype={1,1,6};
   title("CUSUMSQ test"); xlabel("time j"); ylabel("CUSUMSQ");
   xy(j,qmin~qmax~qj);
   retp(j,qmin,qj,qmax);
endp;
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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