• 386.08 KB
  • 2022-04-22 11:45:40 发布

张欣《可计算一般均衡模型的基本原理与编程》的课后习题答案.pdf

  • 19页
  • 当前文档由用户上传发布,收益归属用户
  1. 1、本文档共5页,可阅读全部内容。
  2. 2、本文档内容版权归属内容提供方,所产生的收益全部归内容提供方所有。如果您对本文有版权争议,可选择认领,认领后既往收益都归您。
  3. 3、本文档由用户上传,本站不保证质量和数量令人满意,可能有诸多瑕疵,付费之前,请仔细先通过免费阅读内容等途径辨别内容交易风险。如存在严重挂羊头卖狗肉之情形,可联系本站下载客服投诉处理。
  4. 文档侵权举报电话:19940600175。
'张欣《可计算一般均衡模型的基本原理与编程》的课后习题答案第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行模型为:0.8180.0980.0848804808800.1590.2090.159153099015300.0910.0980.23410705901070Q139.062b.计算结果:Q2286.618Q41.3013程序 $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.投入产出模型为:110.1820.1590.0910.205*1.10.0401ΔP(IA")Aw0.09810.2090.0980.366*1.10.055xx0.0840.19510.2340.140*1.10.0342.价格模型为PA"PAwAwttkk计算结果显示:制造业价格增加2.1%,服务业增加2.1%。第四章SAM表支出12345678储蓄—投活动商品要素居民企业政府国外汇总资账户市场销售居民自总产1活动产出产自销出市场销中间政府消总需2商品交易成本售的私投资出口投入费求人消费国外要要素3要素增值素收入收入居民之政府对国外对居民居民要素企业对居民4居民间转移居民转居民转总收收入转移支付支付移支付移支付入政府对国外对企业收企业要素企业的企业的5企业总收入收入转移支转移支入付付企业直接国外对生产销售税,要素税,直接政府税,企业向政府的6政府税增关税,出政府要素税,收总收政府缴纳盈转移支值税口税收入入税入余付储蓄—投居民储政府储国外净总储7企业储蓄资账蓄蓄储蓄蓄户对国外要企业向国外政府对外汇8国外进口素的支付支付盈余国外的支出 支付总投居民支政府支总投外汇收汇总总供应要素支出企业支出入出出资入注:表中标注黄色的为习题上要求归类的变量第五章SAM表平衡1.(a)最小二乘法平衡的结果是:1601509047014032017091080150250610Q3203604301705601501110880GAMS程序为:$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)假设居民消费不可靠,得到的结果为:160809054014032017091080150250610Q3203604301706301501110950在程序中加入限制条件,只需改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.000 total920.0001540.0002000.0002000.000900.0002900.000tartot920.0001540.0002000.0002000.000900.0002900.000相应的GAMS程序为:setac/sec1,sec2,sec3,lab,cap,hh,total,tartot/;seti(ac)/sec1,sec2,sec3,lab,cap,hh/;alias(ac,acp);alias(i,j);tablesam(*,*)thesocialaccountingmatrixsec1sec2sec3labcaphhtotalTARTOTsec116015090540940920sec214032017091015401540sec38015025061010002000lab32036040010802000cap170550150870900hh105086019102900total8701530106010508602060TARTOT9201540200020009002900;parameterrowdis(i)condis(i)maxdisiter;maxdis=0.1;iter=1;while(iter<5000andmaxdis>1e-10,sam("total",j)=sum(i,sam(i,j));sam(i,j)=sam(i,j)/sam("total",j)*sam("tartot",j);sam(i,"total")=sum(j,sam(i,j));sam(i,j)=sam(i,j)/sam(i,"total")*sam(i,"tartot");condis(i)=abs(sum(j,sam(j,i)))-sam("tartot",i);rowdis(i)=abs(sum(j,sam(i,j)))-sam(i,"tartot");maxdis=smax{i,max{condis(i),rowdis(i)}};iter=iter+1; );displaysam,maxdis,iter;*end(e)直接交叉熵平衡的结果为:SAMS程序为: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)h0;*assignmentforparametersq0(i,j)=sam(i,j);h0=sum((i,j),sam(i,j));displayh0,sam;variablesq(i,j) hhratioz*nonnegpositivevariableq(i,j);equationstotalsumdirectentropybalancehratiodef;totalsum..h=e=sum((i,j),q(i,j));hratiodef..hratio=e=h/h0;directentropy..z=e=sum((i,j)$sam(i,j),(1/h)*q(i,j)*log(q(i,j)/sam(i,j))-log(hratio));balance(i)..sum(j,q(i,j))=e=sum(j,q(j,i));q.l(i,j)=q0(i,j);h.l=h0;hratio.lo=0.5;hratio.up=2;modelsambal/all/;solvesambalusingnlpminimizingz;displayq.l,h.l,hratio.l;*end第六章一般均衡理论及其应用化1.消费者在预算约束条件下对效用最大化1maxuqls.t.lL1,qcL,ywlpq1u(cL)(1L)du*令0,得到LdL****假设价格p=1,则进一步解得:qc,p1,wc,yc2.超额需求函数可定义为 iiiZk(p)xk(p,pe)ekiIiI其中e为禀赋,x为需求,p是价格向量。ii消费约束为pxpeii从约束出发,取等号pxpennniikiipkxpkepk(xi(p,pe)ek)0k1k1k1nkii将上式对消费人数求和,有pk(xi(p,pe)ek)0iIk1nki由于求和的次序可以互换,有pk(xi(p,pe)0k1iInkii这等价于pk(xi(p,pe)ek)0k1IiIn由超额需求函数定义有pkZk(p)0k1即pZ(p)0证毕!第七章CES生产函数2.解:mincwxwxwx112233s.t.f(x1,x2,x3)A(xxx)/q112233使用拉格朗日乘数等式解得:11w11x2w33x2;;A(xxx)/q;wxwx112233221223即为要素需求函数的联立方程隐形表达。解该联立方程得:1c1i111x(w1,w2,w3,q)[www]q(i=1,2,3)iAw112233i成本函数为:31c(w1,w2,w3,q)wxc(w1,w2,w3,q)1[w1w1w1]1qii112233i1A按照商品价格等于边际成本的利润最大化原则求导,即得到商品供应函数,有1pc(w1,w2,w3,q)1[w1w1w1]1112233cA 3.结果:A=2.7330.2680.6030.129123程序$titleDeamonstration:ExerciseforaCESfunctionparameterelasrhodelta1delta2delta3scaleAx10x20x30q0w10w20w30p0;elas=0.5;w10=1;w20=1;w30=1;p0=1;x10=130;x20=195;x30=90;q0=415;rho=1-1/elas;delta1=w10*x10**(1-rho)/(w10*x10**(1-rho)+w20*x20**(1-rho)+w30*x30**(1-rho));delta2=w20*x20**(1-rho)/(w10*x10**(1-rho)+w20*x20**(1-rho)+w30*x30**(1-rho));delta3=w30*x30**(1-rho)/(w10*x10**(1-rho)+w20*x20**(1-rho)+w30*x30**(1-rho));scaleA=q0/(delta1*x10**rho+delta2*x20**rho+delta3*x30**rho)**(1/rho);displayrho,delta1,delta2,delta3,scaleA,x10,x20,x30,q0,w10,w20,w30,p0;variablex1x2x3 qw1w2w3p;equationQeqFOCeqFOCeq2PRICEeq;Qeq..q=e=scaleA*(delta1*x1**rho+delta2*x2**rho+delta3*x30**rho)**(1/rho);FOCeq..delta1/delta2=e=w1*x1**(1-rho)/(w2*x2**(1-rho));FOCeq2..delta2/delta3=e=w2*x2**(1-rho)/(w3*x3**(1-rho));PRICEeq..p*q=e=w1*x1+w2*x2+w3*x3;p.l=p0;x1.l=x10;x2.l=x20;x3.l=x30;q.fx=q0;w1.fx=w10;w2.fx=w20;w3.fx=w30;modelCES/all/;solveCESusingmcp;parameterrepbase;repbase("inputx1")=x1.l;repbase("inputx2")=x2.l;repbase("inputx3")=x3.l;repbase("qpricep0")=p.l;displayrepbase; 第八章函数嵌套的CGE模型2.要将书中的第一层换成列昂惕夫函数,改动的主要是黄色部分,改动部分的数学表达式如下:第一层列昂惕夫函数关系式:QAQVAQINTAaaaQVAQAaba(sam("lab",a)sam("cap",a))/sam("total",a)b具体程序如下:$title有CES嵌套函数的CGE模型setac/agri,manu,serv,lab,cap,hh,total/;seta(ac)/agri,manu,serv/;setf(ac)/lab,cap/;;alias(ac,acp),(a,ap),(f,fp);tablesam(ac,acp)agrimanuservlabcaphhtotalagri3302401858351560manu28538029010151970serv3753153554651510lab4504954501395cap150540230920hh13959201620total15601970151013959202315;parameterrhoq(a)/agri=0.2,manu=0.3,serv=0.1/rhova(a)/agri=0.25,manu=0.5,serv=0.8/parametersscaleaq(a)deltaq(a)scaleava(a)deltava(a)ia(a,ap)deltab(a)shrh(a)pa0(a)qa0(a)pva0(a)qva0(a) pinta0(a)qinta0(a)qint0(a,ap)qld0(a)qkd0(a)qls0qks0wl0wk0yh0qh0(a);pa0(a)=1;pva0(a)=1;pinta0(a)=1;wk0=1;wl0=1;qa0(a)=sam("total",a)/pa0(a);qva0(a)=SUM(f,sam(f,a));qint0(a,ap)=sam(a,ap)/pa0(a);qinta0(a)=sum(ap,qint0(ap,a));ia(a,ap)=qint0(a,ap)/qinta0(ap);deltab(a)=qva0(a)/sam("total",a);qls0=sum(a,sam("lab",a))/wl0;qks0=sum(a,sam("cap",a))/wk0;Qld0(a)=sam("lab",a)/wl0;qkd0(a)=sam("cap",a)/wk0;deltaq(a)=pva0(a)*qva0(a)**(1-rhoq(a))/(pva0(a)*qva0(a)**(1-rhoq(a))+pinta0(a)*qinta0(a)**(1-rhoq(a)));scaleaq(a)=qa0(a)/(deltaq(a)*qva0(a)**rhoq(a)+(1-deltaq(a))*qinta0(a)**rhoq(a))**(1/rhoq(a));deltava(a)=wl0*qld0(a)**(1-rhova(a))/(wl0*qld0(a)**(1-rhova(a))+wk0*qkd0(a)**(1-rhova(a)));scaleava(a)=qva0(a)/(deltava(a)*qld0(a)**rhova(a)+(1-deltava(a))*qkd0(a)**rhova(a))**(1/rhova(a));yh0=wl0*qls0+wk0*qks0;qh0(a)=sam(a,"hh")/pa0(a);shrh(a)=(pa0(a)*qh0(a))/sum(ap,sam(ap,"hh"));variablepa(a),pva(a),pinta(a),wl,wk,qa(a),qva(a),qinta(a),qint(a,ap),qld(a),qkd(a),qls,qks,yh,qh(a);*pa(a),pva(a),pinta(a),wl,wk,qa(a),qva(a),qinta(a),qint(a,ap),qld(a),qkd(a),qls,qks,yh,qh(a);equationqafn(a)QAFOCeq(a)paeq(a)qvafn(a) qvafoc(a)pvaeq(a)qintfn(a,ap)pintaeq(ap)yheqqheq(a)comequi(a)leqkeq;qafn(a)..qa(a)=e=QVA(a)+QINTA(a);QAFOCeq(a)..QVA(a)=e=deltab(a)*QA(a);paeq(a)..PA(a)*QA(a)=e=PVA(a)*QVA(a)+PINTA(a)*QINTA(a);qvafn(a)..qva(a)=e=scaleava(a)*(deltava(a)*qld(a)**rhova(a)+(1-deltava(a))*qkd(a)**rhova(a))**(1/rhova(a));qvafoc(a)..wl/wk=e=(deltava(a)/(1-deltava(a)))*(qkd(a)/qld(a))**(1-rhova(a));pvaeq(a)..pva(a)*qva(a)=e=wl*qld(a)+wk*qkd(a);qintfn(a,ap)..qint(a,ap)=e=ia(a,ap)*qinta(ap);pintaeq(ap)..pinta(ap)=e=sum(a,ia(a,ap)*pa(a));yheq..yh=e=wl*qls+wk*qks;qheq(a)..pa(a)*qh(a)=e=shrh(a)*yh;comequi(a)..qa(a)=e=sum(ap,qint(a,ap))+qh(a);leq..sum(a,qld(a))=e=qls;keq..sum(a,qkd(a))=e=qks;pa.l(a)=pa0(a);pva.l(a)=pva0(a);pinta.l(a)=pinta0(a); qa.l(a)=qa0(a);qva.l(a)=qva0(a);qinta.l(a)=qinta0(a);qint.l(a,ap)=qint0(a,ap);qld.l(a)=qld0(a);qkd.l(a)=qkd0(a);wk.l=1;wl.l=1;qls.fx=qls0;qks.fx=qks0;yh.l=yh0;qh.l(a)=qh0(a);modelcge/all/;solvecgeusingmcp;qks.fx=qks0*1.1;modelsim1/all/;solvesim1usingmcp;*end第九章效用函数和居民的商品需求3.计算结果:0.3330.130平均预算份额:s0.367;边际预算份额:0.4300.3000.440519.544复制检验顺利通过。居民收入增加10%,新的需求为Q614.495。515.961GAMS程序:$title例9.LES需求函数的参数校调、函数赋复制检验和模拟*生产部门和商品包括农业制造业服务seta/agri,manu,serv/;setinst/hh/;alias(a,ap);tablesam(a,inst)hhagri500manu550serv450 ;parameterleselas(a)/agri0.4,manu1.2,serv1.5/frisch/-2/;parameterspa0(a)qh0(a)eh0bgtshr(a)bgtshrchklesbeta(a)lesbetachklessub(a);pa0(a)=1;qh0(a)=sam(a,"hh")/pa0(a);eh0=sum(a,qh0(a)*pa0(a));bgtshr(a)=sam(a,"hh")/eh0;bgtshrchk=sum(a,bgtshr(a));*以下是LES函数lesbeta(a)=leselas(a)*bgtshr(a)/(sum(ap,leselas(ap)*bgtshr(ap)));lesbetachk=sum(a,lesbeta(a));lessub(a)=sam(a,"hh")+(lesbeta(a)/pa0(a))/(eh0/frisch);displayfrisch,pa0,qh0,eh0,bgtshr,bgtshrchk,lesbeta,lesbetachk,lessub,leselas;variablepa(a),qh(a),eh;equationqheq(a);qheq(a)..pa(a)*qh(a)=e=pa(a)*lessub(a)+lesbeta(a)*(eh-sum(ap,pa(ap)*lessub(ap)));pa.fx(a)=pa0(a);qh.l(a)=qh0(a);eh.fx=eh0;modelcge/all/;solvecgeusingmcp;displaypa.l,qh.l,eh.l;eh.fx=eh0*1.1;modelsim1/all/;solvesim1usingmcp;displaypa.l,qh.l,eh.l;'