$title Illustrative MPSGE model based on a social accounting matrix * See sam.xls for the dataset (here is the Excel file) * Here is a scalar version of the MPSGE model * with numeric coefficients corresponding to specific entries in * the SAM.* This file illustrates an analysis of the economic consequences * of alternative bilateral aid programs. It illustrates the * economic efficiency advantages afforded by aid programs which * help the government reduce trade taxes. This program is compared * with aid packages directed to private households and a * program which seeks to increase direct foreign investment. set i SAM row and column indices /1*14/, s Sectors / agr Agriculture, ind Industry, ser Services /, f Primary factors / L Labor, N Land, K Capital/, h Households / rural, urban/ * Goods and sectors are identical: alias (s,g,gg), (i,j), (h,ha,hh);; set mapa(i,s) Mapping from SAM to activities /1.agr, 2.ind, 3.ser/, mapc(i,g) Mapping from SAM to commodities /4.agr, 5.ind, 6.ser/, mapf(i,f) Mapping from SAM to factors /7.L, 8.N, 9.K /, maph(i,h) Mapping from SAM to households / 10.rural, 11.urban/, mapg(i) Identifies government in the SAM /12/, mapi(i) Identifies the investment row /13/, mapx(i) Identifies the rest of world /14/; parameter sam(i,j) Base year social accounts; * This dataset could be imported from an Excel file * using XLLINK: * $libinclude xlimport sam sam.xls sam * For portability, we will simply read in the numbers: parameter sam / 1.4 28006.2, 2.5 35920.6, 3.6 30722.1, 4.1 2162.7, 4.2 8851.6, 4.3 117.2, 4.10 4299.9, 4.11 1864.1, 4.12 234.3, 4.13 372.7, 4.14 12300.9, 5.1 2607.9, 5.2 12466.7, 5.3 1893.8, 5.10 15349.9, 5.11 11151, 5.12 7372.4, 5.13 2189.1, 5.14 2395.1, 6.1 5277.6, 6.2 4625.2, 6.3 6655.2, 6.10 5197.3, 6.11 8478.4, 6.12 4292, 6.14 3326, 7.1 9594.1, 7.2 3856.5, 7.3 14334.6, 8.1 5418.7, 9.1 2945.3, 9.2 6121.4, 9.3 7721, 10.7 19698, 10.8 3081.8, 10.9 1238.6, 10.12 1071.9, 11.7 7598.7, 11.8 2336.9, 11.9 12532.6, 11.12 513.3, 12.4 334.7, 12.5 3897.6, 12.6 855.8, 12.7 489, 12.9 1527.2, 12.10 230.2, 12.11 1291.7, 12.13 4700.1, 12.14 3110, 13.9 136.3, 13.10 12.8, 13.11 196.2, 13.12 2952.5, 13.14 3964, 14.4 1862.4, 14.5 15606.7, 14.6 6273.9, 14.9 1352.9 /; * Scale the social accounting matrix so that the average entry * is roughly 1: sam(i,j) = sam(i,j) / 1000; display sam; parameter chksam(i) Consistency check of social accounts; chksam(i) = sum(j, sam(i,j)-sam(j,i)); display "Consistency check before balancing:", chksam; * Balance the SAM using nonlinear programming: variable obj Objective -- least squares deviation; positive variable es(i,j) Estimate of SAM entries; equations objdef Defines the deviation balance(i) SAM balance condition; scalar penalty /1e6/; objdef.. obj =e= sum((i,j), sqr(es(i,j)-sam(i,j))) + sum((i,j)$(not sam(i,j)), penalty * es(i,j)); balance(i).. sum(j, es(i,j)) =e= sum(j, es(j,i)); es.l(i,j) = sam(i,j); model sambal /all/; solve sambal using nlp minimizing obj; parameter nz(i,j) New nonzeros in the SAM; nz(i,j) = es.l(i,j)$(not sam(i,j)); display nz; sam(i,j) = es.l(i,j); chksam(i) = sum(j, sam(i,j)-sam(j,i)); display "Consistency check after balancing:", chksam; * Extract submatrices from the social accounts: parameter id0(g,s) Intermediate demand fd0(f,s) Factor demand tm0(g) Import tariff collection m0(g) Imports (cif), c0(g,h) Private consumption g0(g) Government demand i0(g) Investment demand x0(g) Exports tx0 Export taxes (total) ti0 Investment taxes (total) fe0(f,h) Factor endowments it0(h) Income taxes, s0(h) Private saving, gs0 Government saving fs0 Foreign savings tf0(f) Factor taxes tr0(h) Government transfers to households, it0(h) Income tax payments tx(g) Export tax rate (assumed uniform) px0(g) Reference price for exports d0(s) Domestic supply a0(s) Aggregate supply pm0(s) Reference price of imports tm(s) Import tariff rate ti Investment tax rate inv0 Total investment depr0(f) Deprecation xk0(f) Foreign factor return aid(*) Foreign aid (alternative allocations); loop((mapc(i,g), mapa(j,s)), id0(g,s) = sam(i,j) ); loop((mapf(i,f), mapa(j,s)), fd0(f,s) = sam(i,j) ); loop((mapc(j,g), mapg(i)), tm0(g) = sam(i,j) ); loop((mapc(j,g), mapx(i)), m0(g) = sam(i,j) ); loop((mapc(i,g), maph(j,h)), c0(g,h) = sam(i,j) ); loop((mapc(i,g), mapg(j)), g0(g) = sam(i,j)); loop((mapc(i,g), mapi(j)), i0(g) = sam(i,j)); loop((mapc(i,g), mapx(j)), x0(g) = sam(i,j)); loop((mapg(i), mapx(j)), tx0 = sam(i,j)); loop((mapg(i), mapi(j)), ti0 = sam(i,j)); loop((maph(i,h),mapf(j,f)), fe0(f,h) = sam(i,j)); loop((mapg(i), maph(j,h)), it0(h) = sam(i,j)); loop((mapi(i), maph(j,h)), s0(h) = sam(i,j)); loop((mapi(i), mapg(j)), gs0 = sam(i,j)); loop((mapi(i), mapx(j)), fs0 = sam(i,j)); loop((maph(i,h), mapg(j)), tr0(h) = sam(i,j)); loop((mapg(i), mapf(j,f)), tf0(f) = sam(i,j)); loop((mapx(i), mapf(j,f)), xk0(f) = sam(i,j)); loop((mapi(i), mapf(j,f)), depr0(f) = sam(i,j)); * Assume a uniform export tax: tx(g) = tx0 / (tx0 + sum(gg, x0(gg))); px0(g) = 1 - tx(g); * Express x0(g) as a gross of tax value: x0(g) = x0(g) / (1 - tx(g)); d0(s) = sum(g, id0(g,s)) + sum(f, fd0(f,s)) - x0(s)*px0(s); tm(g) = tm0(g) / m0(g); pm0(g) = 1 + tm(g); a0(g) = d0(g) + m0(g) * pm0(g); inv0 = ti0 + sum(g, i0(g)); ti = ti0/inv0; $ontext $model:soe $sectors: y(s) ! Sectoral output (domestic production) a(s) ! Aggregate supply (Armington aggregate) c(h) ! Household consumption invest ! Aggregate investment $commodities: pd(s) ! Domestic output pa(s) ! Composite demand price pc(h) ! Household consumption price pf(f) ! Factor prices pinv ! Investment pfx ! Price of foreign exchange $consumers: ra(h) ! Private households govt ! Government fdi ! Foreign firms and investors $auxiliary: tau ! Index of import and export taxes * Production for domestic market and for export: $prod:y(s) s:0 t:4 va:1 o:pfx q:x0(s) p:px0(s) a:govt n:tau m:tx(s) o:pd(s) q:d0(s) i:pa(g) q:id0(g,s) i:pf(f) q:fd0(f,s) va: $report: v:x(s) o:pfx prod:y(s) * Armington aggregation of domestic and imported goods: $prod:a(s) s:2 o:pa(s) q:a0(s) i:pd(s) q:d0(s) i:pfx q:m0(s) p:pm0(s) a:govt n:tau m:tm(s) $report: v:m(s) i:pfx prod:a(s) * Investment: $prod:invest o:pinv q:inv0 a:govt t:ti i:pa(g) q:i0(g) * Household consumption: $prod:c(h) s:1 o:pc(h) q:(sum(g, c0(g,h))) i:pa(g) q:c0(g,h) * Household demand (with exogenously fixed investment, * taxes and transfers): $demand:ra(h) d:pc(h) e:pinv q:(-s0(h)) e:pc(h) q:(tr0(h)-it0(h)) e:pf(f) q:fe0(f,h) * Foreign aid to households: e:pfx q:aid(h) * Government demand: $demand:govt s:0 * Government demand for goods appears here: d:pa(g) q:g0(g) * Income tax revenue less transfers, fixed in real terms: e:pc(h) q:(it0(h)-tr0(h)) * Inestment demand -- this includes government savings, foreign * savings and depreciation: e:pinv q:(-gs0-sum(f,depr0(f))) * Factor ownership includes lump-sum taxes on factor income, * depreciation and returns to foreign factor owners: e:pf(f) q:(tf0(f)+depr0(f)) * Foreign aid to the government: e:pfx q:aid("govt") * The fdi "consumer" collects earnings from factors * owned by foreigners and investments from abroad * and makes investments in the domestic economy: $demand:fdi * Foreign aid in the form of increase FDI: e:pfx q:aid("fdi") e:pf(f) q:xk0(f) e:pfx q:(fs0-sum(f,xk0(f))) d:pinv q:fs0 $constraint:tau govt =e= sum(g, pa(g) * g0(g)); $offtext $sysinclude mpsgeset soe display tr0, it0, gs0, fs0, depr0, xk0, tf0, g0; * In the benchmark there is no foreign aid: aid(h) = 0; aid("govt") = 0; aid("fdi") = 0; * Check the benchmark: tau.l = 1; soe.iterlim = 0; $include soe.gen solve soe using mcp; soe.iterlim = 5000; * Compare the economic effects of alternative aid * packages: parameter consum Hicksian EV defined as % change in consumption gdp Hicksian EV defined as % change in GDP exports Export levels (% change) imports Import levels (% change) summary Summary results ct0(h) Total consumption; ct0(h) = sum(g, c0(g,h)); * 1. Aid to government to reduce trade taxes: aid("govt") = 1; $include soe.gen solve soe using mcp; aid("govt") = 0; consum(H,"govt") = 100 * (c.l(h)-1); consum("total","govt") = 100 * (sum(h,c.l(h)*ct0(h))/sum(h,ct0(h))-1); gdp(H,"govt") = 100 * (c.l(h)-1) * (ct0(h) / (ct0(h)+s0(h))); gdp("total","govt") = 100 * (sum(h,c.l(h)*ct0(h))/sum(h,ct0(h))-1) * sum(h, ct0(h)) / sum(f, sum(h,fe0(f,h))+tf0(f)+depr0(f)); exports(s,"govt") = 100 * (x.l(s)/x0(s) - 1); imports(s,"govt") = 100 * (m.l(s)/m0(s) - 1); summary(h,"govt") = consum(h,"govt"); summary("EVabs","govt") = consum("total","govt") * sum(h,ct0(h))/100; summary("%EV/C","govt") = consum("total","govt"); summary("%EV/GDP","govt") = gdp("total","govt"); summary("tau","govt") = tau.l; summary("status","govt") = soe.modelstat; summary("tolerance","govt") = soe.objval; * 2. Aid in the form of increased FDI: aid("fdi") = 1; $include soe.gen solve soe using mcp; aid("fdi") = 0; consum(H,"fdi") = 100 * (c.l(h)-1); consum("total","fdi") = 100 * (sum(h,c.l(h)*ct0(h))/sum(h,ct0(h))-1); gdp(H,"fdi") = 100 * (c.l(h)-1) * (ct0(h) / (ct0(h)+s0(h))); gdp("total","fdi") = 100 * (sum(h,c.l(h)*ct0(h))/sum(h,ct0(h))-1) * sum(h, ct0(h)) / sum(f, sum(h,fe0(f,h))+tf0(f)+depr0(f)); exports(s,"fdi") = 100 * (x.l(s)/x0(s) - 1); imports(s,"fdi") = 100 * (m.l(s)/m0(s) - 1); summary(h,"fdi") = consum(h,"fdi"); summary("EVabs","fdi") = consum("total","fdi") * sum(h,ct0(h))/100; summary("%EV/C","fdi") = consum("total","fdi"); summary("%EV/GDP","fdi") = gdp("total","fdi"); summary("tau","fdi") = tau.l; summary("status","fdi") = soe.modelstat; summary("tolerance","fdi") = soe.objval; * 3. Direct aid to households: loop(ha, aid(ha) = 1; $include soe.gen solve soe using mcp; aid(ha) = 0; consum(H,ha) = 100 * (c.l(h)-1); consum("total",ha) = 100 * (sum(h,c.l(h)*ct0(h))/sum(h,ct0(h))-1); gdp(H,ha) = 100 * (c.l(h)-1) * (ct0(h) / (ct0(h)+s0(h))); gdp("total",ha) = 100 * (sum(h,c.l(h)*ct0(h))/sum(h,ct0(h))-1) * sum(h, ct0(h)) / sum(f, sum(h,fe0(f,h))+tf0(f)+depr0(f)); exports(s,ha) = 100 * (x.l(s)/x0(s) - 1); imports(s,ha) = 100 * (m.l(s)/m0(s) - 1); summary(h,ha) = consum(h,ha); summary("EVabs",ha) = consum("total",ha) * sum(h,ct0(h))/100; summary("%EV/C",ha) = consum("total",ha); summary("%EV/GDP",ha) = gdp("total",ha); summary("tau",ha) = tau.l; summary("status",ha) = soe.modelstat; summary("tolerance",ha) = soe.objval; ); aid(h) = ct0(h) / sum(hh, ct0(hh)); $include soe.gen solve soe using mcp; consum(H,"both") = 100 * (c.l(h)-1); consum("total","both") = 100 * (sum(h,c.l(h)*ct0(h))/sum(h,ct0(h))-1); gdp(H,"both") = 100 * (c.l(h)-1) * (ct0(h) / (ct0(h)+s0(h))); gdp("total","both") = 100 * (sum(h,c.l(h)*ct0(h))/sum(h,ct0(h))-1) * sum(h, ct0(h)) / sum(f, sum(h,fe0(f,h))+tf0(f)+depr0(f)); exports(s,"both") = 100 * (x.l(s)/x0(s) - 1); imports(s,"both") = 100 * (m.l(s)/m0(s) - 1); summary(h,"both") = consum(h,"both"); summary("EVabs","both") = consum("total","both") * sum(h,ct0(h))/100; summary("%EV/C","both") = consum("total","both"); summary("%EV/GDP","both") = gdp("total","both"); summary("tau","both") = tau.l; summary("status","both") = soe.modelstat; summary("tolerance","both") = soe.objval; display consum, gdp, exports, imports, summary; $exit The following results suggest that aid packages which reduce the tax burden would be preferred, provided that there is not a strong arument in favor of aid to a particular household group: ---- 1907 PARAMETER SUMMARY Summary results RURAL URBAN GOVT FDI BOTH EVABS 1.042 1.025 1.481 1.002 1.034 %EV/C 2.248 2.213 3.197 2.163 2.232 %EV/GDP 2.142 2.108 3.046 2.061 2.127 RURAL 4.024 -0.019 3.323 2.209 2.149 URBAN 0.196 4.793 3.050 2.109 2.328 TAU 0.999 1.001 0.811 0.872 1.000 STATUS 1.000 1.000 1.000 1.000 1.000 TOLERANCE 1.553628E-9 1.220889E-9 5.265397E-9 4.44089E-14 9.93192E-11