gemmge.gms : GEMTAP: A general equilibrium model for tax policy

Description

This dataset based on an update of the original model
to a 1983 benchmark by Charles Schultz.


Reference

  • Balard, C L, Fullerton Don, Shoven, J, and Whalley, J, A General Equilibrium Model for Tax Policy Evaluation. University of Chicago Press, 1985.

Large Model of Types : MPSGE mcp


Category : GAMS Model library


Main file : gemmge.gms

$TITLE  GEMTAP: A general equilibrium model for tax policy (GEMMGE,SEQ=146)
$Ontext

  This dataset based on an update of the original model
  to a 1983 benchmark by Charles Schultz.


Balard, C, Fullerton Don, Shoven, J, and Whalley, J, A General
Equilibrium Model for Tax Policy Evaluation. University of
Chicago Press, 1985.

   Set definitions and input data for 1983 version of GEMTAP.

$Offtext

SETS
        S   SECTORS (PRODUCER GOODS)

        /   AGRI,   MINES,  CRUDE,  CONST,  FOOD,   TEXTL,  PAPER,
            REFIN,  CHEM,   LUMBR,  METLS,  EQUIP,  VEHCL,  TRNSP,
            TRADE,  FNANC,  REALT,  SRVCS,  GOVT/

        G   CONSUMER GOODS

        /   FOOD,   ALCHL,  TOBAC,  UTIL,   HOUSG,  FRNSH,  APPL,
            CLTH,   TRNSP,  VEHCL,  SERVC,  BNKNG,  READG,  N_DUR,
            PETRL,  HLTH,   EDUC,   SAVNG /;

ALIAS (S,SS), (G,GG);

SETS

       HH   ALL HOUSEHOLDS /H1*H14, HH2*HH14/,
      H(HH) AGGREGATED HOUSEHOLDS /HH2*HH14/,
     DH(HH) DISAGGREGATED HOUSEHOLDS /H1*H14/;

*       THE FOLLOWING ASSIGNMENT OMITS H1 WHICH APPEARS TO BE
*       A RESIDUAL ACCOUNT IN THIS DATA SET:

SET HMAP(DH,H) MAPPING FROM DISAGGREGATED HOUSEHOLDS
    /   H2.HH2, H3.HH3, H4.HH4, H5.HH5, H6.HH6, H7.HH7, H8.HH8,
        H9.HH9, H10.HH10, H11.HH11, H12.HH12, H13.HH13, H14.HH14 /;

SCALAR GDK  Government capital purchases.  (p. 118)    /  1.65084E+05/;

SCALAR GSK  Government capital ownership.  (Table 6.3) /  1.13409E+05/;

SCALAR GDL  Government labor demand.  (p. 107)         /  2.72392E+05/;

SCALAR GTL  Labor tax payments by government.(p. 107)  /  4.41080E+04/;

PARAMETER COUNT(HH)  POPULATION COUNT /

        H1       0.347
        H2       1.183
        H3       3.753
        H4       8.457
        H5      13.328
        H6      13.988
        H7      12.876
        H8      11.523
        H9      18.538
        H10     13.362
        H11     16.565
        H12      4.501
        H13      2.725
        H14      0.573 /;

PARAMETER DK(S)   Capital payments by sector.  (Table 4.7)

/AGRI  1.50670E+04, MINES 9.14909E+02, CRUDE 2.99886E+03, CONST 4.99169E+03,
 FOOD  6.71724E+03, TEXTL 2.97874E+03, PAPER 4.31363E+03, REFIN 1.39132E+04,
 CHEM  4.78283E+03, LUMBR 2.57358E+03, METLS 2.78550E+03, EQUIP 1.43345E+03,
 VEHCL 2.49335E+02, TRNSP 3.31062E+04, TRADE 2.77352E+04, FNANC 2.91767E+03,
 REALT 1.57818E+05, SRVCS 2.90328E+04, GOVT  1.23209E+04/

PARAMETER SK(HH) Capital ownership by household.  (Table 6.2)

/H1   -1.15989E+04, H2    1.32289E+02, H3    1.40763E+03, H4    5.82356E+03,
 H5    1.51394E+04, H6    2.17343E+04, H7    2.44363E+04, H8    2.57096E+04,
 H9    4.68859E+04, H10   4.02364E+04, H11   6.74481E+04, H12   3.33326E+04,
 H13   4.47871E+04, H14   6.28510E+04/

SCALAR SKTOT  TOTAL CAPITAL STOCK; SKTOT = SUM(H, SK(H));

PARAMETER DL(S)  Labor demand by sector.  (Table 4.1)

/AGRI  1.92060E+04, MINES 1.18360E+04, CRUDE 1.92690E+04, CONST 1.12095E+05,
 FOOD  3.57680E+04, TEXTL 2.79840E+04, PAPER 4.39730E+04, REFIN 6.36500E+03,
 CHEM  4.58740E+04, LUMBR 2.59050E+04, METLS 1.82051E+05, EQUIP 3.12680E+04,
 VEHCL 2.51430E+04, TRNSP 1.46020E+05, TRADE 3.13381E+05, FNANC 1.02262E+05,
 REALT 1.68840E+04, SRVCS 3.73269E+05, GOVT  3.07730E+04/

PARAMETER SL(HH)  Labor supply by household.  (Table 6.1)

/H1   -4.07035E+02, H2    9.72331E+02, H3    4.94308E+03, H4    2.55985E+04,
 H5    8.32951E+04, H6    1.27887E+05, H7    1.53337E+05, H8    1.72699E+05,
 H9    3.26104E+05, H10   2.86196E+05, H11   3.83643E+05, H12   1.19378E+05,
 H13   1.02400E+05, H14   5.56721E+04/

PARAMETER ZTA(HH)  Labor endowment : supply ratios by household.
/H1    1.26791E+00, H2    1.27168E+00, H3    1.33304E+00, H4    1.40639E+00,
 H5    1.48221E+00, H6    1.53994E+00, H7    1.58088E+00, H8    1.61328E+00,
 H9    1.64773E+00, H10   1.68873E+00, H11   1.71083E+00, H12   1.69191E+00,
 H13   1.63084E+00, H14   1.34709E+00 /;

*       FOR INCREASED COMPARABILITY WITH 1973 DATASET, WE USE A VALUE
*       OF 1.75 FOR ALL HOUSEHOLDS:

        ZTA(HH) = 1.75;

SCALAR ELS  ELASTICITY OF LABOR SUPPLY /0.15/;

PARAMETER PIT(HH) Income tax payments by household.  (Table 6.5)

/H1    4.70693E+03, H2   -4.78527E+01, H3   -4.83605E+02, H4   -1.38173E+03,
 H5   -8.30128E+02, H6    2.07466E+03, H7    5.51451E+03, H8    9.36992E+03,
 H9    2.08846E+04, H10   2.25915E+04, H11   3.28106E+04, H12   1.08714E+04,
 H13   1.28299E+04, H14   1.30979E+04/

PARAMETER TAU(HH) Marginal tax rates by household.  (Table 5.8)

/H1    7.30000E-02, H2    1.00000E-03, H3    2.00000E-02, H4    6.10000E-02,
 H5    1.11000E-01, H6    1.39000E-01, H7    1.65000E-01, H8    1.95000E-01,
 H9    2.19000E-01, H10   2.56000E-01, H11   2.93000E-01, H12   3.43000E-01,
 H13   3.96000E-01, H14   4.01000E-01/

PARAMETER TRN(HH) Transfer levels by household (from government).  (Table 6.5)

/H1    4.62898E+02, H2    7.16898E+02, H3    9.99424E+03, H4    2.82718E+04,
 H5    4.06371E+04, H6    4.04673E+04, H7    3.55249E+04, H8    2.80239E+04,
 H9    4.10061E+04, H10   2.63098E+04, H11   3.01152E+04, H12   7.94427E+03,
 H13   4.27825E+03, H14   8.37153E+02/

PARAMETER TC(G) Consumption tax payments by good.  (Table 5.4)

/FOOD  1.02623E+02, ALCHL 3.43401E+01, TOBAC 4.92577E+01, UTIL  5.27143E+01,
 FRNSH 6.82659E+01, APPL  5.61957E+01, CLTH  7.82538E+02, TRNSP 1.29003E+00,
 VEHCL 1.30150E+02, SERVC 8.53633E+00, READG 1.38249E+02, N_DUR 9.66488E+01,
 PETRL 7.99788E+01, HLTH  4.19992E+01 /;

*-----------------------------------------------------------------------------
$ONTEXT

THE FOLLOWING THREE VECTORS WHICH APPEAR IN THE 83 DATASET ARE CONVERTED
TO PERCENTAGE RATE FORM IN TABLE TAXRATE:

PARAMETER TXO(S)
/
 AGRI  5.42000E+02, MINES 2.00500E+03, CRUDE 1.61310E+04, CONST 2.34900E+03,
 FOOD  1.12890E+04, TEXTL 1.69000E+02, PAPER 7.52000E+02, REFIN 9.20100E+03,
 CHEM  1.45500E+03, LUMBR 4.76000E+02, METLS 2.48100E+03, EQUIP 5.41000E+02,
 VEHCL 7.61000E+02, TRNSP 2.03530E+04, TRADE 8.50440E+04, FNANC 8.57600E+03,
 REALT 1.76200E+04, SRVCS 8.45000E+03 /

PARAMETER TK(S)
/
 AGRI  1.01810E+04, MINES 1.34009E+03, CRUDE 5.18414E+03, CONST 4.60731E+03,
 FOOD  7.47776E+03, TEXTL 3.00226E+03, PAPER 5.31437E+03, REFIN 9.16883E+03,
 CHEM  7.16117E+03, LUMBR 3.09542E+03, METLS 1.15835E+04, EQUIP 1.10355E+03,
 VEHCL 1.35867E+03, TRNSP 3.50988E+04, TRADE 2.69098E+04, FNANC 2.22403E+04,
 REALT 1.09969E+05, SRVCS 1.90732E+04, GOVT  3.35605E+03 /

PARAMETER TL(S)
/
 AGRI  2.67400E+03, MINES 1.26600E+03, CRUDE 2.18700E+03, CONST 1.45680E+04,
 FOOD  5.23400E+03, TEXTL 4.68000E+03, PAPER 5.97300E+03, REFIN 7.68000E+02,
 CHEM  6.86600E+03, LUMBR 1.18640E+04, METLS 2.51540E+04, EQUIP 3.27600E+03,
 VEHCL 3.93400E+03, TRNSP 1.86950E+04, TRADE 4.33670E+04, FNANC 1.29190E+04,
 REALT 2.52100E+03, SRVCS 4.43190E+04, GOVT  1.34930E+04/;

PARAMETER TAXRATE(S,*)  Taxes (%) (Tables 4.13 4.7 and 4.1 respectively);

CODE:

