new;
FORMAT /M1 /ROS 8,4;
library pgraph;
_pdate="";
_pcolor = 1;
_pmcolor = ZEROS(8,1)|15;
/*
path1 = "Z:\\Stephan.Popp\\Projekte\\perronmultiple\\gauss\\output.out";
OUTPUT FILE = ^path1 ON;
*/
"******************************************";
"date: " datestr(date) " time: " timestr(time);
"*******************************************";
/* DATA
** the first column should contain the years or quarters (i.e. 1973.3)
** and the second the observations
*/
load yy[1456,2]=d:\workgauss\brentw.dta; @ change path settings and yy[here include # of observations ,2]@
/* Randomly chosen dataset
yy=SEQA(1900,1,100)~RNDN(100,1);
*/
XY(yy[.,1],yy[.,2]);
yyy= yy[.,2];
kmax = 5; @ max lag @
ttt = rows(yyy);
tau = 0.2; @ trimming factor @
"Series: Log(.)";
"Sample:" yy[1,1]~yy[rows(yyy),1];
"# observations:" ttt;
"maximum lag " kmax;
"trimming factor " tau;
"program: popp2break.prg" ;
"*******************************";
tbunter = MAXC(3+kmax|CEIL(tau*ttt)); @ lower break date @
"break date floor, effective tau " tbunter~yy[tbunter,1]~tbunter/ttt;
tbober = MINC(ttt-3-kmax|FLOOR((1-tau)*ttt)); @ upper break date @
"break date ceiling, effective (1-tau) " tbober~yy[tbober,1]~tbober/ttt;
"*******************************************";
/************** Model 0 *****************/
ergeb = ZEROS(2,1); @ Vektor zum Speichern der Ergebnisse @
tbopt = ZEROS(2,1);
ttb1 = tbunter;
ttb2 = 0;
do while ttb1 <= tbober; @ Schleife der durchlaufenden Bruchzeitpunkte T_B @
{rho1,trho1,ttheta1,pp1,rres1,varres1,tstat1,kk1} = mio2break0b(yyy,ttb1,ttb2,kmax);
if ABS(ttheta1) > ABS(ergeb[1,1]);
ergeb[1,1] = ttheta1;
ergeb[2,1] = ttb1;
endif;
ttb1 = ttb1 + 1;
endo;
tbopt[1] = ergeb[2,1];
ergeb = ZEROS(2,1); @ Vektor zum Speichern der Ergebnisse @
ttb2 = tbunter;
do while ttb2 <= tbober;
if ABS(ttb2 - tbopt[1]) < 2; ttb2 = tbopt[1] + 2; endif;
{rho1,trho1,ttheta1,pp1,rres1,varres1,tstat1,kk1} = mio2break0b(yyy,tbopt[1],ttb2,kmax);
if ABS(ttheta1) > ABS(ergeb[1,1]);
ergeb[1,1] = ttheta1;
ergeb[2,1] = ttb2;
endif;
ttb2 = ttb2 + 1;
endo;
tbopt[2] = ergeb[2,1];
tbopt = SORTC(tbopt,1);
{rho1,trho1,ttheta1,pp1,rres1,varres1,tstat1,kk1} = mio2break0b(yyy,tbopt[1],tbopt[2],kmax);
"****************";
"output";
"****************";
"model type M0";
"first break " tbopt[1]~yy[tbopt[1],1]~tbopt[1]/ROWS(yy);
"second break " tbopt[2]~yy[tbopt[2],1]~tbopt[2]/ROWS(yy);
"phi = rho-1 " rho1;
"t value " trho1;
"optimal lag " kk1;
"variance " varres1;
"------";
"coeff tstat ";
"yyverz constant du1verz du2verz dtb1 dtb2";
pp1~tstat1;
我在运行这个程序时,系统出现Undefined symbols: mio2break0b ,这是什么原因