复旦大学计量经济学讲义10 soft

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

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

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

资源描述

softsoft10.1Eviews(1)File!New!Workfile(2)!NewObject!Series(3)File!Import!Excel!!Open!asgroup!VIEW!Graph!Scatter!SimpleScatter!!Open!asequationview!representationview!Actual;Fitted;Residual!ResidualGraphEViewsEViewsFileNewWorkfileWorkfileRange3StartdateEnddate3OKWorkfileEViewsQuickEmptyGroupGroupEnter16ABSACOSARASINCCONCNORMCOEFCOSDDLOGDNORMELSEENDIFEXPLOGLOGITLPT1LPT2MANANRNDPDLRESIDRNDSARSINSMASQRTHENEstimationoutputtp(1)R¡squared(2)AjustedR¡squared(3)S:E:ofregressions=r^e0^eT¡k(10-1)(4)SumsquaredresidP(yi¡^yi)2(5)LoglikelihoodL=¡n2log2¼¡n2log^¾2¡n2(10-2)(6)DurbinWatsonstatDW2(7)MeanDependentvar-169-10.2PointForecasts(8)S:D:Dependentvar(9)Schwarzcriterion(10)Akaikeinfocriterion(11)F¡statisticF(12)Prob(F¡statistic)FpEquationProc!Forecast10.2PointForecastsRangeSample(1)RMSE:vuut1h+1s+hXt=s(^yt¡yt)2(10-3)(2)MAE:1h+1s+hXt=sj^yt¡ytj(10-4)(3)MAPE:1h+1s+hXt=s¯¯¯¯^yt¡ytyt¯¯¯¯(10-5)(4)TheilInequalityCoefficient:q1h+1Pt=ss+h(^yt¡yt)2q1h+1Ps+ht=s^y2t+q1h+1Pt=ss+hy2t(10-6)(5)BiasProportion:(¹^y¡bary)2P(^yt¡yt)2=h(10-7)(6)VarianceProportion:(s^y¡sy)2P(^yt¡yt)2=h(10-8)(7)CovarianceProportion:2(1¡r)s^ysyP(^yt¡yt)2±h(10-9)-170-soft(1)!QuickGroupStatistics;CorrelationsSeriesListOK(2)Workfile,ShowOK(Group)ViewCorrelationsmontecalorEVIEWS:workfilemcu110!b1=25!b2=0.5matrix(100,2)fvector(10)v1v1.fill80,100,120,140,160,180,200,220,240,260mtos(v1,x)for!k=1to100seriesu=3*nrndseriesy=!b1+!b2*x+uequationeql.lsy=c(1)+c(2)*xf(!k,1)=c(1)f(!k,2)=c(2)nextshowfexpand1100smpl1100mtos(f,gr)freezeser01.qqplotfreezeser01.histfreezeser02.qqplotfreezeser02.histmatrix(1,2)mm(1,1)=@mean(ser01)m(1,2)=@mean(ser02)showm10.3Maple10.4matlab-171-10.4matlab10-1dsolvedsolve(DE,v)rsolversolve(eqn,v)pdsolvepdsolve(PDE,v)PDEplotPDEplot(PDE,int,strange,options)pdetestpdetest(sol,PDE)odetestodetest(sol,ode)mapdemapde(PDE,into,f)10-2intint(f(x),x=a..b)DoubleintDoubleint(f(x,y),x,y)studentvalue()TripleintTripleint(f(x,y,z),x,y,z)Matlab6:0SPSS!SAS²:20²:²:²:²:²:²ttz²:Jarque¡BeraKolmogorov¡smirnovKolmogorov¡smirnovLilliefors²:friedmanKruskalwallis²²²²:²:D¡-172-soft²:q-qdet(A)rank(A)inv(A)pinv(A)trace(A)orth(A),Anull(A)subspace(x,y)subspace(A,B)AArr=nAAX=0XLUAnb[L;U]=lu(A)UL[L;U;P]=lu(A)LU=PAMATLABCholeskyLUA=LULULPAX=bx=bicg(A;b;tol;maxit;M)Mbicg(A;b;¢¢¢;M=M1¤M2M1;M2;x0)x0[x;flag;relres;iter;xresvect]=bicg(¢¢¢)flagbicgstab(¢¢¢)cgs(¢¢¢)gmres(A;b;restart)pcg(¢¢¢)qmr(¢¢¢)-173-10.4matlabrref(A)rref(A,tol)rrefmovie(A)tol=max(size(A))¤eps¤norm(A;inf)Choleskychol(A)ACholesky[G;err]=chol(A)AerrR1=cholupdate(R,x)R=chol(A)A+xx0choleskyR1=cholupdate(R,x,'-')A¡xx0choleskyA=A0x6=0x0Ax0GG0G=ALUCholesky:°ops(0),lu(A);°ops,°ops(0),chol(A);°opsQR[Q;R]=qr(A)[Q;R;P]=qr(A)AP=QRR[Q;R]=qr(A;0)[Q1;R1]=Ajqrdelete(Q;R;j)QR[Q1;R1]=jbqrinsert(Q;R;b;j)An£nA=QRQRAQRGivensJacobiplanerot(x)X12£2Givens[G,y]=planerot(x)y=Gxrjr(A)Jacobinorm(x)kxk2=qXjxkj2-174-softnorm(x,inf)1¡kxk=max(abs(x))norm(x,1)1¡kxk1=Xkjxkjnorm(x,p)p¡kxk1=rXkjxkjpnorm(x,-inf)Xp¡kAkp=supX6=0kAXkpkXkpnorm(A)norm(A,1)A1-norm(A,2)norm(A,inf)A1-norm(A,'fro')Frobeniusnormest(A)106normest(A,tol)tolFrobeniuskAkF=rXiXjjaijj2Ax=b1Abxcond(A)=kAk°°A¡1°°Acond(A)cond(A,p)pcondest(A)A1[c,v]=condest(A)A1v:kAvk=kAkkvkc[c,v]=condest(A,tr)tr=1tr=¡1c=rcond(A)-175-10.4matlabrcond(A)110.1Jilbertbad=cond(hilb(5))badAx=bmnXme=mXi=1(bi¡nXj=1aijxj)2=kb¡Axk22Anbspaugment(A;c)T=[c¤IA;A00]nnls(A;b)lscov(A;b;v)VPoissonDistributionp(x)=¸xx!e¡¸x;x=0;1;¢¢¢10.2(PoissonDistributionCurve)¸=1;2;5;10Poissonnormaldistributionp(x)=1p2¼¾e¡(x¡¹)2¾210.3(NormalDistributionCurve)¹=0;1;2¾2=1;2;3NormalGammaDistributionp¡(x)=(¸axa¡1¡(a)x00x0¡(a)=Z10xa¡1e¡xdx10.1:1x=[0:15]';y1=[];y2=[];lambda=[1,2,5,10];fori=1:length(lambda)2y1=[y1,poisspdf(x,lambda(i))];3y2=[y2,poisscdf(x,lambda(i))];4endplot(x,y1),¯gure;plot(x,y2)-176-soft10.2:1x=[¡15:.05:15]';y1=[];y2=[];mu=[0,1,2];sig=[1,2,3];for2i=1:length(mu)3y1=[y1,normpdf(x,mu(i),sig(i))];4y2=[y2,normcdf(x,mu(i),sig(i))];5endplot(x,y1),¯gure;plot(x,y2)¡(a)=a¡(a¡1)¡(1)=1¡(12)=¼gamma()chidistributionp(x)=(12k2¡(k2)xk2¡1e¡x2x00x0Tp(x)=¡(k+12)pk¼¡(k2)·1+x2k¸¡k+12Fp(x)=(¡(p+q2)¡(p2)¡(q2)pp2qq2xp2¡1(p+qx)¡p+q2x00x0Rayleighp(x)=(xb2e¡x22b2x00x010.4();´p(x;y)=½x2+13xy06x61;06y620else:P(1/2j´1/2)10.3GammaDistributionCurve1x=[¡0.5:.02:15]';2y1=[];y2=[];a=[0,¡1,1];lambda=[0.1,1,1];fori=1:length(a)3y1=[y1,gampdf(x,a(i),lambda(i))];4y2=[y2,gamcdf(x,a(i),lambda(i))];5endplot(x,y1),¯gure;plot(x,y2)-177-10.4matlab10.4CHIDistributionCurve1x=[¡eps:¡0.02:¡0.05,0:0.02:2];x=sort(x');k=[1,2,3,4,5];y1=[];2y2=[];34fori=1:length(k)5y1=[y1,chi2pdf(x,k(i))];6y2=[y2,chi2cdf(x,k(i))];7endplot(x,y1),¯gure;plot(x,y2)10.5TDistributionCurve1x=[¡5:0.05:5]';k=[1,2,3,4,5];y1=[];y2=[];23fori=1:length(k)4y1=[y1,tpdf(x,k(i))];5y2=[y2,tcdf(x,k(i))];6endplot(x,y1),¯gure;plot(x,y2)10.6FDistributionCurve1x=[¡eps:¡0.02:¡0.05,0:0.02:2];=sort(x');2p=[1,2,3,4,5]';3q=[2,3,4,5,6]';y1=[];y2=[];45fori=1:length(p)6y1=[y1,fpdf(x,p(i),q(i))];7y2=[y2,fcdf(x,p(i),q(i))];8endplot(x,y1),¯gure;plot(x,y2)10.7RayleighDistributionCurve1x=[¡eps:¡0.02:¡0.05,0:0.02:2];x=sort(x');23b

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

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

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

×
保存成功