TAXRATE(S,"TXO") = 100 * TXO(S) / Y(S);
TAXRATE(S,"TL") =  100 * TL(S) / DL(S);
TAXRATE(S,"TK") =  100 * TK(S) / DK(S);

DISPLAY TAXRATE;

TABLE TKVAL(S,*)  SECTORAL CAPITAL TAX RATES IN 73 AND 83

             TK73       TK83
AGRI      54.0162      67.572
MINES     95.0472     146.472
CRUDE    101.5675     172.870
CONST    210.4031      92.300
FOOD     346.9550     111.322
TEXTL    253.4060     100.790
PAPER    162.5490     123.199
REFIN     46.3458      65.900
CHEM     186.6596     149.727
LUMBR     91.2334     120.277
METLS    171.6036     415.850
EQUIP   2356.8627      76.986
VEHCL    128.7486     544.917
TRNSP    170.1676     106.019
TRADE    185.0761      97.024
FNANC    199.2051     762.262
REALT     62.9748      69.681
SRVCS     86.0299      65.695
GOVT      26.3711      27.239;

$OFFTEXT
*-----------------------------------------------------------------------------

TABLE TAXRATE(S,*)  Taxes (%) (Tables 4.13 4.7 and 4.1 respectively)

              TXO          TL          TK

AGRI        0.311      13.923      67.572
MINES       4.529      10.696     146.472
CRUDE      19.296      11.350     172.870
CONST       0.775      12.996      92.300
FOOD        4.016      14.633     111.322
TEXTL       0.133      16.724     100.790
PAPER       0.454      13.583     123.199
REFIN       4.698      12.066      65.900
CHEM        0.618      14.967     149.727
LUMBR       0.427      45.798     120.277
METLS       0.337      13.817     415.850
EQUIP       0.700      10.477      76.986
VEHCL       0.682      15.647     544.917
TRNSP       3.760      12.803     106.019
TRADE      12.991      13.838      97.024
FNANC       3.585      12.633     762.262
REALT       3.650      14.931      69.681
SRVCS       1.080      11.873      65.695
GOVT                   43.847      27.239


PARAMETER GSE(S) Government commodity endowments. (Table 6.3);

        GSE(S) = 0;

PARAMETER GD(S) Government commodity demands.  (Table 6.4)

/AGRI  5.74182E+02, MINES 1.55043E+02, CRUDE 3.63664E+02, CONST 4.50692E+04,
 FOOD  2.67746E+03, TEXTL 8.95648E+02, PAPER 4.45026E+03, REFIN 5.48673E+03,
 CHEM  4.57070E+03, LUMBR 1.12229E+03, METLS 1.78503E+05, EQUIP 1.93211E+04,
 VEHCL 2.35552E+03, TRNSP 1.46367E+04, TRADE 4.89975E+03, FNANC 3.05061E+03,
 REALT 3.17531E+03, SRVCS 3.04402E+04, GOVT  6.39613E+02/


PARAMETER VM(S)  Import levels by sectoral commodity.  (Table 5.1)

/AGRI  3.84500E+03, MINES 3.49000E+03, CRUDE 6.61250E+04, FOOD  1.39690E+04,
 TEXTL 1.60500E+04, PAPER 6.58100E+03, REFIN 2.23780E+04, CHEM  1.53900E+04,
 LUMBR 8.32600E+03, METLS 1.01264E+05, EQUIP 5.50100E+03, VEHCL 2.90780E+04,
 TRNSP 5.29900E+03, TRADE 7.80800E+03, FNANC 7.43000E+02, SRVCS 1.74900E+03/

PARAMETER VX(S) Export levels by sectoral commodity.  (Table 5.1)

/AGRI  2.14831E+04, MINES 5.09111E+03, CRUDE 1.45680E+03, CONST 3.71680E+01,
 FOOD  1.27640E+04, TEXTL 4.89076E+03, PAPER 4.99139E+03, REFIN 5.75651E+03,
 CHEM  2.02557E+04, LUMBR 5.10924E+03, METLS 1.46532E+05, EQUIP 1.51174E+04,
 VEHCL 1.07298E+04, TRNSP 1.52072E+04, TRADE 2.29182E+04, FNANC 8.49425E+02,
 REALT 5.32137E+03, SRVCS 9.01913E+03, GOVT  6.61772E+01/

PARAMETER EL(HH) Elasticity between leisure and consumption. (Table 6.8)

/H1    5.69000E-01, H2    6.74000E-01, H3    7.77000E-01, H4    8.38000E-01,
 H5    8.86000E-01, H6    9.48000E-01, H7    9.83000E-01, H8    9.90000E-01,
 H9    1.02700E+00, H10   1.00500E+00, H11   9.69000E-01, H12   7.38000E-01,
 H13   7.38000E-01, H14   7.38000E-01/

PARAMETER EC(HH) Elasticity in current consumption.  (Table 6.9)

/H1    1.26791E+00, H2    1.27168E+00, H3    1.33304E+00, H4    1.40639E+00,
 H5    1.48221E+00, H6    1.53994E+00, H7    1.58088E+00, H8    1.61328E+00,
 H9    1.64773E+00, H10   1.68873E+00, H11   1.71083E+00, H12   1.69191E+00,
 H13   1.63084E+00, H14   1.34709E+00/

PARAMETER EKL(S) Labor-capital elasticity. (Table 6.11)

/AGRI  1.92123E+00, MINES 1.00000E+00, CRUDE 1.00000E+00, CONST 1.00000E+00,
 FOOD  1.68095E+00, TEXTL 1.12108E+00, PAPER 1.11995E+00, REFIN 1.38332E+00,
 CHEM  1.04308E+00, LUMBR 1.10632E+00, METLS 1.55352E+00, EQUIP 1.29132E+00,
 VEHCL 1.09135E+00, TRNSP 1.00000E+00, TRADE 1.00000E+00, FNANC 1.00000E+00,
 REALT 1.00000E+00, SRVCS 1.00000E+00, GOVT  1.00000E+00/

PARAMETER EKL73(S) Labor-capital elasticity. Table 6.11

/AGRI  6.75900E-01, MINES 1.00000E+00, CRUDE 1.00000E+00, CONST 1.00000E+00,
 FOOD  7.11700E-01, TEXTL 9.02500E-01, PAPER 9.03300E-01, REFIN 7.83000E-01,
 CHEM  9.60300E-01, LUMBR 9.12300E-01, METLS 7.37300E-01, EQUIP 8.15900E-01,
 VEHCL 9.22800E-01, TRNSP 1.00000E+00, TRADE 1.00000E+00, FNANC 1.00000E+00,
 REALT 1.00000E+00, SRVCS 1.00000E+00, GOVT  1.00000E+00/;

PARAMETER EKL83(S) Labor-capital elasticity. (Table 6.11)

/AGRI  1.92123E+00, MINES 1.00000E+00, CRUDE 1.00000E+00, CONST 1.00000E+00,
 FOOD  1.68095E+00, TEXTL 1.12108E+00, PAPER 1.11995E+00, REFIN 1.38332E+00,
 CHEM  1.04308E+00, LUMBR 1.10632E+00, METLS 1.55352E+00, EQUIP 1.29132E+00,
 VEHCL 1.09135E+00, TRNSP 1.00000E+00, TRADE 1.00000E+00, FNANC 1.00000E+00,
 REALT 1.00000E+00, SRVCS 1.00000E+00, GOVT  1.00000E+00/

PARAMETER       EM(S)   ELASTICITY OF IMPORT SUPPLY
                EX(S)   ELASTICITY OF EXPORT DEMAND;

EM(S) = 0.465;
EX(S) = 10;

PARAMETER Y(S) Gross output level by sector. (Table 4.13)

/AGRI  1.74055E+05, MINES 4.42744E+04, CRUDE 8.35975E+04, CONST 3.03029E+05,
 FOOD  2.81073E+05, TEXTL 1.26674E+05, PAPER 1.65760E+05, REFIN 1.95844E+05,
 CHEM  2.35265E+05, LUMBR 1.11494E+05, METLS 7.35374E+05, EQUIP 7.72401E+04,
 VEHCL 1.11519E+05, TRNSP 5.41315E+05, TRADE 6.54613E+05, FNANC 2.39210E+05,
 REALT 4.82737E+05, SRVCS 7.82546E+05, GOVT  9.61957E+04 /;


TABLE Z(S,G) Consumption composition matrix. (Table 4.10)

            FOOD        ALCHL       TOBAC       UTIL        HOUSG       FRNSH
AGRI   3.49303E-02 3.49250E-02
MINES  8.89490E-06
FOOD   4.44127E-01 4.44162E-01 4.96879E-01
TEXTL                                                              1.51941E-01
PAPER                                                              1.13370E-03
REFIN                                                              2.57659E-05
CHEM   2.13478E-04 1.95293E-04
LUMBR                                                              2.60854E-01
METLS                                                              9.58233E-02
EQUIP                                                              7.98743E-04
TRNSP  1.80389E-02 1.80321E-02 4.29918E-03 9.67120E-01             1.03579E-02
TRADE  2.34928E-01 2.34938E-01 4.98822E-01                         4.79065E-01
FNANC  8.89490E-06
REALT                                                  9.63414E-01
SRVCS  2.67745E-01 2.67747E-01             4.22719E-03 3.65864E-02
GOVT                                       2.86527E-02

+           APPL        CLTH        TRNSP       VEHCL       SERVC       BNKNG
TEXTL  1.96668E-04 4.22525E-01             2.43355E-04
PAPER              9.72015E-03
CHEM   2.17739E-02 9.63838E-03             4.00725E-02
LUMBR  3.21973E-02                         4.23618E-04 2.15520E-03
METLS  5.17911E-01 5.98949E-02             1.54125E-02 2.28764E-04
EQUIP                                      2.40200E-02
VEHCL                                      4.15732E-01
TRNSP  8.28815E-03 3.03563E-03 9.43310E-01 1.55927E-02 4.17193E-02
TRADE  4.18734E-01 4.71361E-01             2.05121E-01 1.32442E-03
FNANC                                                  1.65312E-02 1.00000E+00
REALT                                                  6.51376E-03
SRVCS  8.99053E-04 2.38251E-02             2.83382E-01 8.99115E-01
GOVT                           5.66898E-02             3.24123E-02

