张欣《可计算一般均衡模型的基本原理与编程》的课后习题答案第2章投入产出表和投入产出模型1、将下面投入产出表填满:农业制造业中间投入合计最终使用总产出农业160210370380750制造业1403204606301090中间投入合计300530增加值4505601010总投入合计7501090计算过程:第一行,160+210=370,750-370=380。第二行,1090-630=460,460-140=320。第三行,160+140=300,210+320=530。第五行,总投入=总产出第四行,750-300=450,1090-530=560,450+560=10102.a行模型为:1070153088059099048010701530880234.0098.0091.0159.0209.0159.0084.0098.0818.0b.计算结果:301.41618.286062.39321QQQ程序$titleinput-outputmodelsetac/sec1,sec2,sec3,labor,finaluse,fotal/;seti(ac)/sec1,sec2,sec3/;alias(i,j);tableIO(*,*)sec1sec2sec3finaluseTotalsec1160150100480880sec21403205309001530sec3801502505901070labor320350410capital180560150total88015301070;parameterint(i,j)use(i)lab(i)cap(i)a(i,j)Q0(i);int(i,j)=IO(i,j);use(i)=IO(i,finaluse);lab(i)=IO(labor,i);cap(i)=IO(capital,i);Q0(i)=IO(total,i);a(i,j)=int(i,j)/Q0(j);displayint,use,lab,Q0,a;variableQ(i);equationcommodityequi(i);commodityequi(i)..sum(j,a(i,j)*Q(j))+use(i)=e=Q(i);Q.l(i)=Q0(i);modelIOmodel/all/;solveIOmodelusingmcp;displayQ.lparameteruse2(i)/sec10sec2200sec30/;displayuse2equationcommodityequi2(i);commodityequi2(i)..sum(j,a(i,j)*Q(j))+use2(i)=e=Q(i);modelsimiomodel/commodityequi2/solvesimiomodelusingmcp;display'Q.1,为求解的结果',Q.l第三章投入产出中的价格关系程序:setac/sec1,sec2,sec3,labor,capital,finaluse,total/;seti(ac)/sec1,sec2,sec3/;setg(ac)/labor,capital/;setj(ac)/sec1,sec2,sec3,finaluse,total/;sets(ac)/sec2,sec3/;alias(i,ii);alias(s,ss);tablei0(*,*)sec1sec2sec3finaluseTotalsec116015090480880sec21403201709001530sec3801502505901070labor320350410capital180560150total88015301070;parametera(i,ii)b(g,ii)*int(i,ii)p0(i)w0(g)use(i)lab(ii)cap(ii)q0(i);p0(i)=1;w0(g)=1;a(i,ii)=(p0(i)*i0(i,ii))/(p0(ii)*i0(total,ii));b(g,ii)=(w0(g)*i0(g,ii))/(p0(ii)*i0(total,ii));use(i)=i0(i,finaluse)/p0(i);lab(ii)=i0(labor,ii)/w0(labor);cap(ii)=i0(capital,ii)/w0(capital);q0(i)=i0(total,i)/p0(i);variablep(i)w(g)q(i);displaya,b,p0,w0,use,lab,cap,q0;equationpriceequ(ii);priceequ(ii)..sum(i,a(i,ii)*p(i))+sum(g,b(g,ii)*w(g))=e=p(ii);p.l(i)=p0(i);w.fx(g)=w0(g);modeliopricemodel/all/;solveiopricemodelusingmcp;displayp.l,w.l;parameterwl1laborpricewk1capitalcost;wl1=1;wk1=1.1;displaywl1,wk1;equationsim1priceequ(ii);sim1priceequ(ii)..sum(i,a(i,ii)*p(i))+b(capital,ii)*wk1+b(labor,ii)*wl1=e=p(ii);p.l(i)=p0(i);modelsimpricemodel/sim1priceequ/;solvesimpricemodelusingmcp;parameterpincrease(ii)increaseinpriceinvarioussectors;pincrease(ii)=p.l(ii)-1displayp.l,pincrease;parameterp20(s)p2fx(ss)a2(s,ss)a22(ss)b2(g,ss);p20(s)=1;p2fx(ss)=1.15;a2(s,ss)=i0(s,ss)/i0(total,ss);a22(ss)=i0(sec1,ss)/i0(total,ss);b2(g,ss)=i0(g,ss)/i0(total,ss);displaya2,b2,p2fx;variablep2(s);equationsim2priceequ(ss);sim2priceequ(ss)..sum(s,a2(s,ss)*p2(s))+a22(ss)*p2fx(ss)+sum(g,b2(g,ss)*w(g))=e=p2(ss);p2.l(s)=p20(s);modelsim2pricemodel/sim2priceequ/;solvesim2pricemodelusingmcp;parameterpincrease2(ss)increaseinpriceinvarioussectors;pincrease2(ss)=p2.l(ss)-1displayp2.l,pincrease2;*end1.投入产出模型为:034.0055.0040.01.1*140.01.1*366.01.1*205.0234.01195.0084.0098.0209.01098.0091.0159.0182.011xwx1A)A'(IΔP2.价格模型为ktwwktAAPA'P计算结果显示:制造业价格增加2.1%,服务业增加2.1%。第四章SAM表支出12345678活动商品要素居民企业政府储蓄—投资账户国外汇总收入1活动市场销售产出居民自产自销总产出2商品中间投入交易成本市场销售的私人消费政府消费投资出口总需求3要素增值国外要素收入要素收入4居民居民要素收入居民之间转移支付企业对居民转移支付政府对居民转移支付国外对居民转移支付居民总收入5企业企业要素收入政府对企业的转移支付国外对企业的转移支付企业总收入6政府生产税增值税销售税,关税,出口税要素税,政府要素收入直接税,收入税企业直接税,企业向政府缴纳盈余国外对政府的转移支付政府总收入7储蓄—投资账户居民储蓄企业储蓄政府储蓄国外净储蓄总储蓄8国外进口对国外要素的支付企业向国外支付盈余政府对国外的外汇支出支付汇总总投入总供应要素支出居民支出企业支出政府支出总投资外汇收入注:表中标注黄色的为习题上要求归类的变量第五章SAM表平衡1.(a)最小二乘法平衡的结果是:61091047088011101505601704303603202501508017032014090150160QGAMS程序为:$title===leastsquarebalancemethod=====setac/sec1,sec2,sec3,lab,cap,hh,total/;seti(ac)/sec1,sec2,sec3,lab,cap,hh/;alias(ac,acp);alias(i,j);tablesam(*,*)sec1sec2sec3labcaphhtotalsec116015090540940sec21403201709101540sec3801502506101000lab3203604001080cap170550150870hh10508601910total8701530106010508602060;parametersQ0(i,j)initialvalue;Q0(i,j)=sam(i,j);variablesQ(i,j)z;positivevariablesQ(i,j);equationssumsquarebalance;sumsquare..z=e=sum((i,j)$sam(i,j),(Q(i,j)-sam(i,j))**2);balance(i)..sum(j,Q(i,j))=e=sum(j,Q(j,i));Q.l(i,j)=Q0(i,j);modelsambal/all/;solvesambalusingnlpminimizingz;displayQ.l;(b)假设居民消费不可靠,得到的结果为:6109105409501110150630170430360320250150801703201409080160Q在程序中加入限制条件,只需改equation步:equationssumsquarebalanceitem;sumsquare..z=e=sum((i,j)$sam(i,j),(Q(i,j)-sam(i,j))**2);balance(i)..sum(j,Q(i,j))=e=sum(j,Q(j,i));item(i)..Q(i,'hh')=e=Q0(i,'hh');Q.l(i,j)=Q0(i,j);(d)RAS法平衡的结果是:sec1sec2sec3labcaphhtotaltartotsec1105.09499.61899.163616.125920.000920.000sec292.554213.898188.5241045.0241540.0001540.000sec393.532177.318490.2991238.8512000.0002000.000lab472.334537.269990.3972000.0002000.000cap156.487511.896231.617900.000900.000hh2000.000900.0002900.0002900.000total920.0001540.0002000.0002000.000900.0002900.000tartot920.0001540.0002000.0002000.000900.0002900.000相应的GAMS程序为:setac/sec1,sec2,sec3,lab,cap,hh,total,tartot/;seti(ac)/