24小时热门版块排行榜    

查看: 346  |  回复: 0

swordsmen

木虫 (小有名气)

[求助] 请高手帮我看下这个GAUSS程序

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.txt;         @ 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。 这表示变量mio2break0b既没有被定义又没有被赋值。但是我不知道该怎么改,请教高手,谢谢。
回复此楼

» 猜你喜欢

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

智能机器人

Robot (super robot)

我们都爱小木虫

找到一些相关的精华帖子,希望有用哦~

科研从小木虫开始,人人为我,我为人人
相关版块跳转 我要订阅楼主 swordsmen 的主题更新
信息提示
请填处理意见