+           READG       N_DUR       PETRL       HLTH        EDUC        SAVNG
AGRI   4.41326E-02 6.14907E-04                                    -3.63988E-02
MINES              6.47270E-04 3.66763E-03                         2.50821E-03
CRUDE                                                              9.10418E-04
CONST                                                              4.91561E-01
FOOD                                                              -7.32829E-04
TEXTL  8.28619E-03 2.39490E-03                                     2.14316E-03
PAPER  1.66921E-01 1.60038E-01             5.69271E-03            -4.07667E-04
REFIN                          6.58331E-01 1.93630E-05            -1.18903E-03
CHEM   4.02524E-03 3.92213E-01 1.70587E-03 5.59009E-02             1.37297E-03
LUMBR              3.46290E-03 1.80823E-03                         1.71430E-02
METLS  1.33159E-01 7.86757E-02 8.52937E-05 1.55000E-02             2.84313E-01
EQUIP  9.83283E-02                                                 3.99168E-02
VEHCL                                                              7.10858E-02
TRNSP  1.06977E-01 2.17483E-02 2.67993E-02 1.04560E-03             1.71905E-02
TRADE  2.68150E-01 3.40205E-01 3.07603E-01 7.96495E-02             1.19901E-01
FNANC  5.43951E-05
REALT                                                              2.95876E-02
SRVCS  1.55407E-01                         8.42192E-01 1.00000E+00 -3.8905E-02
GOVT   1.45598E-02


TABLE RAS(S,S)  Adjusted input-output table.  (Tables 4.8 and 4.9)

            AGRI        MINES       CRUDE       CONST       FOOD        TEXTL
AGRI   4.77039E+04 1.29167E+01 4.94328E+00 4.14308E+02 8.07202E+04 2.16489E+03
MINES  3.19103E+02 6.05761E+03 1.28523E+01 1.74414E+03 1.58516E+02 6.93484E+01
CRUDE  2.75040E+02 1.05530E+02 5.46406E+03 1.82005E+02 1.00093E+02 5.49454E+01
CONST  2.68590E+03 4.87043E+02 1.08872E+04 2.86600E+02 1.46124E+03 5.88429E+02
FOOD   1.70603E+04 1.21148E+01 1.67424E+01 3.48826E+01 5.83569E+04 6.66520E+02
TEXTL  3.42696E+02 1.02025E+02 2.83085E+01 1.67936E+03 1.22183E+02 4.95362E+04
PAPER  7.80488E+02 3.25057E+02 2.55315E+02 3.81202E+03 1.11966E+04 1.81391E+03
REFIN  9.88521E+03 2.35625E+03 1.24116E+03 6.24300E+03 1.93248E+03 1.25882E+03
CHEM   9.77087E+03 1.45763E+03 9.50792E+02 6.56288E+03 5.42140E+03 1.26869E+04
LUMBR  4.56307E+02 4.98159E+02 5.60705E+01 3.76413E+04 4.69320E+03 3.62200E+02
METLS  2.03185E+03 4.63286E+03 3.27433E+03 3.80960E+04 7.48649E+03 1.61303E+03
EQUIP  5.35927E+02 1.06592E+02 5.83976E+01 5.32920E+02 2.83783E+01 4.00452E+01
VEHCL  1.70121E+02 2.10930E+02 3.52576E+01 3.80755E+02 3.22277E+01 1.79056E+01
TRNSP  6.02777E+03 3.34213E+03 2.53607E+03 9.87724E+03 1.02177E+04 3.74510E+03
TRADE  1.34513E+04 3.00750E+03 1.51076E+03 3.21204E+04 2.11882E+04 7.67672E+03
FNANC  2.55270E+03 6.17634E+02 7.68909E+02 2.51563E+03 1.28108E+03 6.32573E+02
REALT  7.40672E+03 8.34401E+02 7.56553E+03 4.67231E+02 5.58298E+02 4.84227E+02
SRVCS  3.93065E+03 2.15643E+03 2.06860E+03 2.08522E+04 7.80496E+03 3.21905E+03
GOVT   7.84913E+02 5.72576E+02 1.07121E+03 8.76811E+02 1.79685E+03 1.22383E+03

+           PAPER       REFIN       CHEM        LUMBR       METLS       EQUIP
AGRI   4.95558E+01 2.57982E+00 6.13878E+02 4.10659E+03 6.67960E+01 3.48058E+00
MINES  4.80497E+02 2.99266E+02 3.97423E+03 2.06994E+03 1.49215E+04 1.39879E+01
CRUDE  1.58425E+02 1.05766E+05 3.90772E+03 1.16685E+02 6.21400E+02 2.88911E+01
CONST  1.26204E+03 1.38001E+03 2.06264E+03 1.15375E+03 8.36066E+03 3.29064E+02
FOOD   5.14232E+02 8.75865E+01 2.47313E+03 9.32015E+01 3.70207E+02 1.01664E+01
TEXTL  1.63620E+03 3.74388E+01 3.27421E+03 1.87451E+03 2.84958E+03 4.06322E+02
PAPER  4.63469E+04 1.05641E+03 7.79450E+03 2.06093E+03 1.33010E+04 4.51683E+02
REFIN  4.06976E+03 2.00380E+04 1.46170E+04 2.50776E+03 1.02380E+04 5.87484E+02
CHEM   7.17832E+03 4.89943E+03 6.65589E+04 3.88466E+03 3.24850E+04 8.95859E+02
LUMBR  4.95827E+03 3.82156E+02 2.35622E+03 2.37056E+04 1.14772E+04 1.31904E+03
METLS  3.45937E+03 9.70241E+02 8.31886E+03 4.95921E+03 2.42505E+05 1.21644E+04
EQUIP  1.68734E+02 9.82306E+00 7.99628E+01 9.83550E+01 3.14783E+03 1.27697E+04
VEHCL  6.40378E+01 1.51190E+02 8.71123E+01 1.75502E+02 2.81914E+03 4.12245E+02
TRNSP  1.03269E+04 1.16825E+04 1.82501E+04 8.00805E+03 4.25135E+04 2.19451E+03
TRADE  1.16057E+04 5.01511E+03 1.57178E+04 7.18179E+03 7.46440E+04 3.26569E+03
FNANC  1.02228E+03 8.44861E+02 1.48315E+03 8.28850E+02 6.18708E+03 6.20171E+02
REALT  1.11894E+03 2.62709E+02 1.58982E+03 4.76650E+02 5.53245E+03 3.65087E+02
SRVCS  6.83419E+03 2.35907E+03 1.23156E+04 3.00436E+03 2.84889E+04 2.54310E+03
GOVT   4.15367E+03 1.17168E+03 3.63197E+03 1.21178E+03 1.07284E+04 1.23522E+03

+           VEHCL       TRNSP       TRADE       FNANC       REALT       SRVCS
AGRI   1.52082E+00 4.91644E+01 8.73337E+02 4.84854E+00 4.31162E+03 2.60626E+03
MINES  4.38196E+01 9.75567E+03 4.67007E+00 5.24419E-01 2.40127E+01 1.13320E+02
CRUDE  2.61194E+01 2.93924E+04 4.70898E+02 7.15163E+01 1.70123E+02 6.09765E+02
CONST  3.25754E+02 2.40091E+04 3.86461E+03 7.62033E+02 7.12670E+04 1.33394E+04
FOOD   2.69740E+01 1.64303E+02 4.83188E+02 1.47578E+01 9.62752E+00 6.62090E+03
TEXTL  2.61111E+03 4.85133E+02 3.71442E+02 1.64973E+02 2.33814E+01 4.00854E+03
PAPER  6.22244E+02 3.04369E+03 1.11278E+04 6.03662E+03 3.09007E+03 2.12056E+04
REFIN  4.10666E+02 4.84692E+04 1.10733E+04 1.18735E+03 1.89838E+03 1.40215E+04
CHEM   5.36451E+03 3.25176E+03 1.62399E+03 1.35312E+02 1.27542E+03 1.83553E+04
LUMBR  2.10358E+03 4.08367E+02 9.40659E+02 2.70518E+01 7.10703E+01 2.67436E+03
METLS  2.38947E+04 8.37612E+03 2.37642E+03 7.60264E+02 8.25374E+02 2.00537E+04
EQUIP  4.30563E+02 6.16430E+03 3.06914E+01 6.41174E+01 1.09553E+01 1.25107E+03
VEHCL  3.01012E+04 9.05646E+02 4.43927E+02 3.53968E+01 4.16257E+01 8.12870E+03
TRNSP  2.25330E+03 9.36376E+04 2.96017E+04 9.49454E+03 9.99490E+03 4.07070E+04
TRADE  8.26929E+03 1.55832E+04 1.22973E+04 1.42583E+03 3.51304E+03 2.94769E+04
FNANC  3.80231E+02 5.55400E+03 7.08814E+03 4.20652E+04 2.05804E+04 8.10357E+03
REALT  1.13128E+02 4.24392E+03 1.37242E+04 3.72805E+03 3.96620E+04 2.46183E+04
SRVCS  2.60763E+03 2.19662E+04 4.69394E+04 1.75710E+04 1.53004E+04 7.48002E+04
GOVT   4.79289E+02 1.17297E+04 1.42000E+04 6.69891E+03 5.80996E+03 1.74284E+04



TABLE RCS(G,HH)  Adjusted consumption matrix.  Tables 5.2 and 5.3

            H1          H2          H3          H4          H5          H6
FOOD   2.43154E+03 8.31012E+02 5.20838E+03 1.59696E+04 3.11945E+04 3.68235E+04
ALCHL  5.99531E+02 7.09930E+01 4.47408E+02 1.47625E+03 3.10355E+03 3.85386E+03
TOBAC  3.00241E+02 3.55527E+01 2.24052E+02 7.39320E+02 1.55420E+03 1.92995E+03
UTIL   8.09773E+02 2.90719E+02 1.91339E+03 6.31809E+03 1.27338E+04 1.49690E+04
HOUSG  6.12199E+03 1.58282E+03 9.48922E+03 2.39017E+04 4.04763E+04 4.36047E+04
FRNSH  6.29848E+02 7.45854E+01 4.70031E+02 1.55093E+03 3.26043E+03 4.04867E+03
APPL   5.18472E+02 1.02586E+02 5.15702E+02 1.73699E+03 3.94353E+03 4.88070E+03
CLTH   7.22029E+03 1.94843E+02 1.20325E+03 3.92543E+03 8.34312E+03 1.02651E+04
TRNSP  1.10486E+02 4.72766E+01 3.05804E+02 9.45871E+02 1.87616E+03 2.21232E+03
VEHCL  1.20089E+03 2.59688E+02 1.40132E+03 5.15694E+03 1.18923E+04 1.47618E+04
SERVC  7.30451E+02 8.64961E+01 5.45119E+02 1.79866E+03 3.78124E+03 4.69536E+03
BNKNG  1.60339E+03 1.89865E+02 1.19656E+03 3.94812E+03 8.30000E+03 1.03067E+04
READG  1.27226E+03 1.50655E+02 9.49461E+02 3.13278E+03 6.58597E+03 8.17810E+03
N_DUR  8.91740E+02 6.01011E+01 3.35115E+02 1.09765E+03 2.25039E+03 2.69641E+03
PETRL  5.46878E+02 1.12026E+02 7.24765E+02 2.64345E+03 5.97935E+03 7.57259E+03
HLTH   3.59269E+03 3.64276E+02 2.89157E+03 9.48352E+03 1.84661E+04 2.22962E+04
EDUC   4.10709E+02 4.86350E+01 3.06502E+02 1.01128E+03 2.12606E+03 2.64005E+03
SAVNG -4.6884E+04  -2.8102E+03 -1.2384E+04 -2.7382E+04 -3.3634E+04 -1.7098E+04

