$TITLE: M7-4.GMS: Large-Group Monopolistic Competition * calibrated to an elasticity of substitution of 5 $ONTEXT Production Sectors Consumers Markets | XC N Y W | CONS ENTR -------------------------------------------------------------- PX | 100 -100 | PY | 100 -100 | PN | 20 | -20 PW | 200 | -200 PL | -80 -20 -100 | 200 MK | -20 | 20 $OFFTEXT PARAMETERS SI SIGMA: elasticity of substitution among varieties FC parameter setting the level of fixed costs ENDOWL endowment of labor MODELSTAT statistic indicating model solved: 0 = solved; SI = 5; FC = 20; ENDOWL = 200; POSITIVE VARIABLES X Activity level for X (output per firm) XC Composite X (utility value of agg X sector output) N Number of X sector firms (variety measure) Y Activity level of Y output W Activity level for welfare PX Price of an individual X variety PE Price index (unit expenditure function): cost of XC = 1 PN Price of fixed costs (price of entering) PY Price of Y PW Price index for utility (consumer price index) PL Price of labor CONS Income of the representative consumer; EQUATIONS PRICEX MR = MC in X (associated with X output per firm) PINDEX Price index for X sector goods PRICEN Zero profits - free entry in X (associated with N) PRICEY Zero profit condition for Y (PY = MC) PRICEW Zero profit condition for W (PW = MC of utility) DX Supply-demand balance for X (individual variety) DXC Supply-demand balance for XC DN Supply-demand for firms N: markup rev = fexed cost DY Supply-demand balance for Y DW Supply-demand balance for utility W (welfare) LAB Supply-demand balance for labor INCOME National income; PRICEX.. PL =G= PX*(1-1/SI); PINDEX.. (N*PX**(1-SI))**(1/(1-SI)) =G= PE; PRICEN.. PL =G= PN; PRICEY.. PL =G= PY; PRICEW.. (PE**0.5)*(PY**0.5) =G= PW; DX.. X*80 =G= PX**(-SI)*(PE**(SI-1))*CONS/2; DXC.. XC =G= N**(SI/(SI-1))*X; DN.. N*FC =G= (PX/SI)*X*80*N/PN; DY.. Y*100 =G= CONS/(2*PY); DW.. 200*W =G= (1.25**0.5)*CONS/PW; LAB.. ENDOWL =E= Y*100 + N*X*80 + N*FC; INCOME.. CONS =E= PL*ENDOWL; MODEL M62 /PRICEX.X, PRICEY.Y, PRICEW.W, PRICEN.N, PINDEX.XC, DX.PX, DXC.PE, DN.PN, DY.PY, DW.PW, LAB.PL, INCOME.CONS/; * set benchmark values: PE.L = 1.25; CONS.L = 200; X.L = 1; XC.L = 1; Y.L = 1; N.L = 1; W.L = 1; PX.L = 1.25; PN.L = 1; PY.L = 1; PL.L = 1; PW.L = 1.25**0.5; * choose the price of good Y as numeraire PY.FX = 1; * check for calibration and starting-value errors M62.ITERLIM = 0; SOLVE M62 USING MCP; M62.ITERLIM = 1000; SOLVE M62 USING MCP; MODELSTAT = M62.MODELSTAT - 1.; DISPLAY MODELSTAT; * Counterfactual: expand the size of the economy ENDOWL = 400; SOLVE M62 USING MCP; * show welfare as a function of the economy's size SETS I indexes 25 different size levels /I1*I25/; PARAMETERS SIZE(I) WELFARE(I) WELFCAP(I) FIRMSIZE(I) FIRMNUMB(I) MARKUPM(I) RESULTS(I,*); LOOP(I, SIZE(I) = 5.2 - 0.2*ORD(I); ENDOWL = 200*SIZE(I); SOLVE M62 USING MCP; WELFARE(I) = W.L; WELFCAP(I) = WELFARE(I)/SIZE(I); FIRMSIZE(I) = X.L; FIRMNUMB(I) = N.L; MARKUPM(I) = 1/SI; ); RESULTS(I, "SIZE") = SIZE(I); RESULTS(I, "WELFARE") = WELFARE(I); RESULTS(I, "WELFCAP") = WELFCAP(I); RESULTS(I, "FIRMSIZE") = FIRMSIZE(I); RESULTS(I, "FIRMNUMB") = FIRMNUMB(I); RESULTS(I, "MARKUP") = MARKUPM(I); DISPLAY RESULTS; * Write parameter RESULTS to an Excel file TRCOST.XLS, * starting in Sheet1, $LIBINCLUDE XLDUMP RESULTS M7.XLS SHEET1!A31 *Execute_Unload 'M7.gdx' RESULTS *execute 'gdxxrw.exe M7.gdx par=RESULTS rng=SHEET2!A31'