复旦大学计量经济学讲义03经济计量检验

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

G:B:Wetherill(1986)3.1(1)(2)(3)(4)(5)(6)groupwiseheteroscedasticityTGGfunctionalheteroscedasticityBreusch¡¡Pagan¡¡Godfrey(1978;1979)¾2t´Var(t)=h(Z0t¯)(3-1)h(¢)Zttr+11¯r+1(1)OLS(2)(3)-34-3.1SAS1PROCREGDATA=LI.MACROECONOPRINT;2MODELY=IGC;3OUTPUTOUT=ABCRESIDUAL=RPREDICTED=P;4RUN;56DATATEMP;7MERGELI.MACROECOABC;8KEEPIGCRP;9RUN;DATATEMP;10SETTEMP;11R2=R¤R;12RUN;PROCGPLOTDATA=TEMP;13PLOTR¤P='.';14PLOTR2¤P='+';15RUN;½=1¡6PTt=1d2tT(T2¡1)(3-2)3.1()t¤=pT¡2½p1¡½2T¡2t3.2SAS1PROCREGDATA=LI.MACROECONOPRINT;2MODELY=IGC;3OUTPUTOUT=ABCRESIDUAL=RPREDICTED=P;4RUN;56DATATEMP;7MERGELI.MACROECOABC;8ABSR=ABS(R);9KEEPABSRPIGC;10RUN;PROCCORRDATA=TEMPSPEARMANNOSIMPLE;11VARPIGC;12WITHABSR;13RUN;-35-3.1Bartlett(detection)H0:¾21=¾22=¢¢¢=¾2GH1:9i;j2f1;2;¢¢¢;Gg;¾2i6=¾2j(3-3)3.2M=(T¡G)ln^¾2¡PGg=1(Tg¡p)ln^¾2g1+13(G¡1)(PGg=1(Tg¡p)¡1¡(T¡G)¡1G¡1p^¾2=1T¡GPTg=1(Tg¡p)^¾2g-36-3.3SAS1%MACROBART(DA=);2PROCREGDATA=LI.&DA;3&DA:MODELY=X1X2;4OUTPUTOUT=&DAPREDICTED=Y&DA.HATRESIDUAL=R&DA;5RUN;67PROCUNIVARIATEDATA=&DANORMAL;8VARR&DA;9RUN;DATA&DA;10SET&DA;11AR&DA=ABS(R&DA);12OUTPUT;13RUN;PROCCORRDATA=&DANOSIMPLESPEARMAN;14VARY&DA.HATX1X2;15WITHAR&DA;16RUN;17%MEND;1819%BART(DA=GM)20%BART(DA=GE)21%BART(DA=WH)2223DATANULL;24P=1¡PROBCHI(34.94,2);25PUTP=;26RUN;Bartlett(LR)Goldfeld¡QuandtBartlett¾24¾2t=¾2X2itT2pcT=4FF=ESS1=([T¡c2¡(p+1)])ESS2=([T¡c2¡(p+1)])FcGoldfeld&Quandt(19651972)T30c4T60c10H:White1980LM-37-3.1LMTR2»Â2(k)(3-4)Glejserj^ujARCH3-1¾2tauxilliaryregressionstatisticPark¾2t=¾2X¯tln^2t=¯0+¯1lnXt+vtFtGlejs¾2t=(¯0+¯1Xhjt)2j^tj=¯0+¯1Xhjt+vth=1;¡1;1=2;¡1=2FtBPC¾2t=f(¯0+¯1Z1t+¢¢¢+¯mZmt)^2t¡^¾2=f(¢)+vtTR2»Â2(m)White¾2t=¯0¡Ppi=1¯iXit+Ppi;j=1¯ijXitXjt^2t=¯0+Ppi=1¯iXit+Ppi;j=1¯ijXitXjt+vtTR2»Â2((p+1)(p+2)2¡1)-38-3.4SAS:1datacpss;2setli.hetska;3run;procregdata=cpss;4modellnwage=gradepotexpexp2union;5outputout=c01p=predictr=residual;6run;procprintdata=c01;run;datatt;7setc01;8rsq=residual¤residual;9run;procplotdata=tt;10plotrsq¤predict=¤;11run;3.5SAS:whitetest1datawt;2settt;3grade2=grade¤grade;4exp4=exp2¤exp2;5exp3=potexp¤exp2;6gx2=grade¤exp2;7gu=grade¤union;8pu=potexp¤union;9eu=exp2¤union;10gp=grade¤potexp;11run;procregdata=wt;12modelrsq=gradepotexpexp2uniongrade2exp4exp3gx2gpgupueu;13run;datat1;14chis1=cinv(0.95,12);15run;procprintdata=t1;run;procregdata=cpss;16modellnwage=gradepotexpexp2union/spec;17run;-39-3.2SerialCorre1ation3.6SAS:BGtest1procregdata=wt;2modelrsq=gradepotexpunion;3run;datawt1;4setwt;5rsqadjust=rsq/0.2099;6run;procregdata=wt1;7modelrsqadjust=gradepotexpunion;8run;datat2;9chis2=cinv(0.95,3);10run;procprintdata=t2;run;3.7SAS:GQtest1procsortdata=wt;2bypotexp;3run;dataw001;4setwt;5if36=n=65thendelete;6run;procprintdata=w001;run;dataw01;7setw001;8if36=n=70thendelete;9run;dataw02;10setw001;11if1=n=35thendelete;12run;procregdata=w01;13modellnwage=gradepotexpexp2union;14outputout=c011p=predict1r=residual1;15run;procregdata=w02;16modellnwage=gradepotexpexp2union;17outputout=c012p=predict2r=residual2;18run;datat3;19fvalue=¯nv(0.95,30,30);20run;procprintdata=t3;run;3.2SerialCorre1ationE(ui;uj)6=0(3-5)jt¡sj=1(auto¡correlation)t=½t¡1+vtj½j1vt(3-6)-40-Var(t)´¾2=¾2v1¡½2Var(t;t¡s)=½s¾2(3-7)(1)(Inertia)(2)(3)(4)cobwebphenomenon(5)(1)E(NN`)=¾2I(2):tt(3):(1)^ei=yi¡^yols(2)^ei^ei¡1nPi=2(^ei¡^ei¡1)2Á(n¡1)nPi=1(^ei¡¹^ei¡1)2Án(3-8)30DWnPi=2(^ei¡^ei¡1)2nPi=1^e2i(3-9)-41-3.2SerialCorre1ationD:W:BGDWBGBGBreusch¡Godfrey1978BGyt=¯0+¯1x1t+¯2tx2t+¢¢¢+¯kxkt+ut(3-10)put=½1ut¡1+½2ut¡2+¢¢¢+½put¡p+vt(3-11)vtH0:½1=½2=¢¢¢=½p=0(3-12)(3-10)^ut=^½1ut¡1+^½2ut¡2+¢¢¢+^½put¡p+¯0+¯1x1t+¯2t+¢¢¢+¯kxkt+vt(3-13)R2LMLM=TR2(3-14)LMÂ2(p)LMDurbinhDW2DurbinhYt=®+¯Yt¡1+°Xt+²t(3-15)h=^½sT1¡TVar(^¯(3-16)^½DWDW¼2(1¡^½)(3-17)Durbinh1-42-3.8SAS:1dataice;2setli.autcor;3run;procregdata=ice;4modelcons=priceincometemp/dw;5outputout=ice1p=conspr=resid;6run;symbol1i=nonev=dotc=blueh=.5;procgplotdata=ice1;7plotresid¤time=1/vref=0;8run;rh0=0:40063R¡square=0:1541t=1R¡square=0:17923.10SAS:yule-walkerestimates1procautoregdata=ice;2modelcons=priceincometemp/nlag=1method=yw;3run;-43-3.2SerialCorre1ation3.9SAS:BGtest1datatt1;2setice1;3resid1=lag(resid);4run;procregdata=tt1;5modelresid=resid1/noint;6run;78databgt;9bg=29¤0.1541;10chisq=cinv(0.95,1);11ifbgchisqthent=1;12elset=0;13putt=;14run;1516datatt2;17setice1;18resid1=lag(resid);19resid2=lag(resid1);20resid3=lag(resid2);21run;procregdata=tt2;22modelresid=resid1resid2resid3/noint;23run;2425databgt2;26bg=(29¡3)¤0.1792;27chisq=cinv(0.95,3);28ifbgchisqthent=1;elset=0;29putt=chisq=bg=;30run;-44-3.11SAS:COCHRANE-ORCUTTestimates1procregdata=ice;2modelcons=priceincometemp/dw;3outputout=ttp=chatr=res;4run;procprintdata=tt;run;datatt;5settt;6relag=Lag(res);7run;procprintdata=tt;run;procregdata=ttoutest=b1;8modelres=relag/noint;9run;1011datapp;12settt;13c1=lag(cons);14t1=lag(temp);15i1=lag(income);16p1=lag(price);17run;procprintdata=pp;run;datapp1;18setpp;19ifn=1thendelete;20c2=cons¡0.40063¤c1;21t2=temp¡0.40063¤t1;22i2=income¡0.40063¤i1;23p2=price¡0.40063¤p1;24run;procprintdata=pp1;run;procregdata=pp1;25MODELc2=t2i2p2/dw;26run;3.12Box-Piercetest1datatt;2setice1;3r1=

1 / 40
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功