+           H7          H8          H9          H10         H11         H12
FOOD   3.72263E+04 3.64173E+04 6.22303E+04 4.77327E+04 5.55705E+04 1.43476E+04
ALCHL  4.09038E+03 4.27672E+03 7.88731E+03 6.63555E+03 8.87697E+03 3.07807E+03
TOBAC  2.04850E+03 2.14176E+03 3.94985E+03 3.32301E+03 4.44547E+03 1.54143E+03
UTIL   1.49085E+04 1.44047E+04 2.47844E+04 1.92801E+04 2.31262E+04 6.46643E+03
HOUSG  4.07999E+04 3.67105E+04 5.06882E+04 3.22039E+04 3.40273E+04 9.89624E+03
FRNSH  4.29734E+03 4.49303E+03 8.28624E+03 6.97116E+03 9.32584E+03 3.23370E+03
APPL   5.31140E+03 5.50475E+03 9.62492E+03 7.56886E+03 9.51822E+03 2.77065E+03
CLTH   1.07248E+04 1.10415E+04 1.98779E+04 1.64221E+04 2.13323E+04 7.18989E+03
TRNSP  2.24502E+03 2.23530E+03 3.80079E+03 2.91343E+03 3.50719E+03 9.92770E+02
VEHCL  1.65255E+04 1.69002E+04 2.91693E+04 2.27302E+04 2.85742E+04 8.05782E+03
SERVC  4.98369E+03 5.21064E+03 9.60965E+03 8.08456E+03 1.08154E+04 3.75019E+03
BNKNG  1.09396E+04 1.14377E+04 2.10939E+04 1.77463E+04 2.37406E+04 8.23194E+03
READG  8.68036E+03 9.07556E+03 1.67376E+04 1.40813E+04 1.88378E+04 6.53186E+03
N_DUR  2.77299E+03 2.88574E+03 5.33512E+03 4.58741E+03 6.38517E+03 2.59914E+03
PETRL  8.00777E+03 8.11209E+03 1.44354E+04 1.14639E+04 1.36132E+04 3.64777E+03
HLTH   2.30433E+04 2.30927E+04 4.00924E+04 3.17075E+04 3.96004E+04 1.21082E+04
EDUC   2.80215E+03 2.92981E+03 5.40313E+03 4.54572E+03 6.08121E+03 2.10860E+03
SAVNG -1.49995E+03 1.01676E+04 4.23748E+04 5.79356E+04 1.13118E+05 4.77507E+04

+           H13         H14
FOOD   8.11929E+03 5.24818E+02
ALCHL  3.30288E+03 1.53387E+03
TOBAC  1.65404E+03 7.68143E+02
UTIL   4.23549E+03 3.88370E+02
HOUSG  1.15294E+04 2.68036E+04
FRNSH  3.46990E+03 1.61143E+03
APPL   2.03276E+03 2.66599E+02
CLTH   7.94568E+03 1.13218E+04
TRNSP  6.56467E+02 7.65529E+01
VEHCL  6.14244E+03 1.59609E+03
SERVC  4.02413E+03 1.86881E+03
BNKNG  8.83324E+03 4.10219E+03
READG  7.00898E+03 3.25500E+03
N_DUR  3.92681E+03 1.30495E+04
PETRL  2.33556E+03 3.01442E+02
HLTH   9.46404E+03 1.86004E+03
EDUC   2.26261E+03 1.05077E+03
SAVNG  4.67953E+04 3.21618E+04;


*       CONVERT INTO UNITS CONSISTENT WITH THE 1973 DATA:

GDK = 1.E-5 * GDK;
GSK = 1.E-5 * GSK;
GDL = 1.E-5 * GDL;
GTL = 1.E-5 * GTL;

DK(S) = 1.E-5 * DK(S);
SK(HH) = 1.E-5 * SK(HH);
DL(S) = 1.E-5 * DL(S);
SL(HH) = 1.E-5 * SL(HH);
PIT(HH) = 1.E-5 * PIT(HH);
TRN(HH) = 1.E-5 * TRN(HH);
TC(G) = 1.E-5 * TC(G);
GD(S) = 1.E-5 * GD(S);
VM(S) = 1.E-5 * VM(S);
VX(S) = 1.E-5 * VX(S);
Y(S) = 1.E-5 * Y(S);
RCS(G,HH) = 1.E-5 * RCS(G,HH);
RAS(S,SS) = 1.E-5 * RAS(S,SS);

PARAMETER
        TAUBMK(*)       BENCHMARK MARGINAL TAX,
        TAUAVE(*)       AVERAGE TAX,
        CC(H)           CURRENT CONSUMPTION VALUE (MARKET + LEISURE),
        LEISURE(H)      LEISURE DEMAND IN BENCHMARK,
        GC              GOVERNMENT CONSUMPTION,
        CP(H)           VALUE OF PRIVATE CONSUMPTION,
        EG(H)           ELASTICITY OF SUBSTITUTION - PRIVATE VS PUBLIC
        GOVSAV          EXOGENOUS (GOVERNMENT) SAVINGS
        CG(H)           CONSUMPTION PLUS PUBLIC GOODS VALUATION
        VPG(H)          BENCHMARK VALUATION OF PUBLIC GOODS;

SET             HFIX(DH)        Households omitted from the aggregation;
ALIAS (HP,H);

*       IDENTIFY HOUSEHOLDS FROM THE DISAGGREGATED DATA SET
*       WHICH ARE NOT ASSIGNED:

HFIX(DH) = YES$(SUM(H$HMAP(DH,H), 1) EQ 0);

PARAMETER       TXO(S)          Production output taxes (total value),
                TK(S)           Capital taxes (total value),
                TL(S)           Labor taxes (total value),
                PLREF(S)        Labor reference price,
                PKREF(S)        Capital reference price
                INCADJ(HH)      Income adjustment transfer;
*
        INCADJ(HH) = 0;

        TXO(S) = 0.01 * TAXRATE(S,"TXO") * Y(S);
        TK(S) =  0.01 * TAXRATE(S,"TK") * DK(S);
        TL(S) =  0.01 * TAXRATE(S,"TL") * DL(S);
        PLREF(S) = 1 + 0.01 * TAXRATE(S,"TL");
        PKREF(S) = 1 + 0.01 * TAXRATE(S,"TK");

PARAMETER  GCE(G)       GROSS CONSUMPTION EXPENDITURE BY GOOD. (TABLE 6.6);

SET EXCS / Y, INTER, NETEXP, FINDEM, CHECK/;
SET HCOL /EXPEND, INC_TAX, LABOR, CAPITAL, TRANSF, CHECK/;
SET PRFT /Y, VA, TAX, INTER, CHECK/;
SET GCOL /ENDOWMENT, L_TAX, K_TAX, PROD_TAX, CON_TAX, INC_TAX, REVENUE,
          TRANSF, EXPEND, OUTLAY, DEFICIT/;
SET VCOL /LABOR, CAPITAL, INTER, TOTAL/;
SET TCOL / OUTPUT, LABOR, CAPITAL, TOTAL/;
SET GOVT(S)  GOVERNMENT SECTORS  /GOVT/;
SET CCG(G)  CURRENT CONSUMPTION GOODS;

CCG(G) = YES;
CCG("SAVNG") = NO;


*       CHECK CONSISTENCY OF THE DISAGGREGATED DATA.

PARAMETER
        CD(S)           CONSUMER DEMAND,
        FD(S)           FINAL DEMAND,
        VA(S)           VALUE-ADDED,
        LABMKT          LABOR MARKET CLEARANCE,
        CAPMKT          CAPITAL MARKET CLEARANCE,
        PMCHK(S,*)      PROFIT AND MARKET CLEARANCE CHECK,
        BUDGET(HH,*)    BUDGET BALANCE,
        GBDGT(*)        GOVERNMENT BUDGET BALANCE,
        ZCHK            CHECK OF CONSUMER GOODS TRANSFORMATION MATRIX,
        ZSUM(G)         TRANSFORMATION CHECK SUM;

PARAMETER

        EXPEND(HH)      BENCHMARK CONSUMPTION EXPENDITURE,
        SAVING(HH)      BENCHMARK SAVINGS,
        PROFIT(S,*)     BENCHMARK PROFIT CHECK,
        EXCESS(*,*)     EXCESS DEMAND CHECK,
        BDGTBAL(HH,*)   BUDGET BALANCE CALCULATION,

        PCTPROFIT(S,*)          BENCHMARK PROFIT CHECK (PERCENT),
        PCTVA(*,*)              VALUE-ADDED ALLOCATION
        PCTEXCESS(S,*)          EXCESS DEMAND CHECK (PERCENT),
        PCTBUDGET(HH,*)         BUDGET BALANCE CALCULATION (PERCENT),

        PCTRCS(G,HH)    CONSUMPTION AS PERCENTAGE OF EXPENDITURE,
        PCTRAS(SS,S)    INTERMEDIATE INPUT AS PERCENTAGE OF OUTPUT VALUE,

        GOVERNMENT(*,*)         GOVERNMENT BUDGET SUMMARY (PERCENT),
        VALUEADDED(S,*)         VALUE-ADDED SUMMARY,
        TAXPAYMENT(S,*)         TAX PAYMENT SUMMARY;

*       PERFORM SOME QUICK DATA CHECKS:

        ZSUM(G) = SUM(S, Z(S,G));
        ZCHK = SUM(G, ABS(ZSUM(G)) - 1);
        ABORT$(ABS(ZCHK) GT 1.E-5) " Z MATRIX ERROR: ", ZSUM;

        GCE(G) = SUM(DH, RCS(G,DH));

        CD(S) = SUM(G, Z(S,G) * (GCE(G) - TC(G)));

        FD(S) = GD(S) + CD(S) + VX(S) - GSE(S) - VM(S);

        VA(S) = DL(S) + DK(S) + TL(S) + TK(S);

        LABMKT = SUM(S, DL(S)) + GDL - SUM(DH, SL(DH));
        CAPMKT = SUM(S, DK(S)) + GDK - SUM(DH, SK(DH)) - GSK;

        PMCHK(S,"PROFIT") = Y(S) - SUM(SS,RAS(SS,S)) -
                (DL(S) + DK(S) + TL(S) + TK(S) + TXO(S));

        PMCHK(S,"PROFIT%") = 100 * PMCHK(S,"PROFIT") / Y(S);

        PMCHK(S,"EXCESS") = FD(S) + SUM(SS,RAS(S,SS)) - Y(S);
        PMCHK(S,"EXCESS%") = 100 * (FD(S) + SUM(SS,RAS(S,SS)) - Y(S))/Y(S);

*       INCLUDE SOME OTHER STATISTICS FOR A COMPLETE REPORT:

SET     GEXPEND / TRNSFR, ADJ, GC, SAV/
        GREVENU / GSE, GSK, PIT, TL, TK, TXO, TC, HFIX/;

        GBDGT("TRNSFR") = SUM(DH, TRN(DH));
        GBDGT("ADJ") = SUM(DH, INCADJ(DH));
        GBDGT("GC")  = SUM(S, GD(S)) + GDK + GDL + GTL;

        GBDGT("GSE") = SUM(S,GSE(S));
        GBDGT("GSK") = GSK;
        GBDGT("PIT") = SUM(DH, PIT(DH));
        GBDGT("TL")  = SUM(S, TL(S)) + GTL;
        GBDGT("TK")  = SUM(S, TK(S));
        GBDGT("TXO") = SUM(S, TXO(S));
        GBDGT("TC")  = SUM(G, TC(G));

        GBDGT("REVENUE")  = SUM(GREVENU, GBDGT(GREVENU));
        GBDGT("OUTLAY")   = SUM(GEXPEND, GBDGT(GEXPEND));
        GBDGT("DEFICIT") = GBDGT("OUTLAY") - GBDGT("REVENUE");


        EXPEND(DH) = SUM(CCG, RCS(CCG,DH));
        SAVING(DH) = RCS("SAVNG",DH);

        BDGTBAL(DH,"EXPEND")  = EXPEND(DH);
        BDGTBAL(DH,"SAVING")  = SAVING(DH);
        BDGTBAL(DH,"INC_TAX") = PIT(DH);
        BDGTBAL(DH,"LABOR")   = SL(DH);
        BDGTBAL(DH,"CAPITAL") = SK(DH);
        BDGTBAL(DH,"TRANSF")  = TRN(DH);
        BDGTBAL(DH,"CHECK") =
          EXPEND(DH)+SAVING(DH)-(SL(DH)+SK(DH)+TRN(DH)-PIT(DH));

        PCTBUDGET(DH,"EXPEND")  = 100;
        PCTBUDGET(DH,"SAVING") = 100*
                        BDGTBAL(DH,"SAVING") / EXPEND(DH);
        PCTBUDGET(DH,"INC_TAX") = 100*
                        BDGTBAL(DH,"INC_TAX") / EXPEND(DH);
        PCTBUDGET(DH,"LABOR")   = 100*
                        BDGTBAL(DH,"LABOR")  / EXPEND(DH);
        PCTBUDGET(DH,"CAPITAL") = 100*
                        BDGTBAL(DH,"CAPITAL") / EXPEND(DH);
        PCTBUDGET(DH,"TRANSF")  = 100*
                        BDGTBAL(DH,"TRANSF") / EXPEND(DH);
        PCTBUDGET(DH,"CHECK") = 100*
                        BDGTBAL(DH,"CHECK") / EXPEND(DH);

        DISPLAY ZCHK, LABMKT, CAPMKT, PMCHK, GBDGT;
        DISPLAY PCTBUDGET, BDGTBAL;


*       =================================================================
*       MAKE ADJUSTMENTS TO BALANCE BUDGETS:

*       FIRST, REMOVE ANY NEGATIVE INCOME TAXES:

        PIT(DH) = MAX(0, PIT(DH));

        INCADJ(DH) = SUM(G, RCS(G,DH)) - (SL(DH)+SK(DH)+TRN(DH)-PIT(DH));

*       MAKE ADJUSTMENTS TO BALANCE PROFITS:

        Y(S) = Y(S) - PMCHK(S,"PROFIT");

*       ADJUSTMENTS TO BALANCE SECTORAL MARKETS:

        GSE(S) = GSE(S) + FD(S) + SUM(SS,RAS(S,SS)) - Y(S);
*       =================================================================
*       RECHECK THE CENTRAL VARIABLES:

        FD(S) = GD(S) + CD(S) + VX(S) - GSE(S) - VM(S);

        PMCHK(S,"PROFIT") = Y(S) - SUM(SS,RAS(SS,S)) -
                (DL(S) + DK(S) + TL(S) + TK(S) + TXO(S));
        PMCHK(S,"PROFIT%") = 100 * PMCHK(S,"PROFIT") / Y(S);

        BUDGET(DH,"VALUE") =
                SUM(G, RCS(G,DH)) - (SL(DH)+SK(DH)+TRN(DH)-PIT(DH));
        BUDGET(DH,"PERCENT") = 100 * BUDGET(DH,"VALUE")/SUM(G, RCS(G,DH));

        PMCHK(S,"EXCESS") = FD(S) + SUM(SS,RAS(S,SS)) - Y(S);
        PMCHK(S,"EXCESS%") = 100 * (FD(S) + SUM(SS,RAS(S,SS)) - Y(S))/Y(S);

*       RECALCULATE THE GOVERNMENT BUDGET STATISTICS:

        GBDGT("TRNSFR") = SUM(DH, TRN(DH));
        GBDGT("ADJ") = SUM(DH, INCADJ(DH));
        GBDGT("GC")  = SUM(S, GD(S)) + GDK + GDL + GTL;

        GBDGT("GSE") = SUM(S,GSE(S));
        GBDGT("GSK") = GSK;
        GBDGT("PIT") = SUM(DH, PIT(DH));
        GBDGT("TL")  = SUM(S, TL(S)) + GTL;
        GBDGT("TK")  = SUM(S, TK(S));
        GBDGT("TXO") = SUM(S, TXO(S));
        GBDGT("TC")  = SUM(G, TC(G));

        GBDGT("REVENUE")  = SUM(GREVENU, GBDGT(GREVENU));
        GBDGT("OUTLAY")   = SUM(GEXPEND, GBDGT(GEXPEND));
        GBDGT("DEFICIT") = GBDGT("OUTLAY") - GBDGT("REVENUE");

        DISPLAY PMCHK, GBDGT;

        EXPEND(DH) = SUM(CCG, RCS(CCG,DH));
        SAVING(DH) = RCS("SAVNG",DH);

        PROFIT(S,"Y") = Y(S);
        PROFIT(S,"VA") = DL(S) + DK(S);
        PROFIT(S,"TAX")  = TL(S) + TK(S) + TXO(S);
        PROFIT(S,"INTER") = SUM(SS,RAS(SS,S));
        PROFIT(S,"CHECK") = Y(S) - SUM(SS,RAS(SS,S)) -
                (DL(S) + DK(S) + TL(S) + TK(S) + TXO(S));

        PCTPROFIT(S,"Y")     = 100;
        PCTPROFIT(S,"VA")    = 100*PROFIT(S,"VA") / PROFIT(S,"Y");
        PCTPROFIT(S,"TAX")   = 100*PROFIT(S,"TAX")  / PROFIT(S,"Y");
        PCTPROFIT(S,"INTER") = 100*PROFIT(S,"INTER") / PROFIT(S,"Y");
        PCTPROFIT(S,"CHECK") = 100*PROFIT(S,"CHECK") / PROFIT(S,"Y");

        PCTVA(S,"K")   = 100 * DK(S) / VA(S);
        PCTVA(S,"L")   = 100 * DL(S) / VA(S);
        PCTVA(S,"TL")  = 100 * TL(S) / VA(S);
        PCTVA(S,"TK")  = 100 * TK(S) / VA(S);

        PCTVA("TOTAL","K")   = 100 * SUM(S, DK(S)) / SUM(S, VA(S));
        PCTVA("TOTAL","L")   = 100 * SUM(S, DL(S)) / SUM(S,VA(S));
        PCTVA("TOTAL","TL")  = 100 * SUM(S, TL(S)) / SUM(S,VA(S));
        PCTVA("TOTAL","TK")  = 100 * SUM(S, TK(S)) / SUM(S,VA(S));

        EXCESS(S,"Y")     = Y(S);
        EXCESS(S,"INTER") = SUM(SS,RAS(S,SS));
        EXCESS(S,"NETEXP") = VX(S) - VM(S);
        EXCESS("TOTAL","NETEXP") = SUM(S, VX(S) - VM(S));
        EXCESS(S,"FINDEM") = GD(S) + CD(S) - GSE(S);
        EXCESS(S,"CHECK") = FD(S) + SUM(SS,RAS(S,SS)) - Y(S);

        PCTEXCESS(S,"Y")     = 100;
        PCTEXCESS(S,"INTER") = 100*EXCESS(S,"INTER") /EXCESS(S,"Y");
        PCTEXCESS(S,"NETEXP") = 100*EXCESS(S,"NETEXP") /EXCESS(S,"Y");
        PCTEXCESS(S,"FINDEM") = 100*EXCESS(S,"FINDEM") /EXCESS(S,"Y");
        PCTEXCESS(S,"CHECK") = 100*EXCESS(S,"CHECK") /EXCESS(S,"Y");

        BDGTBAL(DH,"EXPEND")  = EXPEND(DH);
        BDGTBAL(DH,"SAVING")  = SAVING(DH);
        BDGTBAL(DH,"INC_TAX") = PIT(DH);
        BDGTBAL(DH,"LABOR")   = SL(DH);
        BDGTBAL(DH,"CAPITAL") = SK(DH);
        BDGTBAL(DH,"TRANSF")  = TRN(DH);
        BDGTBAL(DH,"CHECK") =
          EXPEND(DH)+SAVING(DH)-(SL(DH)+SK(DH)+TRN(DH)-PIT(DH));

        PCTBUDGET(DH,"EXPEND")  = 100;
        PCTBUDGET(DH,"SAVING") = 100*
                        BDGTBAL(DH,"SAVING")/BDGTBAL(DH,"EXPEND");
        PCTBUDGET(DH,"INC_TAX") = 100*
                        BDGTBAL(DH,"INC_TAX")/BDGTBAL(DH,"EXPEND");
        PCTBUDGET(DH,"LABOR")   = 100*
                        BDGTBAL(DH,"LABOR")  /BDGTBAL(DH,"EXPEND");
        PCTBUDGET(DH,"CAPITAL") = 100*
                        BDGTBAL(DH,"CAPITAL")/BDGTBAL(DH,"EXPEND");
        PCTBUDGET(DH,"TRANSF")  = 100*
                        BDGTBAL(DH,"TRANSF") /BDGTBAL(DH,"EXPEND");
        PCTBUDGET(DH,"CHECK") = 100*
                        BDGTBAL(DH,"CHECK") /BDGTBAL(DH,"EXPEND");

        GOVERNMENT("ENDOWMENT","LEVEL") = GSK + SUM(S, GSE(S));
        GOVERNMENT("L_TAX","LEVEL") = SUM(S, TL(S));
        GOVERNMENT("K_TAX","LEVEL") = SUM(S, TK(S));
        GOVERNMENT("PROD_TAX","LEVEL") = SUM(S, TXO(S));
        GOVERNMENT("CON_TAX","LEVEL")  = SUM(G, TC(G));
        GOVERNMENT("INC_TAX","LEVEL") = SUM(DH, PIT(DH));
        GOVERNMENT("REVENUE","LEVEL")  = GSK + SUM(S, GSE(S)) +
                                 SUM(S, TL(S) + TK(S) + TXO(S)) +
                                 SUM(G, TC(G)) + SUM(DH, PIT(DH));
        GOVERNMENT("TRANSF","LEVEL")  =  SUM(DH, TRN(DH));
        GOVERNMENT("INCADJ","LEVEL")  =  SUM(DH, INCADJ(DH));
        GOVERNMENT("EXPEND","LEVEL") = SUM(S, GD(S)) + GDL + GDK + GTL;
        GOVERNMENT("OUTLAY","LEVEL") =  SUM(DH, TRN(DH)) +
                                SUM(S, GD(S)) + GDL + GDK + GTL;

        GOVERNMENT("DEFICIT","LEVEL") = GOVERNMENT("OUTLAY","LEVEL")-
                                GOVERNMENT("REVENUE","LEVEL");

        GOVERNMENT("ENDOWMENT","PERCENT") =
          100 * GOVERNMENT("ENDOWMENT","LEVEL") /
                GOVERNMENT("REVENUE","LEVEL");

        GOVERNMENT("L_TAX","PERCENT") =
          100 * GOVERNMENT("L_TAX","LEVEL") /
                GOVERNMENT("REVENUE","LEVEL");

        GOVERNMENT("K_TAX","PERCENT") =
          100 * GOVERNMENT("K_TAX","LEVEL") /
                GOVERNMENT("REVENUE","LEVEL");

        GOVERNMENT("PROD_TAX","PERCENT") =
          100 * GOVERNMENT("PROD_TAX","LEVEL") /
                GOVERNMENT("REVENUE","LEVEL");

        GOVERNMENT("CON_TAX","PERCENT")  =
          100 * GOVERNMENT("CON_TAX","LEVEL") /
                GOVERNMENT("REVENUE","LEVEL");
        GOVERNMENT("INC_TAX","PERCENT") =
          100 * GOVERNMENT("INC_TAX","LEVEL") /
                GOVERNMENT("REVENUE","LEVEL");
        GOVERNMENT("REVENUE","PERCENT")  =  100;
        GOVERNMENT("TRANSF","PERCENT")  =
          100 * GOVERNMENT("TRANSF","LEVEL") /
                GOVERNMENT("REVENUE","LEVEL");
        GOVERNMENT("INCADJ","PERCENT")  =
          100 * GOVERNMENT("INCADJ","LEVEL") /
                GOVERNMENT("REVENUE","LEVEL");
        GOVERNMENT("EXPEND","PERCENT") =
          100 * GOVERNMENT("EXPEND","LEVEL") /
                GOVERNMENT("REVENUE","LEVEL");
        GOVERNMENT("OUTLAY","PERCENT") =
          100 * GOVERNMENT("OUTLAY","LEVEL") /
                GOVERNMENT("REVENUE","LEVEL");
        GOVERNMENT("DEFICIT","PERCENT") =
          100 * GOVERNMENT("DEFICIT","LEVEL") /
                GOVERNMENT("REVENUE","LEVEL");

        PCTRCS(G,DH) = 100 * RCS(G,DH) / EXPEND(DH);
        PCTRAS(SS,S) = 100 * RAS(SS,S) / Y(S);

        VALUEADDED(S,"LABOR")   = DL(S);
        VALUEADDED(S,"CAPITAL") = DK(S);
        VALUEADDED(S,"INTER")  = SUM(SS, RAS(SS,S));
        VALUEADDED(S,"TOTAL")  = DL(S) + DK(S) + SUM(SS, RAS(SS,S));

        TAXPAYMENT(S,"OUTPUT")  = TXO(S);
        TAXPAYMENT(S,"LABOR")   = TL(S);
        TAXPAYMENT(S,"CAPITAL") = TK(S);
        TAXPAYMENT(S,"TOTAL") = TXO(S) + TL(S) + TK(S);

DISPLAY PROFIT, EXCESS, BDGTBAL;
DISPLAY PCTPROFIT, PCTVA, PCTEXCESS, PCTBUDGET;
DISPLAY GOVERNMENT, TAXPAYMENT;
OPTION PCTRCS:1;
OPTION PCTRAS:1;
*.DISPLAY VALUEADDED, PCTRCS, PCTRAS;

*== DISPLAY TAX RATES BEFORE AGGREGATION:

TAUAVE(DH) = PIT(DH) / (SL(DH) + SK(DH));
DISPLAY TAU, TAUAVE;
TAUAVE(DH) = 0;

*======= CHECK THE AGGREGATION.

ABORT$(SMAX(DH, SUM(H$HMAP(DH,H), 1)-1) GT 0) "INVALID MAPPING.";

*======= PERFORM THE AGGREGATION ===========

PARAMETER POPSHR(H)  SHARE OF POPULATION;

        COUNT(H) = SUM(DH$HMAP(DH,H), COUNT(DH));
        POPSHR(H) = COUNT(H) / SUM(HP, COUNT(HP));
        SK(H) = SUM(DH$HMAP(DH,H), SK(DH));
        SL(H) = SUM(DH$HMAP(DH,H), SL(DH));
        PIT(H) = SUM(DH$HMAP(DH,H), PIT(DH));
        INCADJ(H) = SUM(DH$HMAP(DH,H), INCADJ(DH));
        TRN(H) = SUM(DH$HMAP(DH,H), TRN(DH));
        TAU(H)$PIT(H) = SUM(DH$HMAP(DH,H), PIT(DH) * TAU(DH)) / PIT(H);
        RCS(G,H) = SUM(DH$HMAP(DH,H), RCS(G,DH));

        ZTA(H) = SUM(DH$HMAP(DH,H), SL(DH) * ZTA(DH)) /
                 SUM(DH$HMAP(DH,H), SL(DH));

*       FIX ELASTICITIES:

        EL(H)  = SUM(DH$HMAP(DH,H), EL(DH)*SL(DH))/
                 SUM(DH$HMAP(DH,H), SL(DH));
        EC(H)  = 1.5;

        TAUBMK(H) = TAU(H);
        TAUAVE(H) = PIT(H) / (SL(H) + SK(H));
        LEISURE(H) = SL(H)*(ZTA(H)-1);
        CC(H) = SUM(G$CCG(G), RCS(G,H)) + LEISURE(H);
        GC = SUM(S, GD(S)) + GDK + GDL + GTL;

*       SET SAVINGS LEVELS TO ZERO FOR HOUSEHOLDS WITH NEGATIVE SAVINGS
*       AND MAKE ACCORDING INCOME ADJUSTMENT:

        SAVING(H) = SUM(G$(NOT CCG(G)), RCS(G,H));
        EXPEND(H) = SUM(CCG, RCS(CCG,H));

        GOVSAV = SUM(H$(SAVING(H) LT 0), SAVING(H));
        INCADJ(H)$(SAVING(H) LT 0) = INCADJ(H) - SAVING(H);
        LOOP(G$(NOT CCG(G)), RCS(G,H)$(SAVING(H) LT 0) = 0;);

        SAVING(H) = SUM(G$(NOT CCG(G)), RCS(G,H));
        DISPLAY GOVSAV, SAVING;

     BDGTBAL(DH,"EXPEND")  = 0;
     BDGTBAL(DH,"SAVING")  = 0;
     BDGTBAL(DH,"INC_TAX") = 0;
     BDGTBAL(DH,"LABOR")   = 0;
     BDGTBAL(DH,"CAPITAL") = 0;
     BDGTBAL(DH,"TRANSF")  = 0;
     BDGTBAL(DH,"CHECK") = 0;
     PCTBUDGET(DH,"EXPEND")  = 0;
     PCTBUDGET(DH,"SAVING")  = 0;
     PCTBUDGET(DH,"INC_TAX") = 0;
     PCTBUDGET(DH,"LABOR")   = 0;
     PCTBUDGET(DH,"CAPITAL") = 0;
     PCTBUDGET(DH,"TRANSF")  = 0;
     PCTBUDGET(DH,"CHECK") = 0;

BDGTBAL(H,"EXPEND")  = EXPEND(H);
BDGTBAL(H,"SAVING")  = SAVING(H);
BDGTBAL(H,"INC_TAX") = PIT(H);
BDGTBAL(H,"LABOR")   = SL(H);
BDGTBAL(H,"CAPITAL") = SK(H);
BDGTBAL(H,"INCADJ")  = INCADJ(H);
BDGTBAL(H,"TRANSF")  = TRN(H);
BDGTBAL(H,"CHECK")   = EXPEND(H)+SAVING(H) -
                        (SL(H)+SK(H)+TRN(H)+INCADJ(H)-PIT(H));

PCTBUDGET(H,"EXPEND")  = 100;
PCTBUDGET(H,"SAVING") =  100* BDGTBAL(H,"SAVING")/BDGTBAL(H,"EXPEND");
PCTBUDGET(H,"INC_TAX") = 100* BDGTBAL(H,"INC_TAX")/BDGTBAL(H,"EXPEND");
PCTBUDGET(H,"LABOR")   = 100* BDGTBAL(H,"LABOR")  /BDGTBAL(H,"EXPEND");
PCTBUDGET(H,"CAPITAL") = 100* BDGTBAL(H,"CAPITAL")/BDGTBAL(H,"EXPEND");
PCTBUDGET(H,"TRANSF")  = 100* BDGTBAL(H,"TRANSF") /BDGTBAL(H,"EXPEND");
PCTBUDGET(H,"INCADJ")  = 100* BDGTBAL(H,"INCADJ") /BDGTBAL(H,"EXPEND");
PCTBUDGET(H,"CHECK")   = 100 * BDGTBAL(H,"CHECK") /BDGTBAL(H,"EXPEND");

DISPLAY POPSHR, BDGTBAL, PCTBUDGET;

PARAMETER SHARE(H,*);

     SHARE(H,"L/K") = SL(H) / SK(H);
     SHARE(H,"SAVING") = 100 * SAVING(H) / SUM(HP, SAVING(HP));
     SHARE(H,"SL") = 100 * SL(H) / SUM(HP, SL(HP));
     SHARE(H,"SK") = 100 * SK(H) / SUM(HP, SK(HP));
     SHARE(H,"TR") = 100 * TRN(H) / SUM(HP, TRN(HP));
     SHARE(H,"PIT") = 100 * PIT(H) / SUM(HP, PIT(HP));
     SHARE(H,"EXPEND") = 100 * EXPEND(H) / SUM(HP, EXPEND(HP));
DISPLAY SHARE;

        GOVERNMENT("ENDOWMENT","LEVEL") = GSK + SUM(S, GSE(S));
        GOVERNMENT("L_TAX","LEVEL") = SUM(S, TL(S)) + GTL;
        GOVERNMENT("K_TAX","LEVEL") = SUM(S, TK(S));
        GOVERNMENT("PROD_TAX","LEVEL") = SUM(S, TXO(S));
        GOVERNMENT("CON_TAX","LEVEL")  = SUM(G, TC(G));
        GOVERNMENT("INC_TAX","LEVEL") = SUM(H, PIT(H));
        GOVERNMENT("TRD_BAL","LEVEL")  = SUM(S, VM(S) - VX(S));
        GOVERNMENT("REVENUE","LEVEL")  = GSK + SUM(S, GSE(S)) +
                                 SUM(S, TL(S) + TK(S) + TXO(S)) + GTL +
                                 SUM(S, VM(S) - VX(S)) +
                                 SUM(G, TC(G)) + SUM(H, PIT(H));

        GOVERNMENT("TRANSF","LEVEL")  =  SUM(H, TRN(H));
        GOVERNMENT("INCADJ","LEVEL")  =  SUM(H, INCADJ(H));
        GOVERNMENT("HFIX","LEVEL")  =  SUM(HFIX, SUM(G, RCS(G,HFIX))
                                                  - SL(HFIX) - SK(HFIX));
        GOVERNMENT("EXPEND","LEVEL") = SUM(S, GD(S)) + GDL + GDK + GTL;
        GOVERNMENT("OUTLAY","LEVEL") =  SUM(H, TRN(H) + INCADJ(H)) +
                                GOVERNMENT("HFIX","LEVEL") +
                                SUM(S, GD(S)) + GDL + GDK + GTL;

        GOVERNMENT("DEFICIT","LEVEL") = GOVERNMENT("OUTLAY", "LEVEL")-
                                        GOVERNMENT("REVENUE","LEVEL");

        GOVERNMENT("ENDOWMENT","PERCENT") =
          100 * GOVERNMENT("ENDOWMENT","LEVEL") /
                GOVERNMENT("REVENUE","LEVEL");

        GOVERNMENT("L_TAX","PERCENT") =
          100 * GOVERNMENT("L_TAX","LEVEL") /
                GOVERNMENT("REVENUE","LEVEL");

        GOVERNMENT("K_TAX","PERCENT") =
          100 * GOVERNMENT("K_TAX","LEVEL") /
                GOVERNMENT("REVENUE","LEVEL");

        GOVERNMENT("PROD_TAX","PERCENT") =
          100 * GOVERNMENT("PROD_TAX","LEVEL") /
                GOVERNMENT("REVENUE","LEVEL");

        GOVERNMENT("CON_TAX","PERCENT")  =
          100 * GOVERNMENT("CON_TAX","LEVEL") /
                GOVERNMENT("REVENUE","LEVEL");
        GOVERNMENT("INC_TAX","PERCENT") =
          100 * GOVERNMENT("INC_TAX","LEVEL") /
                GOVERNMENT("REVENUE","LEVEL");
        GOVERNMENT("REVENUE","PERCENT")  =  100;
        GOVERNMENT("TRANSF","PERCENT")  =
          100 * GOVERNMENT("TRANSF","LEVEL") /
                GOVERNMENT("REVENUE","LEVEL");
        GOVERNMENT("INCADJ","PERCENT")  =
          100 * GOVERNMENT("INCADJ","LEVEL") /
                GOVERNMENT("REVENUE","LEVEL");
        GOVERNMENT("HFIX","PERCENT")  =
          100 * GOVERNMENT("HFIX","LEVEL") /
                GOVERNMENT("REVENUE","LEVEL");
        GOVERNMENT("EXPEND","PERCENT") =
          100 * GOVERNMENT("EXPEND","LEVEL") /
                GOVERNMENT("REVENUE","LEVEL");
        GOVERNMENT("OUTLAY","PERCENT") =
          100 * GOVERNMENT("OUTLAY","LEVEL") /
                GOVERNMENT("REVENUE","LEVEL");
        GOVERNMENT("DEFICIT","PERCENT") =
          100 * GOVERNMENT("DEFICIT","LEVEL") /
                GOVERNMENT("REVENUE","LEVEL");

DISPLAY GOVERNMENT;

*       RECALCULATE THE GOVERNMENT BUDGET STATISTICS:

        GBDGT("TRNSFR") = SUM(H, TRN(H));
        GBDGT("ADJ") = SUM(H, INCADJ(H));
        GBDGT("GC")  = SUM(S, GD(S)) + GDK + GDL + GTL;
        GBDGT("SAV") = GOVSAV;

        GBDGT("HFIX") = SUM(HFIX, SL(HFIX)+SK(HFIX) - SUM(G, RCS(G,HFIX)));
        GBDGT("GSE") = SUM(S,GSE(S));
        GBDGT("GSK") = GSK;
        GBDGT("PIT") = SUM(H, PIT(H));
        GBDGT("TL")  = SUM(S, TL(S)) + GTL;
        GBDGT("TK")  = SUM(S, TK(S));
        GBDGT("TXO") = SUM(S, TXO(S));
        GBDGT("TC")  = SUM(G, TC(G));

        GBDGT("REVENUE")  = SUM(GREVENU, GBDGT(GREVENU));
        GBDGT("OUTLAY")   = SUM(GEXPEND, GBDGT(GEXPEND));
        GBDGT("DEFICIT") = GBDGT("OUTLAY") - GBDGT("REVENUE");

        DISPLAY GBDGT;

PARAMETER       TIKAVE  AVERAGE CAPITAL-INCOME TAX RATE,
                TIAVE   AVERAGE INCOME TAX RATE,
                TLAVE   AVERAGE LABOR TAX RATE,
                TKAVE   AVERAGE CAPITAL TAX RATE,
                GBENCH  BENCHMARK PROVISION;

        TLAVE = SUM(S, TL(S)) / SUM(S, DL(S) + TL(S));

        TIAVE = SUM(H, PIT(H)) / SUM(H, SL(H) + SK(H));

        TKAVE = SUM(S, TK(S)) / SUM(S, DK(S)+TK(S));

        TIKAVE = (SUM(H, PIT(H))        + SUM(S, TK(S))) /
                (SUM(H, PIT(H) + SL(H) + SK(H)) + SUM(S, DK(S)+TK(S)));

        GBENCH = (GDL + GTL + GDK + SUM(S, GD(S))) /

                SUM((G,H), RCS(G,H));

DISPLAY TIAVE, TLAVE, TIKAVE, TKAVE, GBENCH, TAUAVE, TAUBMK;


SCALAR  STATIC  SWITCH FOR FIXED CAPITAL STOCK /1/
        REDIST  SWITCH FOR ENDOGENOUS INCOME REDISTRIBUTION /1/;

SCALAR  EFKS    ELASTICITY OF FOREIGN CAPITAL SUPPLY /0.25/,
        VSCALE  SCALE FACTOR ON VALUATION OF PUBLIC GOOD /1/
        PNUM    NUMERAIRE PRICE INDEX;

ALIAS (HP,H);

OPTION LIMROW=0;
OPTION LIMCOL=0;
$OFFSYMLIST OFFSYMXREF OFFUELLIST OFFUELXREF


PARAMETER
        QREF_LS(H)      REFERENCE LEVEL OF LABOR SUPPLY - NET OF TAX
        QREF_Z(S,G)     REFERENCE LEVEL OF CONSUMER GOODS FORMATION NET TAX
        QREF_VA(S)      REFREENCE LEVEL OF VALUE-ADDED
        QREF_I(H)       REFERENCE LEVEL OF HOUSEHOLD INCOME-EXPENDITURE
        QREF_GC         REFERENCE LEVEL OF GOVERNMENT CONSUMPTION
        QREF_TRN        REFERENCE LEVEL OF TRANSFERS
        QREF_ADJ        REFERENCE LEVEL OF INCOME ADJUSTMENTS
        QREF_GINC       REFERENCE LEVEL OF GOVERNMENT INCOME

        PREF_LS(H)      REFERENCE PRICE OF LEISURE
        PREF_L(S)       REFERENCE PRICE OF LABOR
        PREF_K(S)       REFERENCE PRICE OF CAPITAL SERVICES

        T_L(S)          LABOR TAX
        T_K(S)          CAPITAL TAX
        T_Y(S)          OUTPUT TAX
        T_I(H)          INCOME TAX (MARGINAL RATE)
        T_IAVE(H)       INCOME TAX (AVERAGE RATE)
        T_C(G)          TAX RATES ON CONSUMPTION
        T_GDL           TAX RATE ON GOVERNMENT LABOR DEMAND
        THETA(H)        WEIGHTS APPLIED IN SYNTHETIC OBJECTIVE ;

        QREF_LS(H) = SL(H)*(1-TAUBMK(H));

        PREF_LS(H) = 1 + TAUBMK(H)/(1-TAUBMK(H));

        T_I(H) = TAUBMK(H)/(1-TAUBMK(H));

        T_IAVE(H) = PIT(H) / (SL(H) + SK(H));

        QREF_Z(S,G) = Z(S,G)*(GCE(G)-TC(G));

        T_C(G) = TC(G) / GCE(G);

        QREF_VA(S) = DL(S) + TL(S) + DK(S) + TK(S);

        PREF_L(S) = 1 + TL(S)/DL(S);
        T_L(S) = TL(S) / DL(S);

        PREF_K(S) = 1 + TK(S)/DK(S);
        T_K(S) = TK(S)/DK(S);

        T_Y(S) = TXO(S) / Y(S);

        QREF_GC = GDL + GTL + GDK + SUM(S, GD(S));

        VPG(H) = VSCALE *
                 QREF_GC * SUM(CCG, RCS(CCG,H)) / SUM((CCG,HP), RCS(CCG,HP));

        CP(H) = SUM(G$CCG(G), RCS(G,H));

        CG(H) = CP(H) + VPG(H);

        QREF_I(H) = CG(H) + LEISURE(H);

        T_GDL = GTL/GDL;

        QREF_TRN = SUM(H, TRN(H));

        QREF_ADJ = SUM(H, INCADJ(H));

        QREF_GINC = QREF_TRN + QREF_ADJ + QREF_GC;

*       CALIBRATE THE TOP LEVEL ELASTICITY OF LEISURE VS. CONSUMPTION:

        EL(H) = (LEISURE(H)/(QREF_I(H)-LEISURE(H)) + 0.15 /(ZTA(H)-1)) /
                (1 - QREF_LS(H)/(QREF_I(H)-LEISURE(H)));
        EL(DH) = 0;

        EG(H) = 0.5;
        VPG(H) = QREF_GC * POPSHR(H);
        CG(H) = SUM(CCG, RCS(CCG,H)) + VPG(H);
        QREF_I(H) = CG(H) + LEISURE(H);
        EL(H) =  ( ELS/(ZTA(H)-1) + QREF_LS(H) / QREF_I(H) ) /
                (1 - LEISURE(H) / QREF_I(H));
        DISPLAY EL;

$ONTEXT

$MODEL:GEMTAP

$COMMODITIES:
        P_L             !       WAGE INDEX
        P_K             !       CAPITAL RETURN INDEX
        P_W(H)          !       WELFARE PRICE INDEX
        P_LS(H)         !       LEISURE PRICE
        P_C(G)          !       CONSUMPTION GOODS PRICE
        P_GC            !       GOVERNMENT CONSUMPTION PRICE
        P_G(H)          !       HOUSEHOLD VALUATION OF PUBLIC GOOD
        P_Y(S)          !       SECTORAL GOODS PRICE

$SECTORS:
        A_GC            !       GOVERNMENT CONSUMPTION
        A_Y(S)          !       PRODUCTION INDEX
        A_W(H)          !       WELFARE INDEX
        A_C(G)          !       AGGREGATE CONSUMPTION INDEX
        A_LS(H)         !       LABOR SUPPLY

$CONSUMERS:
        I_GOVT          !       GOVERNEMTN INCOME
        RA(H)           !       HOUSEHOLD INCOME (TOTAL)

$AUXILIARY:
        NETX(S)$(VM(S)+VX(S))   !       NET EXPORTS
        P_FX            !       REAL EXCHANGE RATE
        KMX             !       CAPITAL IMPORTS MINUS EXPORTS
        Q_G             !       GOVERNMENT CONSUMPTION INDEX

$PROD:A_LS(H) s:0
        O:P_L           Q:SL(H)
        I:P_LS(H)       Q:QREF_LS(H) P:PREF_LS(H) A:I_GOVT T:T_I(H)

$PROD:A_C(G) s:0
        O:P_C(G)        Q:GCE(G)        A:I_GOVT  T:T_C(G)
        I:P_Y(S)        Q:(MAX(QREF_Z(S,G),0))
        O:P_Y(S)        Q:(-MIN(QREF_Z(S,G),0))

$PROD:A_W(H)  s:EL(H) a:EG(H) b(a):EC(H)
        O:P_W(H)        Q:QREF_I(H)
        I:P_LS(H)       Q:LEISURE(H)
        I:P_G(H)        Q:VPG(H)      a:
        I:P_C(CCG)      Q:RCS(CCG,H)  b:

$PROD:A_GC
        O:P_GC          Q:QREF_GC
        I:P_L           Q:GDL   A:I_GOVT T:T_GDL
        I:P_K           Q:GDK
        I:P_Y(S)        Q:GD(S)

$PROD:A_Y(S)  VA:EKL(S)
        O:P_Y(S)        Q:Y(S)  A:I_GOVT T:T_Y(S)
        I:P_Y(SS)       Q:RAS(SS,S)
        I:P_L           Q:DL(S) P:PREF_L(S)     A:I_GOVT T:T_L(S)  VA:
        I:P_K           Q:DK(S) P:PREF_K(S)     A:I_GOVT T:T_K(S)  VA:

$DEMAND:RA(H)
        D:P_W(H)                Q:(LEISURE(H)+CP(H)+VPG(H))

*       PUBLIC GOODS PROVISION:

        E:P_G(H)        Q:VPG(H)        R:Q_G

*       CAPITAL ENDOWMENT:

        E:P_K           Q:SK(H)

*       INVESTMENT IS EXOGENOUS:

        E:P_C(G)$(NOT CCG(G))   Q:(-SAVING(H))

*       LABOR SUPPLY:

        E:P_LS(H)       Q:(LEISURE(H)+QREF_LS(H))

*       INCOME TAXES - AVERAGE RATES

        E:P_W(H)         Q:(-T_IAVE(H) * (SL(H) + SK(H)))

*       INCOME TAX ON CAPITAL - MARGINAL ADJUSTMENT

        E:P_K            Q:(-T_I(H)*SK(H))
        E:P_W(H)         Q:( T_I(H)*SK(H))

*       TAX ON LABOR - MARGINAL ADJUSTMENT:

        E:P_W(H)         Q:( T_I(H)*QREF_LS(H))

*       TRANSFERS AND INCOME ADJUSTMENTS:

        E:P_W(H)         Q:(TRN(H) + INCADJ(H))

$DEMAND:I_GOVT

        D:P_GC          Q:QREF_GC

*       GOODS IMPORTS AND EXPORTS:

        E:P_Y(S)        Q:-1            R:NETX(S)

*       NET CAPITAL IMPORTS AND EXPORTS:

        E:P_K           Q:SKTOT         R:KMX

*       EXOGENOUS HOUSEHOLDS;

        E:P_L           Q:(SUM(HFIX, SL(HFIX)))
        E:P_K           Q:(SUM(HFIX, SK(HFIX)))
        E:P_C(G)        Q:(-SUM(HFIX, RCS(G,HFIX)))

*       GOVERNMENT INVESTMENT DEMAND;

        E:P_C(G)$(NOT CCG(G))   Q:(-GOVSAV)

*       GOVERNMENT ENDOWMENTS OF CAPITAL AND GOODS:

        E:P_K           Q:GSK
        E:P_Y(S)        Q:GSE(S)

*       INCOME TAXES: AVERAGE RATES

        E:P_W(H)         Q:(T_IAVE(H) * (SL(H) + SK(H)))

*       INCOME TAXES: MARGINAL ADJUSTMENTS FOR CAPITAL TAXES

        E:P_K           Q:(SUM(H,  T_I(H)*SK(H)))
        E:P_W(H)        Q:(-T_I(H)*SK(H))

        E:P_W(H)        Q:(-T_I(H)*QREF_LS(H))

*       TRANSFERS AND ADJUSTMENTS:

        E:P_W(H)         Q:(-TRN(H) - INCADJ(H))


$CONSTRAINT:NETX(S)$(VM(S)+VX(S))
        NETX(S) =E= VX(S)*(P_FX/P_Y(S))**EX(S) - VM(S)*(P_Y(S)/P_FX)**EM(S);

$CONSTRAINT:P_FX
        SUM(S, P_Y(S) * NETX(S)) =G= P_K * SKTOT * KMX;

$CONSTRAINT:KMX
        KMX =E= 1 - (P_FX/P_K)**EFKS;

$CONSTRAINT:Q_G
        Q_G =G= A_GC;

$OFFTEXT
$SYSINCLUDE mpsgeset GEMTAP

NETX.LO(S) = -INF;
KMX.LO = -INF;

NETX.L(S) = VX(S) - VM(S);
P_FX.L = 1;
KMX.L = 0;
Q_G.L    = 1;

RA.L(H) = QREF_I(H);
I_GOVT.L = QREF_GC;

SET     SC  SCENARIOS  /BENCH   BENCHMARK REPLICATION,
                        ITCUT   UNIFORM (FLAT RATE) INCOME TAX,
                        KTCUT   UNIFORM CAPITAL TAX,
                        LTCUT   UNIFORM LABOR TAX
                        CTAX    CONSUMPTION TAX/,
        RUN(SC) /BENCH, ITCUT, KTCUT, LTCUT, CTAX/;

PARAMETER       SUMMARY(*,*,SC)         SOLUTION SUMMARY;

TABLE  UNIFTAX(SC,*)    INDICATORS FOR UNIFORM
                 K       L        I     C
BENCH            0       0        0     0
ITCUT            0       0        1     0
KTCUT            1       0        0     0
LTCUT            0       1        0     0
CTAX             0       0        0     1;

*       SET ITERATION LIMIT TO ZERO FOR THE FIRST CASE:

IF (RUN("BENCH"), GEMTAP.ITERLIM = 0;);

LOOP(SC$RUN(SC),

*       FLAT RATE CAPITAL TAX:

        IF (UNIFTAX(SC,"K"),
                T_K(S) = SUM(SS, TK(SS)) / SUM(SS, DK(SS));
        ELSE
                T_K(S) = TK(S)/DK(S);
        );

*       FLAT RATE LABOR TAX:

        IF (UNIFTAX(SC,"L"),
                T_L(S) = SUM(SS, TL(SS)) / SUM(SS, DL(SS));
        ELSE
                T_L(S) = TL(S) / DL(S);
        );

*       MOVE TO A FLAT RATE INCOME TAX:

        IF (UNIFTAX(SC,"I"),
                T_I(H) = TIAVE;
                T_IAVE(H) = TIAVE;
        ELSE
                T_I(H) = TAUBMK(H)/(1-TAUBMK(H));
                T_IAVE(H) = PIT(H) / (SL(H) + SK(H));
        );

*       FLAT CONSUMPTION TAX:

        IF (UNIFTAX(SC,"C"),
          T_C(G)    = (GBDGT("PIT")+GBDGT("TL")+GBDGT("TK")+GBDGT("TC"))
                        / SUM(GG, GCE(GG));
          T_I(H)    = 0;
          T_IAVE(H) = 0;
          T_L(S)    = 0;
          T_K(S)    = 0;
        ELSE
          T_C(G) = TC(G) / GCE(G);
        );

$INCLUDE GEMTAP.GEN
SOLVE GEMTAP USING MCP;

*       RESET ITERATION LIMIT AFTER BENCHMARK REPLICATION  (1ST SC):

        GEMTAP.ITERLIM = 5000;

*       REPORT SOLUTION STATISTICS:

        SUMMARY("STATUS","_", SC) = GEMTAP.MODELSTAT;
        SUMMARY("ITERS", "_", SC) = GEMTAP.ITERUSD;
        SUMMARY("CPU",   "_", SC) = GEMTAP.RESUSD;
        SUMMARY("CONTOL",   "_", SC) = GEMTAP.OBJVAL;

*       PUBLIC GOODS PROVISION:

        SUMMARY("G","_",SC) = 100 * (A_GC.L - 1);

        PNUM =  SUM((CCG,H), RCS(CCG,H) * P_C.L(CCG)) /
                SUM((CCG,H), RCS(CCG,H));

        SUMMARY("P_FX","_",SC) = 100 * (P_FX.L/PNUM - 1);

        SUMMARY("PK","_",SC) = 100 * (P_K.L/PNUM - 1);

        SUMMARY("PL","_",SC) = 100 * (P_L.L/PNUM - 1);

        SUMMARY("KMX","_",SC) = 100 * KMX.L;

*       REPORT WELARE CHANGES INDICES:

        SUMMARY("EV",H,SC) = 100 * (A_W.L(H) - 1);
        SUMMARY("EV","TOTAL",SC) =
            100 * (SUM(H, QREF_I(H)*A_W.L(H))/SUM(H, QREF_I(H)) - 1);

);

DISPLAY SUMMARY;