Beruflich Dokumente
Kultur Dokumente
= L
x
+L
y
K
= K
x
+K
y
W = W(X, Y )
I = p
l
L
+p
k
K
= p
x
X +p
y
Y
factor allocations to the two sectors? Many economists rst reaction would be to formulate equilib-
rium as the solution to an optimization problem. Equilibrium could be solved for by a constrained
optimization problem: max W subject to the remaining constraints.
16
While this would work, the usefulness of this approach breaks down quickly as the model becomes
more complicated. Suppose, for example, there are two dierent consumer types with dierent
preferences and dierent factor endowments. What do we maximize? You could maximize the
utility of one consumer subject to an arbitrary xed level of the utility of the other consumer,
exploiting the rst theorem of welfare economics. But unless you are extraordinarily lucky, the
solution will give each consumer an implied expenditure level which is not equal to the consumers
income. Thus there is an inconsistency in the proposed solution.
The alternative approach is to convert the problem to a system of equations, and solve that sys-
tem. First, solve the underlying cost minimization problems for producers and consumers, so that
individual optimizing behavior is embedded in the model. In the present model, we want to solve
for cost functions for each sector, which embody ecient and optimizing cost-minimizing behavior.
These give the minimum cost of producing a good at given factor prices.
3.2.1 Functional Forms
Similarly, we can solve for a cost function for the consumer, commonly called an expenditure function,
which gives the minimum cost at given commodity prices of buying one unit of utility or welfare
(W). These functions are given as follows.
Unit cost functions for X and Y :
cx = C
x
(p
L
, p
K
), cy = C
y
(p
L
, p
K
)
Unit cost (expenditure) function for W:
e = e(p
x
, p
y
)
3.2.2 Demand Functions
The next crucial step is provided by demand theory, Shepards lemma in particular. This result,
which in turn relies on the envelope theorem, states that the partial derivatives of these functions
are quantities. In particular, we have:
1. X producers optimal demand for labor per unit of output (similarly for Y )
cx
p
L
= cx
p
L
2. X producers demand for capital per unit of output (similarly for Y ):
cx
p
K
= cx
p
K
3. Consumers demand for X per unit of utility (similarly for Y ):
e
p
x
= e
px
Now we are in a position to specify general equilibrium as the solution to a square system of 9 weak
inequalities in 9 unknowns. General-equilibrium formulated as the following square system:
17
(1) Non-positive prots for X cx(p
L
, p
K
) p
x
(2) Non-positive prots for Y cy(p
L
, p
K
) p
y
(3) Non-positive prots for W e(p
x
, p
y
) p
w
(4) Supply - Demand for X X e
px
(p
x
, p
y
)W
(5) Supply - Demand for Y Y e
py
(p
x
, p
y
)W
(6) Supply - Demand for W W I/p
w
(7) Supply - Demand for L L
cx
pL
X +cy
pL
Y
(8) Supply - Demand for K K
cx
pK
X +cy
pK
Y
(9) Income balance I = p
L
L
+p
K
K
@
@
@
@
@
@
@
@
@
@
@
s:0.75
I:PX Q:20
+bY
)
1/
= F(L, K)
in which 1, =
1
1
3.3.3 Specic Factors (M24)
There are some inherent diculties in Heckscher-Ohlin type models, in which all factors are used in
and are mobile between sectors. In particular, trade theory demonstrates that when there are more
goods than factors, there are ats in the aggregate transformation surface of the economy, and
open economies tend to specialize in only as many goods as factors. This is, of course, inconsistent
with real data, which generally show economies producing something in all industries.
There are several ways around this problem. One is the Armington assumption introduced in the
next chapter. A second is to assume a portion of capital, or other factors (e.g., resources, land) is
xed or sector specic in each sector. That is what we do in this example. We take the data matrix
of M21 (M1 MPS) and split capital into three factors: (i) capital that is mobile between the two
sectors, (ii) capital specic to Y, and (iii) capital specic to X.
This assumption helps convexify the model and allow positive production of all goods. It is also
a useful assumption when data is too aggregated, such as modeling the valued added in an energy
sector as comprised of just capital and labor. Designating a portion of that capital as sector-
specic resources, allows for more realistic policy experiments. Second, the returns to the specic
factor have a nice interpretation as resource rents.
Here is the data matrix of model M21
Production Sectors Consumers
Markets | X Y W | CONS
------------------------------------------------------
PX | 100 -100 |
PY | 100 -100 |
PW | 200 | -200
PL | -25 -75 | 100
PK | -75 -25 | 100
------------------------------------------------------
Now designate part of the capital in each sector as xed in that sector, creating a four-factor model.
40
Production Sectors Consumers
Markets | X Y W | CONS
------------------------------------------------------
PX | 100 -100 |
PY | 100 -100 |
PW | 200 | -200
PL | -25 -75 | 100
PK | -50 -15 | 65
PKX | -25 | 25
PKY | -10 | 10
------------------------------------------------------
Exercise:
As an exercise after examining this model, try to guess how the introduction of the specic factors
aects the responsiveness (elasticity) of X and Y outputs to the 100% tax. Run the model and
compare it to the 50% X-sector tax results in model M21 (M1 MPS).
1 $TITLE Model M24: Closed Economy 2x2 with Specific Factors
2
3 $ONTEXT
4
5 Here is the initial data matrix for example M21 (also M1\_MPS). As noted
6 in the text description, it is technically useful to interpret a portion
7 of capital in each sector as sector specific. Or it can in fact be a
8 separate factor such as land or resources.
9
10 Production Sectors Consumers
11 Markets | X Y W | CONS
12 ------------------------------------------------------
13 PX | 100 -100 |
14 PY | 100 -100 |
15 PW | 200 | -200
16 PL | -25 -75 | 100
17 PK | -75 -25 | 100
18 ------------------------------------------------------
19
20 Designate part of the capital in each sector as fixed in that sector
21
22 Production Sectors Consumers
23 Markets | X Y W | CONS
24 ------------------------------------------------------
25 PX | 100 -100 |
26 PY | 100 -100 |
27 PW | 200 | -200
28 PL | -25 -75 | 100
29 PK | -50 -15 | 65
30 PKX | -25 | 25
31 PKY | -10 | 10
32 ------------------------------------------------------
33
34 $OFFTEXT
35
36 PARAMETERS
37 TX;
38
39 TX = 0;
40
41 $ONTEXT
42 $MODEL:M24
43
44 $SECTORS:
41
45 X ! Activity level for sector X
46 Y ! Activity level for sector Y
47 W ! Activity level for sector W (Hicksian welfare index)
48
49 $COMMODITIES:
50 PW ! Price index for welfare (expenditure function)
51 PX ! Price index for commodity X
52 PY ! Price index for commodity Y
53 PL ! Price index for primary factor L
54 PK ! Price index for (mobile) capital
55 PKX ! Price index for sector-specific input for sector X
56 PKY ! Price index for sector-specific input for sector Y
57
58 $CONSUMERS:
59 CONS ! Income level for consumer CONS
60
61 $PROD:X s:1
62 O:PX Q:100
63 I:PL Q: 25 A:CONS T:TX
64 I:PK Q: 50 A:CONS T:TX
65 I:PKX Q: 25 A:CONS T:TX
66
67 $PROD:Y s:1
68 O:PY Q:100
69 I:PL Q: 75
70 I:PK Q: 15
71 I:PKY Q: 10
72
73 $PROD:W s:1
74 O:PW Q:200
75 I:PX Q:100
76 I:PY Q:100
77
78 $DEMAND:CONS
79 D:PW Q:200
80 E:PL Q:100
81 E:PK Q: 65
82 E:PKX Q: 25
83 E:PKY Q: 10
84
85 $OFFTEXT
86 $SYSINCLUDE mpsgeset M24
87
88 $INCLUDE M24.GEN
89 SOLVE M24 USING MCP;
90
91 * Solve a counterfactual:
92
93 TX = 0.5;
94 $INCLUDE M24.GEN
95 SOLVE M24 USING MCP;
3.3.4 Tax Avoidance and Slack Activities (M25)
As has been noted, an attractive and powerful feature of MPSGE is that it solves complementarity
problems in which some production activities can be slack for some values of parameters and active
for others. This allows researchers to consider a much wider set of problems that is allowed using
software which can only solve systems of equations.
Model 25 presents a simple example, motivated by tax evasion activities. There is a third sector, Z,
which also produces good X but it is 10% less ecient (10% more costly) than the X activity itself.
42
So initially, Z does not operate. But when a tax of 25% is imposed on X, this activity goes slack
and Z begins to operate. We could think of Z as a tax evasion or informal activity that is less
ecient but can successfully avoid the tax.
Exercise:
As a second counterfactual, we impose the tax but do not let the Z sector operate by imposing
the restriction Z.FX = 0;. Compare the results of this run to the rst counterfactual in which Z is
allowed to operate. Can you interpret the welfare results? Hint: while the tax is distortionary, the
switch to the inecient activity uses real resources to avoid the tax.
Now raise the tax to 100%. Does this result that tax evasion (the switch to Z) is welfare worsening
still hold?
1 $TITLE Model M25: Closed 2x2 Economy with an Unprofitable Activity
2
3 $ONTEXT
4
5 Production Sectors Consumers
6 Markets | X Y W | CONS
7 ------------------------------------------------------
8 PX | 100 -100 |
9 PY | 100 -100 |
10 PW | 200 | -200
11 PL | -40 -60 | 100
12 PK | -60 -40 | 100
13 ------------------------------------------------------
14
15 Activity Z is unprofitable at initial equilibrium prices. It is
16 therefore not operated, and we cannot infer its technical properties
17 from the benchmark social accounting data. We assume that Z is 10\%
18 less efficient than X.
19
20 $OFFTEXT
21
22 PARAMETERS
23 TX;
24
25 TX = 0;
26
27 $ONTEXT
28 $MODEL:M25
29
30 $SECTORS:
31 X ! Activity level for sector X
32 Y ! Activity level for sector Y
33 W ! Activity level for sector W (Hicksian welfare index)
34 Z ! Alternative activity for producing X.
35
36 $COMMODITIES:
37 PX ! Price index for commodity X
38 PY ! Price index for commodity Y
39 PL ! Price index for primary factor L
40 PK ! Price index for primary factor K
41 PW ! Price index for welfare (expenditure function)
42
43 $CONSUMERS:
44 CONS ! Income level for consumer CONS
45
46 $PROD:X s:1
43
47 O:PX Q:100
48 I:PL Q: 40 A:CONS T:TX
49 I:PK Q: 60 A:CONS T:TX
50
51 $PROD:Y s:1
52 O:PY Q:100
53 I:PL Q: 60
54 I:PK Q: 40
55
56 $PROD:Z s:1
57 O:PX Q:100
58 I:PL Q: 44
59 I:PK Q: 66
60
61 $PROD:W s:1
62 O:PW Q:200
63 I:PX Q:100
64 I:PY Q:100
65
66 $DEMAND:CONS
67 D:PW Q:200
68 E:PL Q:100
69 E:PK Q:100
70
71 $OFFTEXT
72 $SYSINCLUDE mpsgeset M25
73
74 PW.FX = 1;
75
76 Z.L = 0;
77
78 $INCLUDE M25.GEN
79 SOLVE M25 USINCP MCP;
80
81 * Lets levy a high on sector X and see what happens:
82
83 TX = 0.25;
84 $INCLUDE M25.GEN
85 SOLVE M25 USING MCP;
86
87 * What is the effect of the tax if Z could not be used?
88
89 Z.FX = 0;
90
91 TX = 0.25;
92 $INCLUDE M25.GEN
93 SOLVE M25 USING MCP;
3.3.5 Labor-Leisure Choice (M26)
Often general-equilibrium models used in international trade assume that factors of production,
especially labor, are in xed and inelastic supply. But designing tax, welfare, and education systems,
endogenizing labor supply is a crucial part of the story. Model M26 endogenizes labor supply,
allowing labor to chose between leisure and labor supply with leisure entering into the workers
utility function.
This requires the modeler to specify an endowment of labor or time, something which is not in itself
directly observable. Only the portion actually supplied to the market is observable. The modeler
also need to specify an elasticity of substitution between leisure and consumption goods, which will
in turn imply an elasticity of labor supply.
44
We cannot do much theoretical analysis here, but do suggest that students interested in these
questions work with a simple CES function with one good and leisure in order to understand the
basic mircoeconomics of labor supply. For a Cobb-Douglas function with an elasticity of substitution
equal to one between consumption and leisure, labor supply is completely inelastic with respect to
the wage rate. When the elasticity of substitution is greater than one, an increase in the wage rate
will mean an increase in labor supply, and an elasticity of substitution less than one will mean that
labor supply is backward bending, falling with an increase in the wage rate.
In our formulation, we introduce an additional activity T, which transforms leisure (price PL) into
labor supplied (price PLS). Strictly speaking this is not necessary, the consumers endowment of
labor could just be supplied to both production and the welfare generating activity W. But adding
activities is often useful. The solution will report the activity level of T which allows us to directly
check the change in labor supply, and any tax on labor can be specied here just once rather than
in each sector that uses labor. Here is the production block for T:
$PROD:T
O:PLS Q:100
I:PL Q:100 A:CONS T:TL
The production block for W species a nesting structure in which goods have an elasticity of sub-
stitution of 1 between them in a lower nest, and goods and leisure have an elasticity of substitution
between them of 0.5:
$PROD:W s:0.5 cons:1
O:PW Q:300
I:PX Q:100 cons:
I:PY Q:100 cons:
I:PL Q:100
(The use of cons as a nest label in $PROD:W should not be confused with the A:CONS appearing in
the $PROD:T block where CONS refers to the consumer of that name.)
In this model the consumer is assumed to be endowed with 200 units of labor/leisure (found in the
DEMAND block), of which 100 units are supplied to the labor market initially.
1 $TITLE Model M26: 2x2 Economy with Labor-Leisure Choice
2
3 $ONTEXT
4
5
6 Activity T transforms leisure into labor supply:
7
8 Production Sectors Consumers
9 Markets | A B W T | CONS
10 ---------------------------------------------------------
11 PX | 80 20 -100 |
12 PY | 20 80 -100 |
13 PW | 300 | -300
14 PLS | -40 -60 100 |
15 PL | -100 -100 | 200
16 PK | -60 -40 | 100
17 ---------------------------------------------------------
18
19 $OFFTEXT
20
45
21 PARAMETERS
22 TL Tax rate on labor /0/
23 WELFARE Hicksian equivalent welfare
24 REALCONS Real consumption;
25
26 $ONTEXT
27 $MODEL:M26
28
29 $SECTORS:
30 X ! Activity level for sector X
31 Y ! Activity level for sector Y
32 T ! Labor supply
33 W ! Activity level for sector W (Hicksian welfare index)
34
35 $COMMODITIES:
36 PX ! Price index for commodity X
37 PY ! Price index for commodity Y
38 PL ! Price index for leisure
39 PLS ! Price index for labor supply (factor L input)
40 PK ! Price index for primary factor K
41 PW ! Price index for welfare (expenditure function)
42
43 $CONSUMERS:
44 CONS ! Income level for consumer CONS
45
46
47 $PROD:X s:1
48 O:PX Q:100
49 I:PLS Q: 40
50 I:PK Q: 60
51
52 $PROD:Y s:1
53 O:PY Q:100
54 I:PLS Q: 60
55 I:PK Q: 40
56
57 $PROD:T
58 O:PLS Q:100
59 I:PL Q:100 A:CONS T:TL
60
61 $PROD:W s:0.5 cons:1
62 O:PW Q:300
63 I:PX Q:100 cons:
64 I:PY Q:100 cons:
65 I:PL Q:100
66
67 $DEMAND:CONS
68 D:PW Q:300
69 E:PL Q:200
70 E:PK Q:100
71
72 $OFFTEXT
73 $SYSINCLUDE mpsgeset M26
74
75 PW.FX = 1;
76
77 $INCLUDE M26.GEN
78 SOLVE M26 USING MCP;
79
80 WELFARE = W.L;
81 REALCONS = (PX.L*X.L*100 + PY.L*Y.L*100)/(PX.L**0.5*PY.L**0.5*200);
82 DISPLAY WELFARE, REALCONS;
83
84 * Solve a counter-factual, tax labor supply at 25%
46
85
86 TL = 0.5;
87 $INCLUDE M26.GEN
88 SOLVE M26 USING MCP;
89
90 WELFARE = W.L;
91 REALCONS = (PX.L*X.L*100 + PY.L*Y.L*100)/(PX.L**0.5*PY.L**0.5*200);
92 DISPLAY WELFARE, REALCONS;
Several features of this program require some explanation. First, the use of the labor supply activity
is going to imply two separate prices in the present of the labor tax. There is PL, which is the price
of leisure, or alternatively the consumers price of a labor supplied to the market. PLS is going to
be the producers cost of labor. The two are related by
PLS = PL(1+TL)
We could also refer to these as the before (PL) and after tax wage (PLS). We will spend more time on
this issue in the next chapter and are simply alerting the reader to this issue now: in the presence
of taxes, generally not all prices can be one, and it is very important to keep track of what prices
go where, who pays what price and who receives what price.
Second, note the equations and notation at the end of the program.
WELFARE = W.L;
REALCONS = (PX.L*X.L*100 + PY.L*Y.L*100) / (PX.L**0.5*PY.L**0.5*200);
DISPLAY WELFARE, REALCONS;
A .L after a variable asks for the current value of a variable. Thus W.L gives the value of the
variable named W.
In the rst two of these statements, parameters (declared earlier) are assigned values following the
solution to the model. The rst is just the value of welfare. The second, REALCONS, is short for
the real value of goods consumption. This is specied as the value of X plus Y consumption divided
by the price index for a unit of welfare (the exact consumer price index). We have specied this
variable (declared as a PARAMETER in GAMS) in order to make an economic point.
As you will see if you run this model, the labor tax leads to a reduction in labor supply. This of course
leads to a fall in commodity consumption but also to a rise in leisure. Economic indices generally
ignore leisure and report changes in nominal or real consumption. If you look at the solution to
the model, you will see that indeed REALCONS falls much more than WELFARE. Thus in this case, the
usual statistics overstate the burden of the tax and would overstate the benet of removing the tax
if labor supply increases.
Finally, GAMS does not automatically write out the values of parameters in the listing le (in this
case M26.LST). You have to request that, which is done here with the DISPLAY statement as
shown. Parameter values will be written out following the values of the variables of the model.
Exercise:
Change the elasticity of substitution between leisure and goods and see how this aects the results
concerning the labor tax.
47
3.3.6 Labor Supply to Formal and Informal Sectors (M27)
This is a model which may be of interest to development and public nance economists. It assumes
that there are two labor markets, a formal and an informal market. Governments are able to
collect taxes on the former but not on the latter. The representative household can choose how much
labor to supply to each market. For simplicity, we assume that there is no labor-leisure decision, and
that all labor is supplied to one of the two markets, but that can be very easily added and indeed
we will suggest that as an exercise at the end.
There are many ways of doing this. We rst of all use an activity denoted LS which takes household
labor and produces two outputs, formal and informal labor (prices PLSF and PLSI) according to
a CET transformation function with an elasticity 5.0. Think of this as a household technology
embodying the fact that the two types of labor are not perfect substitutes in supply. For example,
this might be a crude simplication of the fact that the representative household is actual many
households (or household locations) some of whom are better at supplying formal labor and vice
versa. Concentrating supply in either market leads to something like diminishing returns, a
concave transformation frontier between the two types of end. Rough
In addition, the two types of labor can be imperfect substitutes on the production side. That is
what we assume here. Only formal labor is used in the X sector, while both formal and (mostly)
informal labor are used in the Y sector. The two types of labor are in a lower level nest with an
elasticity of substitution of 3.
The formal and informal labor supplies could go directly into production, but the listing le will
not directly tell us how much of each type is produced by activity LS. Thus we use two dummy
activities LF and LI which take a unit of formal labor (LF) or informal labor (LI) and just turn each
unit into a unit of the same thing with a dierent commodity name (PLF and PLI) which are the
actual inputs into production. This is just a trip so that the listing le will tell us how much of
each type of labor is supplied, the activity levels of LF and LI respectively. In addition, this trick
is convenient in multi-sector models because the tax on formal labor need only be specied once, in
the LF activity, and not in every production block using formal labor.
Here is the program. You will see from the listing le that the tax on formal labor supply leads
to a large shift of household supply toward informal labor and that there is a large shift in output
toward Y, the sector using informal labor.
1 $TITLE Model M27: 2x2 Economy with Formal/Informal Labor Supply
2
3 $ONTEXT
4
5
6 Activity LS transforms leisure into formal and informal labor supplies.
7 LF and LI are "dummy" activities used to keep track of how much labor
8 is supplied to each market.
9
10 Production Sectors Consumers
11 Markets | X Y W LF LI LS | CONS
12 -------------------------------------------------------------------
13 PX | 100 -100 |
14 PY | 100 -100 |
15 PW | 200 | -200
16 PLF | -40 -10 50 |
17 PLI | -50 50 |
18 PLSF | -50 50 |
19 PLSI | -50 50 |
20 PL | -100 | 100
48
21 PK | -60 -40 | 100
22 ----------------------------------------------------------------
23
24 $OFFTEXT
25
26 PARAMETERS
27 TL;
28
29 TL = 0;
30
31 $ONTEXT
32 $MODEL:M27
33
34 $SECTORS:
35 X ! Activity level for sector X
36 Y ! Activity level for sector Y
37 LS ! Activity level for household labor supply
38 LF ! Activity for formal labor supply
39 LI ! Activity for informal labor supply
40 W ! Activity level for sector W (Hicksian welfare index)
41
42 $COMMODITIES:
43 PX ! Price index for commodity X
44 PY ! Price index for commodity Y
45 PL ! Price index for labor
46 PLSF ! Price index for formal labor supplied to market
47 PLSI ! Price index for informal labor supply to market
48 PLF ! Price index for formal labor supplied to firms
49 PLI ! Price index for informal labor supplied to firms
50 PK ! Price index for primary factor K
51 PW ! Price index for welfare (expenditure function)
52
53 $CONSUMERS:
54 CONS ! Income level for consumer CONS
55
56 $PROD:X s:1
57 O:PX Q:100
58 I:PLF Q: 40
59 I:PK Q: 60
60
61 $PROD:Y s:1 a:3
62 O:PY Q:100
63 I:PLF Q: 10 a:
64 I:PLI Q: 50 a:
65 I:PK Q: 40
66
67 $PROD:LS t:5.0
68 O:PLSF Q: 50
69 O:PLSI Q: 50
70 I:PL Q:100
71
72 $PROD:LF
73 O:PLF Q: 50
74 I:PLSF Q: 50 A:CONS T:TL
75
76 $PROD:LI
77 O:PLI Q: 50
78 I:PLSI Q: 50
79
80 $PROD:W s:1.0
81 O:PW Q:200
82 I:PX Q:100
83 I:PY Q:100
84
49
85 $DEMAND:CONS
86 D:PW Q:200
87 E:PL Q:100
88 E:PK Q:100
89
90 $OFFTEXT
91 $SYSINCLUDE mpsgeset M27
92
93 PW.FX = 1;
94
95 $INCLUDE M27.GEN
96 SOLVE M27 USING MCP;
97
98 * Solve a counter-factual, tax formal labor supply at 50%
99
100 TL = 0.5;
101 $INCLUDE M27.GEN
102 SOLVE M27 USING MCP;
103
3.3.7 Heterogeneous Households (M28)
A great many questions of interest to trade and public nance economists involve issues of distri-
bution rather than or in addition to issues of aggregate welfare. Households (or consumers in
MPSGE) may dier in their preferences and more importantly in their sources of income (or their
factor endowments). For both reasons, dierent taxes and other government policies aect dierent
households in dierent ways. In addition to creating deadweight losses or aggregate benets, tax
change can also signicantly redistribute income among households.
Adding multiple household types is a straightforward extension of our earlier models. In model
M28, we allow for two households. Household A is relatively well endowed with labor, and also has
a preference for good Y, which is the labor-intensive good. Household B is relatively well endowed
with capital and has a relative preference for the capital intensive good X.
Our counterfactual experiment is to place a tax on the factor inputs to X, assigning half the revenue
to each consumer. As you will guess, this tax lowers the welfare of household B. However, the
redistribution eect outweighs the overall deadweight loss of the tax for household A, which is
actually better o. This welfare gain is a combination of a redistribution in favor of capital, and a
lowering of the relative consumer price of Y, the good favored by household A.
Note that we chose labor as numeraire in this program, and the consumer price index (PWA, PWB)
will dier for the two end households.
Exercises:
(1) You might (correctly) guess that there is no way to redistribute the tax unevenly and make
both households worse o. That would violate the rst theorem of welfare economics. Try some
alternative distributions to check on this. You will need to specify two end dierent tax parameters,
but they should continue to sum to 0.5.
(1) Recalibrate the data so that the households have the same preferences. Running the experiment
gives then a welfare eect due only to the change in factor prices following the imposition of the tax.
1 $TITLE Model M28GMS: 2x2 Economy with Two Household Types
2
50
3 $ONTEXT
4
5 Two households: differ in preferences and in endowments
6
7 Production Sectors Consumers
8 Markets | X Y WA WB | A B
9 ----------------------------------------------------------
10 PX | 100 -40 -60 |
11 PY | 100 -60 -40 |
12 PWA | 100 | -100
13 PWB | 100 | -100
14 PL | -25 -75 | 90 10
15 PK | -75 -25 | 10 90
16 ----------------------------------------------------------
17
18 $OFFTEXT
19
20 PARAMETERS
21 TX;
22
23 TX = 0;
24
25 $ONTEXT
26
27 $MODEL:M28
28
29 $SECTORS:
30 X ! Activity level for sector X
31 Y ! Activity level for sector Y
32 WA ! Welfare index for consumer A
33 WB ! Welfare index for consumer B
34
35 $COMMODITIES:
36 PX ! Price index for commodity X
37 PY ! Price index for commodity Y
38 PL ! Price index for primary factor L
39 PK ! Price index for primary factor K
40 PWA ! Price index for consumer A welfare
41 PWB ! Price index for consumer B welfare
42
43 $CONSUMERS:
44 CONSA ! Income level for consumer A
45 CONSB ! Income level for consumer B
46
47 * More than one tax may be levied on a single transaction with
48 * revenues accruing to different agents. As specified here, the
49 * ad-valorem tax rate on inputs to sector X equals 2*TX. Half
50 * of the tax revenue accrues to A and half to B.
51
52 $PROD:X s:1
53 O:PX Q:100
54 I:PL Q: 25 A:CONSA T:TX A:CONSB T:TX
55 I:PK Q: 75 A:CONSA T:TX A:CONSB T:TX
56
57 $PROD:Y s:1
58 O:PY Q:100
59 I:PL Q: 75
60 I:PK Q: 25
61
62 $PROD:WA s:1
63 O:PWA Q:100
64 I:PX Q: 40
65 I:PY Q: 60
66
51
67 $PROD:WB s:1
68 O:PWB Q:100
69 I:PX Q: 60
70 I:PY Q: 40
71
72 $DEMAND:CONSA
73 D:PWA Q:100
74 E:PL Q: 90
75 E:PK Q: 10
76
77 $DEMAND:CONSB
78 D:PWB Q:100
79 E:PL Q: 10
80 E:PK Q: 90
81
82 $OFFTEXT
83 $SYSINCLUDE mpsgeset M28
84
85 PL.FX = 1;
86
87 $INCLUDE M28.GEN
88 SOLVE M28 USING MCP;
89
90
91 * Solve a counterfactual:
92
93 TX = 0.25;
94 $INCLUDE M28.GEN
95 SOLVE M28 USING MCP;
3.3.8 Stone-Geary (LES) preferences (M29)
No budget study we are aware of has ever suggested that consumer preferences are homogeneous.
Households tend to spend a much higher proportion of their income on food at low incomes, for
example, than at high incomes. Part of the reason that trade economists and applied general-
equilibrium modelers are so fond of homogenous functions is that they are technically much easier
to handle than non-homogeneous functions. As we noted earlier, any constant-returns CES function
can be completely specied by a single vector of values of inputs and output quantities, and the
relative prices of inputs at that point.
One alternative formulation is know as the Stone-Geary utility function, which in turn gives rise to
the linear expenditure system (LES) of demand equations, the latter being popular in budget studies.
The Stone-Geary utility function is just a Cobb-Douglas function with the origin displaced from zero.
These displacements, if positive, are typically called minimum consumption requirements, meaning
that the consumer gets no positive utility until these needs are met. Consider a simple case in which
there is a minimum consumption requirement in X but not in Y. The minimum X consumption is
denoted X*. The utility function is
U = (X X
Y
1
If we maximize this function subject to the usual budget constraint with income I, the demand
functions for X and Y are:
X = X
+
(I p
x
X
)
p
x
Y =
(1 )(I p
x
X
)
p
y
52
The rst equation is rather intuitive in words. It says that you rst purchase the minimum con-
sumption requirements, and then you spend a constant fraction () of remaining income net of the
minimum requirements on X. Further algebra would give us the budget share spent on X and the
income elasticity of demand for X.
p
x
X
I
=
I + (1 )p
x
X
I
I
X
dX
dI
=
I
I + (1 )p
x
X
The budget share spent on X falls with increases in income, asymptotically approaching as income
rises. The income elasticity of demand rises with income, asymptotically approaching 1.
Suppose that we want to calibrate our initial data to the assumption that the income elasticity of
demand for X is initially equal to 0.75. If we solve the share equation (equal to 0.5) in the data and
the income-elasticity equation (equal to 0.75 by assumption), we get = 3/8. This will then allow
us to solve for X*, which is X* = 40. The trick is then to revise the benchmark data matrix, giving
the consumer a negative endowment of X = 40. The utility (welfare) function Wthen has an input
of 60 units of X (100 minus the minimum consumption requirement) and 100 units of Y. At prices
of 1 for each good, MPSGE will then calibrate the Cobb-Douglas utility function with an = 3/8
(60/160).
The counterfactual experiment in this model is to double the consumers endowment. Note from the
results that there is a shift in consumption toward Y, the high income-elasticity good. Of course,
the change in X and Y consumption cannot be directly interpreted as income elasticities of demand,
since prices will change in general equilibrium. The price of Y will rise relative to X, and the price
of the factor used intensively in Y will rise relative to the price of the other factor.
One nal word of caution about this model and the use of Stone-Geary. Welfare changes have to be
interpreted carefully, because utility is not linear (homogenous of degree 1) in income at constant
prices. As you will see from the results of this simulation, utility (W) more than doubles as we double
the endowment. Note by way of intuition that if income as so low that the consumer could just
barely buy the minimum consumption requirement, then utility would be zero. Also, we should note
that if income is too small to even buy X* (in general equilibrium, the endowment is insucient to
produce X*), the solver will crash and not compute a solution. These diculties are troubling, but
we are sure that good policy must consider the fact that really poor people consume very dierent
bundles of goods than rich people, and this has probably more to do with non-homogeneity than
them having homogeneous but dierent preferences.
1 $TITLE Model M29: Closed 2x2 Economy -- Stone Geary (LES) Preferences
2
3 $ONTEXT
4
5
6 The observed data is:
7
8 Production Sectors Consumers
9 Markets | X Y W | CONS
10 ------------------------------------------------------
11 PX | 100 -100 |
12 PY | 100 -100 |
13 PW | 200 | -200
53
14 PL | -40 -60 | 100
15 PK | -60 -40 | 100
16 ------------------------------------------------------
17
18 But calibrated to the model as:
19
20 Production Sectors Consumers
21 Markets | X Y W | CONS
22 ------------------------------------------------------
23 PX | 100 -60 | -40
24 PY | 100 -100 |
25 PW | 160 | -160
26 PL | -40 -60 | 100
27 PK | -60 -40 | 100
28 ------------------------------------------------------
29
30 $OFFTEXT
31
32 PARAMETERS
33 ENDOW;
34
35 ENDOW = 1;
36
37 $ONTEXT
38
39 $MODEL:M29
40
41 $SECTORS:
42 X ! Activity level for sector X
43 Y ! Activity level for sector Y
44 W ! Activity level for sector W (Hicksian welfare index)
45
46 $COMMODITIES:
47 PX ! Price index for commodity X
48 PY ! Price index for commodity Y
49 PL ! Price index for primary factor L
50 PK ! Price index for primary factor K
51 PW ! Price index for welfare (expenditure function)
52
53 $CONSUMERS:
54 CONS ! Income level for consumer CONS
55
56 $PROD:X s:1
57 O:PX Q:100
58 I:PL Q: 40
59 I:PK Q: 60
60
61 $PROD:Y s:1
62 O:PY Q:100
63 I:PL Q: 60
64 I:PK Q: 40
65
66 $PROD:W s:1
67 O:PW Q:160
68 I:PX Q: 60
69 I:PY Q:100
70
71 $DEMAND:CONS
72 D:PW Q:160
73 E:PL Q:(100*ENDOW)
74 E:PK Q:(100*ENDOW)
75 E:PX Q:-40
76
77 $OFFTEXT
54
78 $SYSINCLUDE mpsgeset M29
79
80 PW.FX = 1;
81
82 $INCLUDE M29.GEN
83 SOLVE M29 USING MCP;
84
85 * Counterfactual: double the factor endowment.
86
87 ENDOW = 2;
88
89 $INCLUDE M29.GEN
90 SOLVE M29 USING MCP;
3.3.9 Open Economy models
Naturally, a very important task for the modeler is building open economy models, since trade
and international investment policies are among the important policy problems facing governments.
This chapter continues in the spirit of the previous chapters, presenting a series of simple models
which incorporate features of open economy issues one by one. Here are the model names with brief
descriptions of their features.
3.3.10 Small open economy 2x2 (M41)
This is a very simple 2-good, 2-factor model in which the rest of the world is not explicitly modeled.
Trading opportunities are summarized by simple functions which allow the economy to transform
one good (an export) into another (an import). The technology of these functions represents world
prices. If good X1 exchanges for two units of X2, then the world price ratio is implicitly given by
p1/p2 = 2. We will assume that these technologies or price ratios are xed in this model and the
rst few models to follow. This is commonly know as the small- country assumption: the country
can trade as much or as little as it wants at xed prices.
We assume in the benchmark data that the country exports X1 in exchange for X2, but we will allow
for the fact that some policy or endowment change could actually reverse the direction of trade by
specifying (initially inactive) functions that transform goods in the opposite direction. Here is the
initial data, in which 50 units of good X1 are exchanged for 50 units of good X2 at an implicit price
ratio of p1/p2 = 1.
Production Sectors Consumer
Markets | X1 X2 E1 M2 W CONS
----------------------------------------------------------------
P1 | 150 -50 -100
P2 | 50 50 -100
PL | -100 -20 120
PK | -50 -30 80
PW | 200 -200
PFX | 50 -50
----------------------------------------------------------------
Technology parameters are specied in these functions that allow the modeler to change the terms
of trade. These are given by:
PARAMETERS
PE2 Export price of good 2 /0.99/,
55
PM1 Import price of good 1 /1.01/,
PE1 Export price of good 1 /1/,
PM2 Import price of good 2 /1/,
TM2 Import tariff for god 2;
E1 and M2 production activities that are the initially active trade links. E1 stands for exports
of good X1 . While we could specify this activity as directly transforming X1 into X2 , in more
complicated models with many goods it proves useful to dene another good which we will call
foreign exchange and whose price is denoted PFX. All trade is mediated through the foreign
exchange market.
Thus activity E1 transforms X1 into foreign exchange and M2, the import activity for good 2,
transforms foreign exchange into imports of good 2. These activities are given as follows:
$PROD:E1
O:PFX Q:(50*PE1)
I:P1 Q:50
$PROD:M2
O:P2 Q:50
I:PFX Q:(50*PM2) A:CONS T:TM2
TM2 is an import tari on good 2, which is initially set to zero. We also specify trade links in the
opposite direction, which are initially inactive as noted above. At this point, we have an opportunity
to make an important technical remark which may save the modeler some misery later on. Suppose
that good 1 can be transformed into good 2 at a price of one, and good 2 can be transformed into
good 1 at a price of 1. Then if the export of 50 units of good 1 and imports of 50 units of good 2
is an equilibrium, then so is the export of 100 units of good 1 followed by the imports of 50 units of
good 2 plus 50 units of good 1.
In technical terms the model is degenerate, it has innitely many solutions. In such a situation,
the solver will either fail to converge, or converge to an arbitrary solution. The latter will have net
exports (exports minus imports) of X1 equal to 50 and net imports of X2 equal to 50, but may
involve any amount of gross trade.
This is why we specify the prices or terms of trade dierently for the activities M1 and E2, so
that it is never protable to export and import the same good.
Here is the model. In the rst counterfacual we impose a tari and 5% and then a tari of 10%.
When you look at the listing les, you will see that the tari of 10% is prohibitive, all trade ceases.
The last experiment returns the tari to zero, and improves the terms of trade (relative prices of
the export good) to 1.2.
1 $TITLE Model M41: Small open economy model. Two goods, two factors.
2
3 $ONTEXT
4 Production Sectors Consumer
5
6 Markets | X1 X2 E1 M2 W CONS
7 -----------------------------------------------------------------
8 P1 | 150 -50 -100
9 P2 | 50 50 -100
10 PL | -100 -20 120
11 PK | -50 -30 80
12 PW | 200 -200
56
13 PFX | 50 -50
14 ------------------------------------------------------------------
15
16 $OFFTEXT
17
18 PARAMETERS
19 PE2 Export price of good 2,
20 PM1 Import price of good 1,
21 PE1 Export price of good 1,
22 PM2 Import price of good 2,
23 TM2 Import tariff for god 2;
24
25 PE1 = 1;
26 PM2 = 1;
27 PE2 = 0.99;
28 PM1 = 1.01;
29 TM2 = 0;
30
31 $ONTEXT
32
33 $MODEL:M41
34
35 $SECTORS:
36 X1 ! Production index for good 1
37 X2 ! Production index good 2
38 E1 ! Export level of good 1
39 E2 ! Export level of good 2
40 M1 ! Import level of good 1
41 M2 ! Import level of good 2
42 W ! Welfare index
43
44 $COMMODITIES:
45 P1 ! Price index for good 1
46 P2 ! Price index for good 1
47 PFX ! Read exchange rate index
48 PW ! Welfare price index
49 PL ! Wage index
50 PK ! Capital rental index
51
52 $CONSUMERS:
53 CONS ! Income level for representative agent
54
55 $PROD:X1 s:1
56 O:P1 Q:150
57 I:PL Q:100
58 I:PK Q: 50
59
60 $PROD:X2 s:1
61 O:P2 Q:50
62 I:PL Q:20
63 I:PK Q:30
64
65 $PROD:E1
66 O:PFX Q:(50*PE1)
67 I:P1 Q:50
68
69 $PROD:M2
70 O:P2 Q:50
71 I:PFX Q:(50*PM2) A:CONS T:TM2
72
73 $PROD:E2
74 O:PFX Q:(50*PE2)
75 I:P2 Q:50
76
57
77 $PROD:M1
78 O:P1 Q:50
79 I:PFX Q:(50*PM1)
80
81 $PROD:W s:1
82 O:PW Q:200
83 I:P1 Q:100
84 I:P2 Q:100
85
86 $DEMAND:CONS
87 D:PW Q:200
88 E:PL Q:120
89 E:PK Q: 80
90
91 $OFFTEXT
92 $SYSINCLUDE mpsgeset M41
93
94 PW.FX = 1;
95
96 E2.L = 0;
97 M1.L = 0;
98 E1.L = 1;
99 M2.L = 1;
100
101 M41.ITERLIM = 0;
102 $INCLUDE M41.GEN
103 SOLVE M41 USING MCP;
104 M41.ITERLIM = 2000;
105
106
107 TM2 = 0.05;
108
109 $INCLUDE M41.GEN
110 SOLVE M41 USING MCP;
111
112 TM2 = 0.10;
113
114 $INCLUDE M41.GEN
115 SOLVE M41 USING MCP;
116
117 TM2 = 0.;
118 PE1 = 1.2;
119 PM1 = 1.21;
120
121 $INCLUDE M41.GEN
122 SOLVE M41 USING MCP;
Exercises:
(1) If you have an international trade textbook, review the Stopler-Samuelson theorem. Examine
the eects of the tari and the terms-of-trade improvement and see that the results validate the
theorem. From a policy point of view, the redistribution eects of taris are very important and
help explain their existence.
(2) Set the tari to zero and specify an export subsidy on the initially inactive link E2, exports of
good 2. How high does this subsidy have to be in order to reverse the direction of trade?
(3) Work out the export tax on X1 that should be equivalent to the import tari on X2 and verify
this numerically (hint: the two tax rates are not same, since the base is dierent, an issue discussed
in the previous chapter).
58
3.3.11 Small open economy with a benchmark tari (M42)
This model has a 20% tari in the benchmark data. It is important to keep track of prices and trade
balance in this situation. Here is the data matrix.
Production Sectors Consumer
Markets | X1 X2 E1 M2 W CONS
----------------------------------------------------------------
P1 | 150 -50 -100
P2 | 40 60 -100
PL | -100 -20 120
PK | -50 -20 70
PW | 200 -200
PFX | 50 -50
T (tar rev)| -10 10
----------------------------------------------------------------
Trade balance holds, since exports of good 1 generate 50 units of foreign exchange and those 50
units are spent on imports. Consumers spend 60 on imports of which 10 is the tari, or 20% of the
value of imports (10/50). This tari revenue is returned to consumers. All row and column sums
equal zero in this matrix.
In open economy models, the modeler must chose units or prices. The convention we adopt here is
that all domestic prices are equal to 1 initially. Since the export good X1 is freely traded, then the
international price of X1 is also equal to 1. However, the import good has a domestic price equal to
(1 + TM2) times the world price, so if the domestic price is equal to 1 then the world price must
equal 1/ (1 + TM2) = 1/1.2.
Thus the -50 in the column M2 of the matrix is interpreted as 60 units at a price of 1/1.2. This is
the way the program is formulated below.
The rest of the model should be straight forward at this point. The counterfactual experiment is
free trade.
1 $TITLE Model M42: Small open economy model with a benchmark tariff.
2
3 $ONTEXT
4
5 In this example, units are chosen such that all DOMESTIC prices equal
6 one initially. Implied world prices are then P1/P2 = 1.2
7
8 Production Sectors Consumer
9 Markets | X1 X2 E1 M2 W CONS
10 ------------------------------------------------------------------
11 P1 | 150 -50 -100
12 P2 | 40 60 -100
13 PL | -100 -20 120
14 PK | -50 -20 70
15 PW | 200 -200
16 PFX | 50 -50
17 T (tar rev)| -10 10
18 ------------------------------------------------------------------
19
20 $OFFTEXT
21
22 PARAMETERS
23
24 PE2 Export price of good 2,
59
25 PM1 Import price of good 1,
26 PE1 Export price of good 1,
27 PM2 Import price of good 2,
28 TM2 Import tariff for good 2;
29
30 PE1 = 1;
31 PM2 = 1/(1.2);
32 PE2 = PM2*0.99;
33 PM1 = 1.01;
34 TM2 = 0.20;
35
36
37 $ONTEXT
38
39 $MODEL:M42
40
41 $SECTORS:
42 X1 ! Production index for good 1
43 X2 ! Production index good 2
44 E1 ! Export level of good 1
45 E2 ! Export level of good 2
46 M1 ! Import level of good 1
47 M2 ! Import level of good 2
48 W ! Welfare index
49
50 $COMMODITIES:
51 P1 ! Price index for good 1
52 P2 ! Price index for good 1
53 PFX ! Read exchange rate index
54 PW ! Welfare price index
55 PL ! Wage index
56 PK ! Capital rental index
57
58 $CONSUMERS:
59 CONS ! Income level for representative agent
60
61 $PROD:X1 s:1
62 O:P1 Q:150
63 I:PL Q:100
64 I:PK Q: 50
65
66 $PROD:X2 s:1
67 O:P2 Q:40
68 I:PL Q:20
69 I:PK Q:20
70
71 $PROD:E1
72 O:PFX Q:(50*PE1)
73 I:P1 Q:50
74
75 $PROD:M2
76 O:P2 Q:60
77 I:PFX Q:(60*PM2) A:CONS T:TM2
78
79 $PROD:E2
80 O:PFX Q:(60*PE2)
81 I:P2 Q:60
82
83 $PROD:M1
84 O:P1 Q:50
85 I:PFX Q:(50*PM1)
86
87 $PROD:W s:1
88 O:PW Q:200
60
89 I:P1 Q:100
90 I:P2 Q:100
91
92 $DEMAND:CONS
93 D:PW Q:200
94 E:PL Q:120
95 E:PK Q: 70
96
97 $OFFTEXT
98 $SYSINCLUDE mpsgeset M42
99
100 PW.FX = 1;
101
102 E1.L = 1;
103 M2.L = 1;
104 E2.L = 0;
105 M1.L = 0;
106
107 M42.ITERLIM = 0;
108 $INCLUDE M42.GEN
109 SOLVE M42 USING MCP;
110 M42.ITERLIM = 2000;
111
112 * Counterfactual experiment is free trade
113
114 TM2 = 0;
115
116 $INCLUDE M42.GEN
117 SOLVE M42 USING MCP;
3.3.12 An alternative price normalization (M43)
In models with many countries, the modeler may wish to choose world prices as all equaling 1.
Model M43 is exactly the same as model M42 except that we choose world prices as 1. This only
aects the calibration via the choice of units for X2 . Since the world price of good 2 is equal to 1,
then the domestic price is P2 = 1.2. But if this is the case, then the value of X2 production (40)
and consumption (100) must imply benchmark quantities of
40 = 1.2*(quantity) quantity = 33.3333 100 = 1.2*(quantity)
quantity = 83.3333
You will see these numbers in the quantity elds of the program. W for example, is calibrated as:
$PROD:W s:1
O:PW Q:200
I:P1 Q:100
I:P2 Q:83.33333 P:1.2
Other features of the model are identical to M42 as noted, so here is the program.
1 $TITLE Model M43: Small open economy model with a benchmark tariff.
2
3 * alternaive price normalization from M42
4
5 $ONTEXT
6
7 This model is equivalent to M42 except that units are chosen such that
61
8 all WORLD prices equal one initially. The benchmark domestic price
9 ratio is then P2 = 1.2.
10
11 Note that this changes the units of measurement in good 2. There are
12 now 83.3333 units of good 2 consumed instead of 100, but this is
13 simply a change in units of measure and has no welfare consequences.
14
15 Production Sectors Consumer
16
17 Markets | X1 X2 E1 M2 W CONS
18 ------------------------------------------------------------------
19 P1 | 150 -50 -100
20 P2 | 40 60 -100
21 PL | -100 -20 120
22 PK | -50 -20 70
23 PW | 200 -200
24 PFX | 50 -50
25 T | -10 10
26 ------------------------------------------------------------------
27
28 $OFFTEXT
29
30 PARAMETERS
31
32 PE2 Export price of good 2,
33 PM1 Import price of good 1,
34 PE1 Export price of good 1,
35 PM2 Import price of good 2,
36 TM2 Import tariff for good 2;
37
38 PE1 = 1;
39 PM2 = 1;
40 PE2 = 0.99;
41 PM1 = 1.01;
42 TM2 = 0.20;
43
44
45 $ONTEXT
46
47 $MODEL:M43
48
49
50 $SECTORS:
51 X1 ! Production index for good 1
52 X2 ! Production index good 2
53 E1 ! Export level of good 1
54 E2 ! Export level of good 2
55 M1 ! Import level of good 1
56 M2 ! Import level of good 2
57 W ! Welfare index
58
59 $COMMODITIES:
60 P1 ! Price index for good 1
61 P2 ! Price index for good 1
62 PFX ! Read exchange rate index
63 PW ! Welfare price index
64 PL ! Wage index
65 PK ! Capital rental index
66
67 $CONSUMERS:
68 CONS ! Income level for representative agent
69
70 * Cobb-Douglas production in both sectors:
71
62
72 $PROD:X1 s:1
73 O:P1 Q:150
74 I:PL Q:100
75 I:PK Q: 50
76
77 $PROD:X2 s:1
78 O:P2 Q:33.33333 P:1.2
79 I:PL Q:20
80 I:PK Q:20
81
82 $PROD:E1
83 O:PFX Q:(50*PE1)
84 I:P1 Q:50
85
86 $PROD:M2
87 O:P2 Q:50
88 I:PFX Q:(50*PM2) A:CONS T:TM2
89
90 $PROD:E2
91 O:PFX Q:(50*PE2)
92 I:P2 Q:(50)
93
94 $PROD:M1
95 O:P1 Q:50
96 I:PFX Q:(50*PM1)
97
98 $PROD:W s:1
99 O:PW Q:200
100 I:P1 Q:100
101 I:P2 Q:83.33333 P:1.2
102
103 $DEMAND:CONS
104 D:PW Q:200
105 E:PL Q:120
106 E:PK Q: 70
107
108 $OFFTEXT
109 $SYSINCLUDE mpsgeset M43
110
111 PW.FX = 1;
112
113 * Benchmark replication
114
115 E1.L = 1;
116 M2.L = 1;
117 E2.L = 0;
118 M1.L = 0;
119 P2.L = 1.2;
120
121 M43.ITERLIM = 0; $INCLUDE M43.GEN SOLVE M43 USING MCP; M43.ITERLIM =
122 2000;
123
124 * Counterfactual experiment is free trade
125
126 TM2 = 0;
127
128 $INCLUDE M43.GEN
129 SOLVE M43 USING MCP;
63
Exercise:
Choices of units with which to interpret the data is a dull, but important step. Many calibration
problems (failure to replicate the data as an initial equilibrium) can be traced to mistakes over price
and quantity units when there are taxes or quotas in the initial data. So spend some time comparing
this le to M42. Run the models and verify that all results on activity levels and welfare are the
same.
This model assumes the same benchmark data as the previous two models, but it assumes that
there is a quota limiting imports. A quota is a quantitative restriction on imports, generally a
maximum restriction although there could conceivably be a minimum quota. The former generates
a gap between the foreign or world supply price and the domestic demand price for the rationed
good. This dierence, often referred to as a quota rent (it is a form of Ricardian rent), must go to
some agent.
In this model, we assume that the government implements the quota via the creation of licenses.
These licenses may be auctioned o, sometimes referred to as an auction quota. Or they may simply
be given out to some agents inside the economy. Since we have only a single representative household
in this model, the model cannot really distinguish between these two. But in a model with several
households it can produce an important dierence. Indeed, quota licenses are sometimes a source of
corruption in real economies, generating rents for favored individuals (the license owners) without
them having to produce anything at all.
Using a trick that may now seem familiar from earlier models, we use an auxiliary variable, Q, for
an endogenous tax rate and a constraint equation to set the value of this tax. The revenue from
this tax is assigned to the representative consumer in the block for the import demand for M2.
$PROD:M2
O:P2 Q:60
I:PFX Q:(60*PM2) A:CONS N:Q
The constraint equation says to set the value of the tax Q such that the activity level for imports
(calibrated to be 1 initially) remains equal to 1 in the new equilibrium.
$CONSTRAINT:Q
1 =G= M2;
Other aspects of the model should be familiar. We return here to the convention of model 42 that
units are chosen such that all domestic prices equal 1. The counterfactual experiment is to set
the quota equal to zero. This is done with the statement Q.FX = 0; since Q is a variable, not a
parameter. An alternative way to do this is to declare a parameter and use it in place of the 1 on
the left-hand side of the constraint equation. Then the quota can be set at any level.
The value of Q can be thought of as the tari equivalent of the quota or the shadow tari. In
one exercise following the model, you are asked to increase the size of the economy and see what
happens to this shadow tari. To free up a variable when it has been xed, use:
Q.L = 0;
Q.UP = +INF.
64
1 $TITLE Model M44: Small open economy model with a (auction) quota
2
3 $ONTEXT
4
5 In this example, units are chosen such that all DOMESTIC prices equal
6 one initially. Implied world prices are then P1/P2 = 1.2
7
8 Production Sectors Consumer
9
10 Markets | X1 X2 E1 M2 W CONS
11 ------------------------------------------------------------------
12 P1 | 150 -50 -100
13 P2 | 40 60 -100
14 PL | -100 -20 120
15 PK | -50 -20 70
16 PW | 200 -200
17 PFX | 50 -50
18 Q (quota rent)| -10 10
19 ------------------------------------------------------------------
20
21 $OFFTEXT
22
23 PARAMETERS
24
25 PE2 Export price of good 2,
26 PM1 Import price of good 1,
27 PE1 Export price of good 1,
28 PM2 Import price of good 2,
29 TM2 Import tariff for good 2;
30
31 PE1 = 1;
32 PM2 = 1/(1.2);
33 PE2 = PM2*0.99;
34 PM1 = 1.01;
35 TM2 = 0.20;
36
37 $ONTEXT
38
39 $MODEL:M42
40
41 $SECTORS:
42 X1 ! Production index for good 1
43 X2 ! Production index good 2
44 E1 ! Export level of good 1
45 E2 ! Export level of good 2
46 M1 ! Import level of good 1
47 M2 ! Import level of good 2
48 W ! Welfare index
49
50 $COMMODITIES:
51 P1 ! Price index for good 1
52 P2 ! Price index for good 1
53 PFX ! Read exchange rate index
54 PW ! Welfare price index
55 PL ! Wage index
56 PK ! Capital rental index
57
58 $CONSUMERS:
59 CONS ! Income level for representative agent
60
61 $AUXILIARY:
62 Q
63
64 $PROD:X1 s:1
65
65 O:P1 Q:150
66 I:PL Q:100
67 I:PK Q: 50
68
69 $PROD:X2 s:1
70 O:P2 Q:40
71 I:PL Q:20
72 I:PK Q:20
73
74 $PROD:E1
75 O:PFX Q:(50*PE1)
76 I:P1 Q:50
77
78 $PROD:M2
79 O:P2 Q:60
80 I:PFX Q:(60*PM2) A:CONS N:Q
81
82 $PROD:E2
83 O:PFX Q:(60*PE2)
84 I:P2 Q:60
85
86 $PROD:M1
87 O:P1 Q:50
88 I:PFX Q:(50*PM1)
89
90 $PROD:W s:1
91 O:PW Q:200
92 I:P1 Q:100
93 I:P2 Q:100
94
95
96 $DEMAND:CONS
97 D:PW Q:200
98 E:PL Q:120
99 E:PK Q: 70
100
101 $CONSTRAINT:Q
102 1 =G= M2;
103
104 $OFFTEXT
105 $SYSINCLUDE mpsgeset M42
106
107 PW.FX = 1;
108
109 E1.L = 1;
110 M2.L = 1;
111 E2.L = 0;
112 M1.L = 0;
113 Q.L = 0.20;
114
115 M42.ITERLIM = 0;
116 $INCLUDE M42.GEN
117 SOLVE M42 USING MCP;
118 M42.ITERLIM = 2000;
119
120 * Counterfactual experiment is free trade
121
122 Q.FX = 0;
123
124 $INCLUDE M42.GEN
125 SOLVE M42 USING MCP;
66
Exercises:
(1) Free up the quota again (begin with the statements Q.L0 = 0; Q.UP = +INF; where LO stands
for lower bound and UP stands for upper bound). Double factor endowments. (You can declare a
parameter that is multiplied by the factor endowments as in model M1 MPS.) See what happens to
the shadow tari, the value of Q. Can you explain why?
(2) Following this experiment, x Q at Q = 0.20, its initial value so that it is in fact a tari.
Again double the size of the economy and compare the results of this tari experiment to the quota
experiment.
3.3.13 A voluntary export restraint (M45)
In some cases, countries impose a so-called voluntary export restraint (VER), which asks a foreign
country or foreign rms to limit their exports to a certain quota level. The eect of this is to transfer
the quota rents to the foreign country. It is like having a tari and giving the tari revenue to the
foreign government. In order to model this, we introduce a second consumer, denoted CONSF where
F is for foreign and label the domestic consumer as CONSH. CONSF receives the quota rent (shadow
tari revenue) and demands some of the countrys export good, X1. Here the numbers we use:
Production Sectors Consumer
Markets | X1 X2 E1 M2 W CONSH CONSF
----------------------------------------------------------------
P1 | 150 -50 -90 -10
P2 | 40 60 -100
PL | -100 -20 120
PK | -50 -20 70
PW | 190 -190
PFX | 50 -50
Q (ver) | -10 10
----------------------------------------------------------------
This data is implemented in exactly the manner used in the previous example. We declare an
auxiliary variable V, which appears in an N: (endogenous tax) eld on the import activity, and a
constraint equation setting the value of V.
In order to compare this to the auction quota of the previous example, we also declare an auxiliary
quota variable Q which is an endogenous tax paid to the domestic consumer, and set by a second
constraint equation. In the initial benchmark run of the model, we set Q to zero, Q.FX = 0; and
replicate the bechmark. For our rst counterfactual, we replace the VER with the quota using the
syntax noted in the previous model:
Q.LO = 0;
Q.UP = +INF;
V.FX = 0;
Run the model and examine the results. The equilibria are quite dierent and the shadow values (Q
and V) are not the same. The switch to the auction quota creates an income eect which leads the
domestic consumer to demand more goods and more imports at initial prices. But more imports
cannot occur under the quota, so in eect the quota becomes more restrictive and the shadow tari
increases (Q is larger than V). Note that the welfare eect of switching from the VER to the quota
is quite large.
67
1 $TITLE Model M44: Small open economy model with a VER quota
2
3 $ONTEXT
4
5 In this example, units are chosen such that all DOMESTIC prices equal
6 one initially.
7
8 Production Sectors Consumer
9
10 Markets | X1 X2 E1 M2 W CONSH CONSF
11 ------------------------------------------------------------------
12 P1 | 150 -50 -90 -10
13 P2 | 40 60 -100
14 PL | -100 -20 120
15 PK | -50 -20 70
16 PW | 190 -190
17 PFX | 50 -50
18 Q (ver rent)| -10 10
19 ------------------------------------------------------------------
20
21 $OFFTEXT
22
23 PARAMETERS
24
25 PE2 Export price of good 2,
26 PM1 Import price of good 1,
27 PE1 Export price of good 1,
28 PM2 Import price of good 2,
29 TM2 Import tariff for good 2;
30
31 PE1 = 1;
32 PM2 = 1/(1.2);
33 PE2 = PM2*0.99;
34 PM1 = 1.01;
35 TM2 = 0.20;
36
37
38 $ONTEXT
39
40 $MODEL:M42
41
42 $SECTORS:
43 X1 ! Production index for good 1
44 X2 ! Production index good 2
45 E1 ! Export level of good 1
46 E2 ! Export level of good 2
47 M1 ! Import level of good 1
48 M2 ! Import level of good 2
49 W ! Welfare index
50
51 $COMMODITIES:
52 P1 ! Price index for good 1
53 P2 ! Price index for good 1
54 PFX ! Read exchange rate index
55 PW ! Welfare price index
56 PL ! Wage index
57 PK ! Capital rental index
58
59 $CONSUMERS:
60 CONSH ! Income level for domestic consumer
61 CONSF ! Income level for foreign consumer (quota holder)
62
63 $AUXILIARY:
64 V ! Endogenous tax, shadow tax for VER
68
65 Q ! Endogenous tax, shadow tax for quota
66
67 $PROD:X1 s:1
68 O:P1 Q:150
69 I:PL Q:100
70 I:PK Q: 50
71
72 $PROD:X2 s:1
73 O:P2 Q:40
74 I:PL Q:20
75 I:PK Q:20
76
77 $PROD:E1
78 O:PFX Q:(50*PE1)
79 I:P1 Q:50
80
81 $PROD:M2
82 O:P2 Q:60
83 I:PFX Q:(60*PM2) A:CONSF N:V A:CONSH N:Q
84
85 $PROD:E2
86 O:PFX Q:(60*PE2)
87 I:P2 Q:60
88
89 $PROD:M1
90 O:P1 Q:50
91 I:PFX Q:(50*PM1)
92
93 $PROD:W s:1
94 O:PW Q:190
95 I:P1 Q: 90
96 I:P2 Q:100
97
98 $DEMAND:CONSH
99 D:PW Q:190
100 E:PL Q:120
101 E:PK Q: 70
102
103 $DEMAND:CONSF
104 D:P1 Q:10
105
106 $CONSTRAINT:V
107 1 =G= M2;
108
109 $CONSTRAINT:Q
110 1 =G= M2;
111
112 $OFFTEXT
113 $SYSINCLUDE mpsgeset M42
114
115 PW.FX = 1;
116
117 E1.L = 1;
118 M2.L = 1;
119 E2.L = 0;
120 M1.L = 0;
121 V.L = 0.20;
122 Q.FX = 0;
123
124 M42.ITERLIM = 0;
125 $INCLUDE M42.GEN
126 SOLVE M42 USING MCP;
127 M42.ITERLIM = 2000;
128
69
129 * Counterfactual: replace the VER with an auction quota
130
131 Q.LO = 0;
132 Q.UP = +INF;
133 V.FX = 0;
134
135 $INCLUDE M42.GEN
136 SOLVE M42 USING MCP;
Exercise:
Replace the initial VER with a tari of 0.20 on the import good. Assign the tari revenue to
agent CONSF. Show that this replicates the benchmark data. Show that a tari of 0.20 assigned to
CONSH does not replicated the auction quota calculated in the counterfactual. Why not?
3.3.14 Benchmark trade imbalance (M46)
Real economies are dynamic and therefore real economies can run trade imbalances in any period
by buying or selling assets. Any real data that a modeler is likely to encounter will almost surely
have a current account surplus or decit in any one period. Yet static models are useful for policy
analysis and dynamic models are costly to construct in terms of time and data.
When a modeler wants to construct a static model starting with data characterized by a trade
imbalance, the model has several choices. These are sometime referred to as closure rules. Some
closure rules allow the trade balance to vary when doing counterfactuals. The problem with this
practice is that it makes welfare eects dicult to interpret. If a policy experiment leads to an
increase in the decit, welfare will increase due, in fact, to foreign borrowing. This is misleading,
since at some point that borrowing will have to be paid back.
In general, we prefer to hold the decit xed when doing counterfactuals in static models, so as to
produce more easily interpreted welfare results. Model M46 shows how to do this.
The simplest trick is to just assume that the representative consumer has an initial endowment of
foreign exchange equal to the decit. We can think of this as the amount of foreign borrowing in
the initial benchmark equilibrium. This is then held constant in any counterfactual experiments.
An initial surplus can be represented by a negative endowment of PFX in the benchmark, denoting
foreign lending.
This is what we do below. Benchmark exports are 40, imports are 60, and the decit is nanced by
selling the initial benchmark endowment of 20 units of PFX. The latter is specied by the parameter
BOPDEF which we can change in counterfactual experiments.
$DEMAND:CONS
D:PW Q:220
E:PL Q:120
E:PK Q: 80
E:PFX Q:BOPDEF
For a counterfactual, we eliminate the decit, setting BOPDEF = 0. Obviously, welfare is going to
fall.
This leads us to a short discussion about another modeling technique. Sometimes, modelers have
good reason to believe that the benchmark data is not an equilibrium, or wish to conduct experiments
70
starting from some other benchmark situation. In such situations, the modeler can compute a
revised benchmark by eliminating the source of disequilibrium to generate a new benchmark data
set. In the present case, if the modeler wanted to start with a situation of a zero balance of trade,
the model can then benchmark the model as we have done, and then run the model with BOPDEF
= 0. The new equilibrium values of activities, prices, and income then become the new data set or
revised benchmark for policy analysis.
1 $TITLE Model M46: SOE model with a benchmark trade * imbalance.
2
3 $ONTEXT
4
5 Production Sectors Consumer
6
7 Markets | X1 X2 E1 M2 W CONS
8 ------------------------------------------------------------------
9 P1 | 150 -40 -110
10 P2 | 50 60 -110
11 PL | -100 -20 120
12 PK | -50 -30 80
13 PW | 220 -220
14 PFX | 40 -60 20
15 ------------------------------------------------------------------
16
17 $OFFTEXT
18
19 PARAMETERS
20 PE2 Export price of good 2,
21 PM1 Import price of good 1,
22 PE1 Export price of good 1,
23 PM2 Import price of good 2,
24 TM2 Import tariff for good 2,
25 BOPDEF Balance of payments net deficit;
26
27 PE1 = 1;
28 PM2 = 1;
29 PE2 = 0.99;
30 PM1 = 1.01;
31 TM2 = 0;
32
33 $ONTEXT
34
35 $MODEL:M46
36
37 $SECTORS:
38 X1 ! Production index for good 1
39 X2 ! Production index good 2
40 E1 ! Export level of good 1
41 E2 ! Export level of good 2
42 M1 ! Import level of good 1
43 M2 ! Import level of good 2
44 W ! Welfare index
45
46 $COMMODITIES:
47 P1 ! Price index for good 1
48 P2 ! Price index for good 1
49 PFX ! Read exchange rate index
50 PW ! Welfare price index
51 PL ! Wage index
52 PK ! Capital rental index
53
54 $CONSUMERS:
55 CONS ! Income level for representative agent
71
56
57 $PROD:X1 s:1
58 O:P1 Q:150
59 I:PL Q:100
60 I:PK Q: 50
61
62 $PROD:X2 s:1
63 O:P2 Q:50
64 I:PL Q:20
65 I:PK Q:30
66
67 $PROD:E1
68 O:PFX Q:(40*PE1)
69 I:P1 Q:40
70
71 $PROD:M2
72 O:P2 Q:60
73 I:PFX Q:(60*PM2) A:CONS T:TM2
74
75 $PROD:E2
76 O:PFX Q:(60*PE2)
77 I:P2 Q:60
78
79 $PROD:M1
80 O:P1 Q:40
81 I:PFX Q:(40*PM1)
82
83 $PROD:W s:1
84 O:PW Q:220
85 I:P1 Q:110
86 I:P2 Q:110
87
88 $DEMAND:CONS
89 D:PW Q:220
90 E:PL Q:120
91 E:PK Q: 80
92 E:PFX Q:BOPDEF
93
94 $OFFTEXT
95 $SYSINCLUDE mpsgeset M46
96
97
98 E2.L = 0;
99 M1.L = 0;
100 E1.L = 1;
101 M2.L = 1;
102 BOPDEF = 20;
103
104 M46.ITERLIM = 0;
105 $INCLUDE M46.GEN
106 SOLVE M46 USING MCP;
107 M46.ITERLIM = 2000;
108
109 * Compute a counterfactual experiment setting the deficit to zero.
110
111 BOPDEF = 0;
112
113 $INCLUDE M46.GEN
114 SOLVE M46 USING MCP;
115
72
Exercise:
Set BOPDEF to a negative value (a surplus) and see what happens. Interpret the results.
3.3.15 An Armington formulation (M47)
Another feature of real data that confronts modelers is that there is generally two-way trade in any
good in the data; that is, each good is both imported and exported. This is often attributed to
the fact that data is actually classied by industries and any industry is actually an aggregation of
many goods. Yet two-way trade or cross hauling will persist in the data even at an extremely ne
level of disaggregation. No research will ever get data that is free of cross hauling so the question is
what to do about it.
Model 47 is calibrated to the following data:
Production Sectors Consumer
Markets | X1 X2 E M W CONS
---------------------------------------------------------------
P1 | 150 -100 50 -100
P2 | 50 -25 75 -100
PL | -100 -20 120
PK | -50 -30 80
PW | 200 -200
PFX | 125 -125
---------------------------------------------------------------
Each good (industry) is both imported and exported. One way to handle this is to simply net out
the two way trade from the gross ows and replace the data with net trade only. If we do this in
the present model, we arrive exactly at model M41. We can then proceed as before.
The other alternative in competitive models is to assume that the domestic and foreign goods are
not really identical. This is the so-called Armington assumption: domestic and foreign goods in the
same industrial classication are imperfect substitutes. This is really quite simple for us in MPS/GE.
We do not have to do anything on the production side or in the demand blocks. Indeed, all that we
have to do is to change the preferences to dene four distinct goods and a nesting structure for the
utility function. In our case we write this as:
$PROD:W s:1 G1:ESUB G2:ESUB
O:PW Q:200
I:P1 Q: 50 G1:
I:PF1 Q: 50 G1:
I:P2 Q: 25 G2:
I:PF2 Q: 75 G2:
The modeler is completely free to choose any nesting structure of course, but this is a common thing
to do. The domestic (P1) and foreign good (PF1) in industry 1 are in a nest as are the domestic
and foreign goods in industry 2 and these nest have the same elasticity of substitution: a domestic
and foreign good in the same industry have the same substitution elasticity regardless of industry.
The composite industry 1 good and the composite industry 2 good are then combined in an upper
level nest. This is generally assumed to have a lower elasticity of substitution: two industries are
poor substitutes than a domestic and foreign good in the same industry. Here we specify the upper
73
nest with an elasticity of substitution of 1, while the domestic-foreign goods have an elasticity of
substitution of ESUB = 4.
Other assumptions are possible, such as grouping all foreign goods together in a nest and all domestic
goods in another. But the procedure just outlined seems reasonable to many modelers.
The rest of the program is rather familiar, except that the four trade activities are now dened for
four distinct goods. There is no need now to worry about a domestic good being both imported and
exported. It cannot, by denition, be imported.
After the replication check, we run the same counterfactuals that we did for model M41, a tari of
5% and then 10% on (foreign) good 2.
1 $TITLE Model M47: SOE model with an Armington formulation.
2
3 $ONTEXT
4
5 Production Sectors Consumer
6
7 Markets | X1 X2 E M W CONS
8 ---------------------------------------------------------------
9 P1 | 150 -100 50 -100
10 P2 | 50 -25 75 -100
11 PL | -100 -20 120
12 PK | -50 -30 80
13 PW | 200 -200
14 PFX | 125 -125
15 ---------------------------------------------------------------
16
17 $OFFTEXT
18
19 PARAMETERS
20 PE2 Export price of good 2,
21 PM1 Import price of good 1,
22 PE1 Export price of good 1,
23 PM2 Import price of good 2,
24 TM2 Import tariff for good 2,
25 ESUB Armington elasticity of substitution;
26
27 PE1 = 1;
28 PM2 = 1;
29 PE2 = 1;
30 PM1 = 1;
31 TM2 = 0;
32 ESUB = 4;
33
34
35 $ONTEXT
36
37 $MODEL:M47
38
39 $SECTORS:
40 X1 ! Production index for good 1
41 X2 ! Production index good 2
42 E1 ! Export index for good 1
43 E2 ! Export index for good 2
44 M1 ! Import index for good 1
45 M2 ! Import index for good 2
46 W ! Welfare index
47
48 $COMMODITIES:
74
49 P1 ! Price index for good 1
50 P2 ! Price index for good 1
51 PF1 ! Price index for imported good 1
52 PF2 ! Price index for imported good 2
53 PFX ! Read exchange rate index
54 PW ! Welfare price index
55 PL ! Wage index
56 PK ! Capital rental index
57
58 $CONSUMERS:
59 CONS ! Income level for representative agent
60
61 * Cobb-Douglas production in both sectors:
62
63 $PROD:X1 s:1
64 O:P1 Q:150
65 I:PL Q:100
66 I:PK Q: 50
67
68 $PROD:X2 s:1
69 O:P2 Q:50
70 I:PL Q:20
71 I:PK Q:30
72
73 * We scale the export price for good 1 and the import price
74 * for good 2 to both be unity:
75
76 $PROD:E1
77 O:PFX Q:(PE1*100)
78 I:P1 Q:100
79
80 $PROD:E2
81 O:PFX Q:(PE2*25)
82 I:P2 Q:25
83
84 $PROD:M1
85 O:PF1 Q:50
86 I:PFX Q:(PM1*50)
87
88 $PROD:M2
89 O:PF2 Q:75
90 I:PFX Q:(PM2*75) A:CONS T:TM2
91
92 $PROD:W s:1 G1:ESUB G2:ESUB
93 O:PW Q:200
94 I:P1 Q: 50 G1:
95 I:PF1 Q: 50 G1:
96 I:P2 Q: 25 G2:
97 I:PF2 Q: 75 G2:
98
99 $DEMAND:CONS
100 D:PW Q:200
101 E:PL Q:120
102 E:PK Q: 80
103
104 $OFFTEXT
105 $SYSINCLUDE mpsgeset M47
106
107 PW.FX = 1;
108
109
110 M47.ITERLIM = 0;
111 $INCLUDE M47.GEN
112 SOLVE M47 USING MCP;
75
113 M47.ITERLIM = 2000;
114
115
116 TM2 = 0.05;
117
118 $INCLUDE M47.GEN
119 SOLVE M47 USING MCP;
120
121 TM2 = 0.10;
122
123 $INCLUDE M47.GEN
124 SOLVE M47 USING MCP;
3.3.16 Large open economy (M48)
For many countries, or for a small number of commodities for one country, the small- country
assumption of xed world prices may not be appropriate. One alternative is of course to model the
whole world. But it may be convenient and appropriate for the modeler to stick with the country
and question and continue to represent the rest of the world with trade transformation functions.
The purpose of this model is to show how to do this, allowing for prices to change with quantities
supplied and demanded.
The powerful features of MPS/GE come with a few costs. One is that production blocks (which
are actually cost functions in the background) must be specied with constant returns to scale. Yet
having one xed factor can allow output as a function of one or more variable factors to mimic
decreasing returns as we showed in model M25. We will show how to incorporate increasing returns
to scale in the next chapter.
We will use a specic factor trick to make the foreign exchange received for exports of X1 a strictly
concave function of export volume. We will create a cticious factor called R (price PR) which is a
second input into the export function. This factor is owned by a foreign consumer called CONSF
and this consumer demands foreign exchange (price PFX). In the benchmarking procedure, we scale
up the output of export activity E1 so that when the cticious factor is paid the value of its marginal
product, the same amount of foreign exchange is left for the domestic economy as in the original
small-economy benchmarking. Here is the data matrix, which is just a revision of M41, adding the
cticious factor and scaling up the output of E1 to pay for the factor.
Production Sectors Consumer
Markets | X1 X2 E1 M2 W CONSH CONSF
----------------------------------------------------------------
P1 | 150 -50 -100
P2 | 50 50 -100
PL | -100 -20 120
PK | -50 -30 80
PW | 200 -200
PFX | 100 -50 -50
PR | -50 50
----------------------------------------------------------------
Consumer CONSF owns the cticious factor (price PR) but the amount of foreign exchange left over
from exports of good 1, equal to 50, leaves 50 units of FX for the domestic consumer. Here is the
production block for activity E1.
$PROD:E1 s:1
O:PFX Q:100
76
I:P1 Q: 50
I:PR Q: 50
We have specied this as a Cobb-Douglas function, so we are assuming that it is of the form:
FX =
_
X
1
R
X
1
FX
Hence:
FX
X
1
= 0.5
The elasticity of foreign exchange revenues with respect to export quantity is 0.5. Think of FX as
revenue: FX = p1(X1)X1. Then if you do the algebra, you get:
FX
X
1
= p
1
+X
1
dp
1
dX
1
X
1
FX
dFX
dX
1
= 1 +
X
1
p
1
(dp
1
/dX
1
)
= 1 + 1/
where is the elasticity of demand. If the elasticity of foreign exchange with respect to export
quantity is 0.5, then we are implicitly calibrating the elasticity of foreign demand for our exports
to be - 2. Notice that an innite elasticity of demand for our exports means that the elasticity of
foreign exchange with respect to export quantity is 1, the small country assumption.
Note that by choosing the share parameter on the Cobb-Douglas function E1, we can calibrate to
any foreign elasticity of export demand that we like. This is done by varying the amount of R
relative to X1 in the benchmarking, remembering to scale output so that there is always 50 units
left over for the domestic consumer.
Now run the model. For a counterfactual, we have imposed an import tari of 0.20. Note from the
listing le that this increases welfare in the domestic economy. This is the usual optimal tari
argument for a large economy.
1 $TITLE Model M48: Large open economy model: large open economy
2
3 $ONTEXT
4
5 Production Sectors Consumer
6
7 Markets | X1 X2 E1 M2 W CONSH CONSF
8 ----------------------------------------------------------------
9 P1 | 150 -50 -100
10 P2 | 50 50 -100
11 PL | -100 -20 120
12 PK | -50 -30 80
13 PW | 200 -200
14 PFX | 100 -50 -50
15 PR | -50 50
16 ----------------------------------------------------------------
17
18 $OFFTEXT
19
77
20 PARAMETER
21 TM2 Import tariff for good;
22
23 TM2 = 0;
24
25 $ONTEXT
26
27 $MODEL:M48
28
29 $SECTORS:
30 X1 ! Production index for good 1
31 X2 ! Production index good 2
32 E1 ! Export index of good 1
33 E2 ! Export index of good 2
34 M1 ! Import level of good 1
35 M2 ! Import level of good 2
36 W ! Welfare index
37
38 $COMMODITIES:
39 P1 ! Price index for good 1
40 P2 ! Price index for good 1
41 PFX ! Read exchange rate index
42 PW ! Welfare price index
43 PL ! Wage index
44 PK ! Capital rental index
45 PR ! Rent which generates the export demand function
46
47 $CONSUMERS:
48 CONSH ! Income level for representative home agent
49 CONSF ! Income level for representative foreign agent
50
51 $PROD:X1 s:1
52 O:P1 Q:150
53 I:PL Q:100
54 I:PK Q: 50
55
56 $PROD:X2 s:1
57 O:P2 Q:50
58 I:PL Q:20
59 I:PK Q:30
60
61 $PROD:E1 s:1
62 O:PFX Q:100
63 I:P1 Q: 50
64 I:PR Q: 50
65
66 $PROD:M2
67 O:P2 Q:50
68 I:PFX Q:50 A:CONSH T:TM2
69
70 $PROD:E2
71 O:PFX Q:(50*0.99)
72 I:P2 Q:50
73
74 $PROD:M1
75 O:P1 Q:50
76 I:PFX Q:(100*1.01)
77
78 $PROD:W s:1
79 O:PW Q:200
80 I:P1 Q:100
81 I:P2 Q:100
82
83 $DEMAND:CONSH
78
84 D:PW Q:200
85 E:PL Q:120
86 E:PK Q: 80
87
88 $DEMAND:CONSF
89 D:PFX Q:50
90 E:PR Q:50
91
92 $OFFTEXT
93 $SYSINCLUDE mpsgeset M48
94
95 E2.L = 0;
96 M1.L = 0;
97
98 M48.ITERLIM = 0;
99 $INCLUDE M48.GEN
100 SOLVE M48 USING MCP;
101 M48.ITERLIM = 2000;
102
103 * Apply a tariff which improves the terms of trade and home
104 * welfare:
105
106 TM2 = 0.05;
107
108 $INCLUDE M48.GEN
109 SOLVE M48 USING MCP;
Exercises:
(1) Compute the relationship between welfare and tari rate for dierent benchmark export demand
functions, where the value share of PR in E1 takes on values 0.25 and 0.75. Do this by changing
the amount of R in the benchmark, remembering to change output accordingly to leave the return
to the domestic consumer equal to 50.
(2) Replace the tari on good 2 imports with a tax on good 1 exports, and show that you can obtain
identical equilibrium values (i.e., demonstrate Lerner symmetry).
3.3.17 Full two-country Heckscher-Ohlin model (M49)
In some cases, the modeler wants to have a world model, or at least a full two-country general-
equilibrium model. That is what we present here. It is a textbook, 2x2x2 Heckscher- Ohlin model:
two counties, two goods, two factors. The X and Y goods, as they are labeled here, are identical
across countries. The factors are labor (L) and capital (K), and the countries are called H (home)
and F (foreign).
You now have most of the building blocks necessary for some quite complicated and realistic models.
In the present case, there is really nothing new, we are just increasing the dimensions of the problems.
Here are the data:
1 XHH YHH XHF YHF XFF YFF XFH YFH WH WF CONSH CONSF
2 PXH 150 -50 -100
3 PYH 50 50 -100
4 PXF 50 50 -100
5 PYF 150 -50 -100
6 PWH 200 -200
7 PWF 200 -200
8 PLH -120 -10 130
79
9 PKH -30 -40 70
10 PLF -40 -30 70
11 PKF -10 -120 130
The notation here for the production activities is (industry or good)(country of production)(country
of sale). Thus YFH, for example, is good Y produced in country F and sold in country H (exported
to country H). The notation for markets and prices should be fairly obvious: PXF for example is
the price of good X in country F.
There is free trade, and so there is factor-price equalization. All prices can be set to one. Country
H is labor abundant and good X is labor intensive. Country F is capital abundant and good Y is
capital intensive.
In our counterfactual experiments, we rst allow country H to impose a tari of 25% and then both
countries impose symmetric taris of 25%.
1 $TITLE: Model M49: 2X2X2 HECKSCHER-OHLIN MODEL
2
3 * This is a full two-country HO model
4
5 $ONTEXT
6
7 XHH YHH XHF YHF XFF YFF XFH YFH WH WF CONSH CONSF
8
9 PXH 150 -50 -100
10 PYH 50 50 -100
11 PXF 50 50 -100
12 PYF 150 -50 -100
13 PWH 200 -200
14 PWF 200 -200
15 PLH -120 -10 130
16 PKH -30 -40 70
17 PLF -40 -30 70
18 PKF -10 -120 130
19
20 $OFFTEXT
21
22 PARAMETERS
23 TARH
24 TARF;
25
26 TARH = 0;
27 TARF = 0;
28
29 $ONTEXT
30
31 $MODEL:M49
32
33 $SECTORS:
34 WH
35 WF
36 XHH
37 YHH
38 XHF
39 YHF
40 XFF
41 YFF
42 XFH
43 YFH
44
45 $COMMODITIES:
80
46 PWH
47 PWF
48 PXH
49 PXF
50 PYH
51 PYF
52 PLH
53 PLF
54 PKH
55 PKF
56
57 $CONSUMERS:
58 CONSH
59 CONSF
60
61 $PROD:XHH s:1
62 O:PXH Q:150
63 I:PLH Q:120
64 I:PKH Q: 30
65
66 $PROD:YHH s:1
67 O:PYH Q:50
68 I:PLH Q:10
69 I:PKH Q:40
70
71 $PROD:XFF s:1
72 O:PXF Q:50
73 I:PLF Q:40
74 I:PKF Q:10
75
76 $PROD:YFF s:1
77 O:PYF Q:150
78 I:PLF Q: 30
79 I:PKF Q:120
80
81 $PROD:XHF
82 O:PXF Q:50
83 I:PXH Q:50 A:CONSF T:TARF
84
85 $PROD:YHF
86 O:PYF Q:50
87 I:PYH Q:50.1
88
89 $PROD:XFH
90 O:PXH Q:50
91 I:PXF Q:50.1
92
93 $PROD:YFH
94 O:PYH Q:50
95 I:PYF Q:50 A:CONSH T:TARH
96
97
98 $PROD:WH s:1
99 O:PWH Q:200
100 I:PXH Q:100
101 I:PYH Q:100
102
103 $PROD:WF s:1
104 O:PWF Q:200
105 I:PXF Q:100
106 I:PYF Q:100
107
108 $DEMAND:CONSH
109 D:PWH Q:200
81
110 E:PLH Q:130
111 E:PKH Q: 70
112
113 $DEMAND:CONSF
114 D:PWF Q:200
115 E:PLF Q: 70
116 E:PKF Q:130
117
118
119 $OFFTEXT
120 $SYSINCLUDE mpsgeset M49
121
122 YHF.L = 0.; XFH.L = 0.;
123
124 $INCLUDE M49.GEN
125 SOLVE M49 USING MCP;
126
127 * TARIFFS
128
129 TARH = .25;
130
131 $INCLUDE M49.GEN
132 SOLVE M49 USING MCP;
133
134 TARH = .25;
135 TARF = .25;
136
137 $INCLUDE M49.GEN
138 SOLVE M49 USING MCP;
Exercise:
Verify the Stolper-Samuelson theorem by comparing factor prices in free trade versus when one or
both countries have taris.
3.3.18 International capital ows (M410)
Another important feature of economies and also an important policy issue is capital ows or trade
in capital. This can be captured in a static model by adding a market for a factor which is simply
rented from or to foreigners so as to ignore the dynamic and durability issues connected with
capital. This model incorporates a simple extension of our earlier work, particularly M48. We are
going to assume that the country is a price taker in goods markets, but there is a less-than-perfectly-
elastic supply of capital to the country. Once again, we create a ctitious factor R (price PR) which
is a xed factor in a function (KM) transforming foreign exchange into capital and that ctitious
factor is owned by a foreign consumer. All in all, the model is very similar to M48, except that now
we have three things traded in the benchmark: good 1 is exported, good 2 is imported, and capital
is imported. Here is the benchmark data, in which 20 units of capital are imported initially.
Production Sectors Consumer
Markets | X1 X2 E1 M2 KM W CONSH CONSF
----------------------------------------------------------------
P1 | 170 -70 -100
P2 | 50 50 -100
PL | -120 -20 140
PK | -50 -30 20 60
PW | 200 -200
82
PFX | 70 -50 -10 -10
PR | -10 10
----------------------------------------------------------------
Here is the production block for KM:
$PROD:KM s:1
O:PK Q:20
I:PFX Q:10
I:PR Q:10
The counterfactual experiment is to impose a 5% tari. You will see that this generates an increase
in capital imports, because good 2, the protected import sector is capital intensive and protection
thus raises the return to capital (the Stolper-Samuleson theorem). Welfare of course decreases.
In order to make a simple economics point, we run a second experiment in which we impose the tari
but x capital imports at their benchmark level of KM = 1 (20 units of capital imported are the
reference quantity for activity level KM = 1). Note that welfare decreases less under this constraint.
This is an old result from a paper by Brecher and Alejandro, that capital imports generated by a
tari protecting a capital intensive sector have a secondary, negative welfare eect. Added capital
imports allow more costly domestic production of good 2 to displace additional cheap imports, thus
creating an added welfare loss.
1 $TITLE Model M410: Capital imports (less than perfect elastic)
2
3 $ONTEXT
4
5 Production Sectors Consumer
6
7 Markets | X1 X2 E1 M2 KM W CONSH CONSF
8 ----------------------------------------------------------------
9 P1 | 170 -70 -100
10 P2 | 50 50 -100
11 PL | -120 -20 140
12 PK | -50 -30 20 60
13 PW | 200 -200
14 PFX | 70 -50 -10 -10
15 PR | -10 10
16 ----------------------------------------------------------------
17
18 $OFFTEXT
19
20 PARAMETER
21 TM2 Import tariff for good X2;
22
23 TM2 = 0;
24
25 $ONTEXT
26
27 $MODEL:M410
28
29 $SECTORS:
30 X1 ! Production index for good 1
31 X2 ! Production index good 2
32 E1 ! Export index of good 1
33 E2 ! Export index of good 2
83
34 M1 ! Import level of good 1
35 M2 ! Import level of good 2
36 KM ! Capital imports
37 W ! Welfare index
38
39 $COMMODITIES:
40 P1 ! Price index for good 1
41 P2 ! Price index for good 1
42 PFX ! Read exchange rate index
43 PW ! Welfare price index
44 PL ! Wage index
45 PK ! Capital rental index
46 PR ! Rent which generates concavity in capital supply
47
48 $CONSUMERS:
49 CONSH ! Income level for representative home agent
50 CONSF ! Income level for representative foreign agent
51
52 $PROD:X1 s:1
53 O:P1 Q:170
54 I:PL Q:120
55 I:PK Q: 50
56
57 $PROD:X2 s:1
58 O:P2 Q:50
59 I:PL Q:20
60 I:PK Q:30
61
62 $PROD:E1 s:1
63 O:PFX Q:70
64 I:P1 Q:70
65
66 $PROD:M2
67 O:P2 Q:50
68 I:PFX Q:50 A:CONSH T:TM2
69
70 $PROD:E2
71 O:PFX Q:(50*0.99)
72 I:P2 Q:50
73
74 $PROD:M1
75 O:P1 Q:50
76 I:PFX Q:(100*1.01)
77
78 $PROD:KM s:1
79 O:PK Q:20
80 I:PFX Q:10
81 I:PR Q:10
82
83 $PROD:W s:1
84 O:PW Q:200
85 I:P1 Q:100
86 I:P2 Q:100
87
88 $DEMAND:CONSH
89 D:PW Q:200
90 E:PL Q:140
91 E:PK Q:60
92
93 $DEMAND:CONSF
94 D:PFX Q:10
95 E:PR Q:10
96
97 $OFFTEXT
84
98 $SYSINCLUDE mpsgeset M410
99
100 E2.L = 0;
101 M1.L = 0;
102
103 PW.FX = 1;
104
105 M410.ITERLIM = 0;
106 $INCLUDE M410.GEN
107 SOLVE M410 USING MCP;
108 M410.ITERLIM = 2000;
109
110
111 TM2 = 0.05;
112
113 $INCLUDE M410.GEN
114 SOLVE M410 USING MCP;
115
116 KM.FX = 1;
117
118 $INCLUDE M410.GEN
119 SOLVE M410 USING MCP;
3.4 Modeling Consumer Demand with MPSGE
3.4.1 Evaluating a Demand Function
Consider a standard consumer choice problem, one which might appear on a midterm examination
in intermediate microeconomics:
max U(x, y) = ln(x) + 2ln(y)
subject to:
1x + 2y = 120
where 1 is the exogenous price of x and 2 is the price of y.
This type of problem is solved easily using GAMS/MINOS (as a nonlinear program). Strictly
speaking, it is not the sort of model for which you would need to use MPSGE. At the same time,
this can be an instructive example.
The key issue in this example is learning how to represent utility functions. MPSGE is non-
algebraic so function specication depends on an intuitive understanding of the underlying eco-
nomic structure.
Consider Figure 5 and focus on a single point, x=1, y=1. There is an indierence curve through this
point, and the marginal rate of substitution (MRS) at this point is simply the slope of this curve.
The benchmark MRS does not uniquely determine the underlying preferences.
Figure 5: A Calibrated Benchmark
A utility function is represented in MPSGE by the specication of: (i) benchmark demand quantities,
(ii) benchmark demand prices (iii) an elasticity of substitution at the benchmark point. Benchmark
quantities determine an anchor point for the set of indierence curves. Benchmark prices x the
slope of the indierence curve at that point, and the elasticity describes the curvature of the indif-
ference curve. Speaking formally, elasticities provide a second order approximation of the utility
85
function. To understand the importance of the benchmark elasticity of substitution, consider Figure
6. This gure shows three indierence curves all of which share the same benchmark quantities and
benchmark prices. They dier only in the elasticities of substitution. The least convex (attest)
curve has the highest elasticity, the most convex curve has the lowest elasticity. (When the elasticity
of substitution is 0, the indierence curve is L-shaped with the corner at the benchmark point.)
Figure 6: The Elasticity of Substitution
Let us now consider how the consumer optimization problem can be cast as a general equilibrium
model. We do this by adding a single factor of production and two production sectors. For
concreteness, let the factor of production be called labor with a price PL. One production function
converts one unit of labor into one unit of x, the other sector converts 2 units of labor into one unit
of y. Setting the labor endowment equal 120, the market clearance condition for labor reads:
1x + 2y = 120
which is precisely the budget constraint for the consumers problem.
We will now present the program code, a few lines at a time. As part of working through the
example, the student should type these lines into a le.
A MPSGE model specication is always listed between $ONTEXT and $OFFTEXT statements. The
rst statement within an MPSGE model-description assigns a name to the model. The model name
must begin with a letter and must have 10 or fewer characters.
1 $ONTEXT
2
3 $MODEL:DEMAND
4
5 * The model specification begins by declaring variables for the model.
6 * In a standard model, there are three types of variables: commodity
7 * prices, sectoral activity levels, and consumer incomes. The end of
8 * each line may include "! variable description ".
9
10 * N.B. The variables associated with commodities are prices, not
11 * quantities. (In this and subsequent models, I use P as the first
12 * letter for each of the commodity variables to remind us that these
13 * variables are prices.)
14
15 * N.B. The variable associated with a consumer is an income level, not
16 * a welfare index.
17
18 $SECTORS:
19 X ! ACTIVITY LEVEL FOR X = DEMAND FOR GOOD X
20 Y ! ACTIVITY LEVEL FOR Y = DEMAND FOR GOOD Y
21
22 $COMMODITIES:
23 PX ! PRICE OF X WHICH WILL EQUAL PL
24 PY ! PRICE OF Y WHICH WILL EQUAL 2 PL
25 PL ! PRICE OF THE ARTIFICIAL FACTOR L
26
27 $CONSUMERS:
28 RA ! REPRESENTATIVE AGENT INCOME
29
30 * Function specifications follow the variable declarations. In this
31 * model, our first declarations correspond to the two production
32 * sectors. In this model, the production structures are particularly
33 * simple. Each of the sectors has one input and one output. In the MPSGE
86
34 * syntax, I: denotes an input and O: denotes an output. The output
35 * quantity coefficients for both sectors are unity (Q:1). This means
36 * that the level values for x and y correspond to the actual quantities
37 * produced.
38
39 * The final function specified in the model represents the utility
40 * function and endowments for our single consumer. In this function, the
41 * E: entries correspond to endowments and the D: entries are demands.
42 * Reference demands, reference prices and the substitution elasticity
43 * (s:1) characterize preferences.
44
45 * The demand entries shown here are consistent with a Cobb-Douglas
46 * utility function in which the budget share for y is twice the budget
47 * share for x (i.e. the MRS at (1,1) equals 1/2):
48
49 $PROD:X
50 O:PX Q:1
51 I:PL Q:1
52
53 $PROD:Y
54 O:PY Q:1
55 I:PL Q:2
56
57 $DEMAND:RA s:1
58 E:PL Q:120
59 D:PX Q:1 P:(1/2)
60 D:PY Q:1 P:1
61
62 $OFFTEXT
63
64 * The final three statements in this file invoke the MPSGE
65 * preprocessor, "generate" and solve the model:
66
67 $SYSINCLUDE mpsgeset DEMAND
68
69 $INCLUDE DEMAND.GEN
70 SOLVE DEMAND USING MCP;
71
The preprocessor invocation ($SYSINCLUDE mpsgeset) should be placed immediately following the
$OFFTEXT block containing the model description. The model generator code, DEMAND.GEN, is pro-
duced by the previous statement and must be referenced immediately before each subsequent SOLVE
statement.
At this point, the reader should take the time to type the example into a le and execute the program
with GAMS/MPSGE.
This is possibly the rst GAMS model which some readers have solved, so it is worth looking through
the listing le in some detail. After running the solver, we examine the listing le. I typically begin
my assessment of a models solution by searching for STATUS. For this model, we have the following:
S O L V E S U M M A R Y
MODEL DEMAND
TYPE MCP
SOLVER PATH FROM LINE 263
**** SOLVER STATUS 1 NORMAL COMPLETION
**** MODEL STATUS 1 OPTIMAL
87
RESOURCE USAGE, LIMIT 1.432 1000.000
ITERATION COUNT, LIMIT 5 1000
EVALUATION ERRORS 0 0
Work space allocated -- 4.86 Mb
Default price normalization using income for RA
This information is largely self-explanatory. The most important items are the SOLVER STATUS
and MODEL STATUS indicators. When the solver status is 1 and the model status is 1, the system
has returned an equilibrium.
For small models such as this, the limits on resource usage (time) and solver iterations have no
eect. (You can modify these values with the statements:
model.RESLIM = number of cpu seconds ;
model.ITERLIM = number of iterations ;
entered into the GAMS program before the SOLVE statement and after the $sysinclude mpsgeset
statement.)
The work space allocation for MPSGE models is determined by the number of variables in the model.
It is possible to exogenously specify the work space allocation by assigning
model.WORKSPACE = xx ;
where xx is the desired number of megabytes.
The nal message, Default price normalization..., is signicant. It reminds the user that an
Arrow-Debreu general equilibrium model determines only relative prices. In such an equilibrium,
the absolute scaling of prices is indeterminant. (I.e., if (p*,M*) are a set of equilibrium prices and
income levels, then (2 p*,2 M*) is also a solution, etc.)
It is common practice in economics to address the normalization issue through the specication of a
numeraire commodity. You can do this for an MPSGE model by xing a price, with a statement
like:
PX.FX = 1;
entered following the model declaration ($SYSINCLUDE mpsgeset) but prior to the solver invoca-
tion. When any price or income level is xed, MPSGE recognizes that a numeraire has been specied
and does no automatic normalization.
Following some output from the solver (PATH in this case), the listing le provides a complete
report of equilibrium values. With MPSGE models, the equation listings are superuous. The
variable listings provide all the relevant information.
For this model, the solution listing appears as follows:
88
LOWER LEVEL UPPER MARGINAL
---- VAR X . 40.000 +INF .
---- VAR Y . 40.000 +INF .
---- VAR PX . 1.000 +INF .
---- VAR PY . 2.000 +INF .
---- VAR PL . 1.000 +INF .
---- VAR RA . 120.000 +INF .
X SUPPLY AND DEMAND OF GOOD X
Y SUPPLY AND DEMAND OF GOOD Y
PX PRICE OF X WHICH WILL EQUAL CX * PL
PY PRICE OF Y WHICH WILL EQUAL CY * PL
PL PRICE OF THE ARTIFICIAL FACTOR L
RA REPRESENTATIVE AGENT INCOME
The LOWER and UPPER columns report variable bounds applied in the model. In these columns,
zero is represented by . and innity is represented by +INF. The LEVEL column reports the
solution value returned by the algorithm. Here we see that the equilibrium price of x is 1 and the
price of y is 2, as determined by the specication of labor inputs.
Exercises:
(a) The utility function calibration point is arbitrary. Here, we have selected x=y=1 as the refer-
ence quantity. Revise the program to use a dierent calibration point where x=2 and y=1, where
MRS(2,1) = 1/4. (Remember to modify both the Q: and P: elds.) Rerun the model to demonstrate
that this does not change the result.
(b) Increase the price of x from 1 to 2 by changing the Q: coecient for PL in sector X from 1 to
2. What happens to the demand for x? Explain why a change in the price of x is represented by a
change in the Q: eld for sector X.
(c) Compute an equilibrium in which commodity y is dened as the numeraire.
3.4.2 Evaluating the Marginal Rate of Substitution
This example further explores the representation of demand functions with MPSGE. It sets up a
trivial equilibrium model with two goods and one consumer which returns the marginal rate of
substitution of good x for good y at a given level of demand.
The underlying utility function is:
U(x, y) = ln(x) + 4ln(y)
When x=y=1, the marginal rate of substitution of x for y is 1/4. We use this information to calibrate
the demand function, specifying the ratio of the reference prices of x to y equal to 1/4.
In an equilibrium, nal demand always equals endowments for both goods, because these are the only
sources of demand and supply. The model as parameterized demonstrates that if we set endowments
for this model equal to the demand function calibration point, the model equilibrium price ratio
equals the benchmark MRS.
This program begins with some GAMS statements in which three scalar parameters are declared.
89
These parameters will be used in the place of numbers within the MPSGE model. The syntax for
these GAMS statements is introduced in Chapter 2 of the GAMS manual. In short, we declare x, y
and MRS as scalar parameters and initialize the rst two of these to unity. The MRS parameter is
assigned a value following the solution of the model.
SCALAR
X QUANTITY OF X FOR WHICH THE MRS IS TO BE EVALUATED /1/
Y QUANTITY OF Y FOR WHICH THE MRS IS TO BE EVALUATED /1/
MRS COMPUTED MARGINAL RATE OF SUBSTITUTION;
The remainder of the MPSGE program is, in fact, simpler than the previous example.
1
2 $ONTEXT
3
4 $MODEL:MRSCAL
5
6 $COMMODITIES:
7 PX ! PRICE INDEX FOR GOOD X
8 PY ! PRICE INDEX FOR GOOD Y
9
10 $CONSUMERS:
11 RA ! REPRESENTATIVE AGENT
12
13 $DEMAND:RA s:1
14 D:PX Q:1 P:(1/4)
15 D:PY Q:1 P:1
16 E:PX Q:X
17 E:PY Q:Y
18 $OFFTEXT
19 $SYSINCLUDE mpsgeset MRSCAL
20
21 $INCLUDE MRSCAL.GEN
22 SOLVE MRSCAL USING MCP;
23
Following the solution, we compute a function of the solution values, the ratio of the price of x to
the price of y. We do this using the GAMS syntax which references the equilibrium level values of
the PX and PY and storing this result in the scalar MRS. This scalar value is then displayed in the
listing le with 8 digits:
MRS = PX.L / PY.L;
OPTION MRS:8;
DISPLAY MRS;
Exercises:
(a) Show that the demand function is homothetic by uniform scaling of the x and y endowments.
The resulting MRS should remain unchanged.
(b) Modify the demand function calibration point so that the reference prices of both x and y equal
90
unity (hint: the marginal rate of substitution is:
MRS = x/(4y)
3.4.3 Goods Demand, Leisure Demand and Labor Supply
This model investigates the labor-leisure decision. A single consumer is endowed with labor which
is either supplied to the market or repurchased as leisure. The consumer utility function over
market goods (x and y) and leisure is Cobb-Douglas:
U(x, y, L) = ln(x) +ln(y) +ln(L)
Goods x and y may only be purchased using funds obtained from labor sales. This constraint is
written:
x +y = LPRODLS
where goods x and y both have a price of unity at base year productivity and LPROD is an index of
labor productivity. An increase in productivity is equivalent to a proportional decrease in the prices
of x and y.
The model declaration is as follows:
1
2 SCALAR LPROD AGGREGATE LABOR PRODUCTIVITY /1/,
3 CX COST OF X AT BASE YEAR PRODUCTIVITY /1/,
4 CY COST OF Y AT BASE YEAR PRODUCTIVITY /1/;
5 $ONTEXT
6
7 $MODEL:LSUPPLY
8
9 $SECTORS:
10 X ! SUPPLY=DEMAND FOR X
11 Y ! SUPPLY=DEMAND FOR Y
12 LS ! LABOR SUPPLY
13
14 $COMMODITIES:
15 PX ! MARKET PRICE OF GOOD X
16 PY ! MARKET PRICE OF GOOD Y
17 PL ! MARKET WAGE
18 PLS ! CONSUMER VALUE OF LEISURE
19
20 $CONSUMERS:
21 RA ! REPRESENTATIVE AGENT
22
23 $PROD:LS
24 O:PL Q:LPROD
25 I:PLS Q:1
26
27 $PROD:X
28 O:PX Q:1
29 I:PL Q:CX
30
31 $PROD:Y
32 O:PY Q:1
33 I:PL Q:CY
34
35 $DEMAND:RA s:1
91
36 E:PLS Q:120
37 D:PLS Q:1 P:1
38 D:PX Q:1 P:1
39 D:PY Q:1 P:1
40
41 $OFFTEXT
42 $SYSINCLUDE mpsgeset LSUPPLY
43
44 $INCLUDE LSUPPLY.GEN
45 SOLVE LSUPPLY USING MCP;
46
We can use this model to evaluate the wage elasticity of labor supply. In the initial equilibrium
(computed in the last statement) the demands for x, y and L all equal 40. A subsequent assignment
to LPROD (below) increases labor productivity. After computing a new equilibrium, we can use the
change in labor supply to determine the wage elasticity of labor supply, an important parameter in
labor market studies.
It should be emphasized that the elasticity of labor supply should be an input rather than an output
of a general equilibrium model this is a parameter for which econometric estimates can be obtained.
Here is how the programming works. First, we declare some scalar parameters which we will use for
reporting, then save the benchmark labor supply in LS0:
47
48 SCALAR
49 LS0 REFERENCE LEVEL OF LABOR SUPPLY
50 ELS ELASTICITY OF LABOR SUPPLY WRT REAL WAGE;
51
52 LS0 = LS.L;
53
Next, we modify the value of scalar LPROD, increasing labor productivity by 1%. Because this
is a neoclassical model, this change is equivalent to increasing the real wage by 1%. We need to
recompute equilibrium prices after having changed the LPROD value:
54
55 LPROD = 1.01;
56 $INCLUDE LSUPPLY.GEN
57 SOLVE LSUPPLY USING MCP;
58
We use this solution to compute and report the elasticity of labor supply as the percentage change
in the LS activity:
59
60 ELS = 100 * (LS.L - LS0) / LS0;
61 DISPLAY ELS;
62
As the model is currently constructed, the wage elasticity of labor supply equals zero. This is
because the utility function is Cobb-Douglas over goods and leisure, and the consumers only source
of income is labor. As the real wage rises, this increases both the demand for goods (labor supply)
and the demand for leisure. These eect exactly balance out and the supply of labor is unchanged.
92
Exercises:
(a) One way in which the labor supply elasticity might dier from zero in a model with Cobb-Douglas
nal demand is if there were income from some other source. Let the consumer be endowed with
good x in addition to labor. What x endowment is consistent with a labor supply elasticity equal
to 0.15?
(b) A second way to calibrate the labor supply elasticity is to change the utility function. We can
do this by changing the s:1 to s:SIGMA, where SIGMA is a scalar value representing the benchmark
elasticity of substitution between x, y and L in nal demand. Modify the program to include SIGMA
as a scalar, and nd the value for SIGMA consistent with a labor supply elasticity equal to 0.15.
3.4.4 A Pure Exchange Model
Partial equilibrium analysis forms the basis of most economics courses at the undergraduate level. In
these models we focus on price, supply and demand for a single commodity. The partial equilibrium
approach neglects indirect eects, through which changes in the market for one good may inuence
the market for another good.
In the previous section, we focused on the choices of a single consumer. In the present section, we will
explore the implications of interactions between many consumers with heterogeneous preferences.
Furthermore, the analysis will explore the potentially important interaction between market prices
and income which are determined jointly in a general equilibrium.
The most widely-used graphical framework for multi-agent exchange equilibrium analysis is the
Edgeworth-Bowley box as illustrated in Figure 7. In this diagram we model the following economy:
Figure 7: The Edgeworth-Bowley Box
* Two types of consumers, denoted A and B. We consider A and B to each represent multiple
consumers, each with the same endowments and preferences. This assumption is helpful for justifying
our assumption of perfectly competitive, price-taking behavior.
* Two commodities, denoted x and y
* Fixed endowments of both goods. The horizontal axis measures the total world endowment of
good X. The vertical axis measure the total world endowment of good Y. Any point in the box then
represents an allocation of goods between the two agents. The agent H allocation is measured with
respect to the lower left origin. The agent F allocation is measured with respect to the upper right
origin.
Each agent has a given initial endowment, here denoted point E. Furthermore, we assume that there
is no possibility for trade. The indierence curves through point E therefore represent autarchy
welfare levels.
The key idea in this model is that trade can improve both agents welfare. One agent gives some
amount good x to the other in return for an amount of good y. The terms of trade, the rate of
exchange between x and y, is determined by the model. The model illustrates a number of important
properties of market economies:
* Trade is mutually benecial. So long as the transactions are voluntary, neither H nor F will be
hurt by engaging in trade.
93
* Market prices can be used to guide the economy to a Pareto-ecient allocation, a state of aairs
in which further mutually-benecial trades are not possible.
* There is no guarantee that the gains from trade will be fairly distributed across consumers.
A competitive equilibrium may produce a signicant welfare increase for one consumer while have
negligible impact on the other.
* There are multiple Pareto-ecient allocations, typically only one of which is a competitive equilib-
rium. We can use this model to demonstrate that the issues of eciency and equity can be separated
when there is the possibility of lump-sum income transfers between agents.
It is relatively easy to construct a pure exchange model with MPSGE. As illustration we implement
the simple two good, two agent model of exchange equilibrium. The world endowments for goods x
and y are both equal to 1. Six parameters are used to parameterize the model. These are declared
as scalars at the top of the program:
1
2 SCALAR XA AGENT A ENDOWMENT OF X ( 0 < XA < 1) /0.2/
3 YA AGENT A ENDOWMENT OF Y ( 0 < YA < 1) /0.8/
4 THETA_A AGENT A DEMAND SHARE PARAMETER FOR X /0.5/
5 THETA_B AGENT B DEMAND SHARE PARAMETER FOR X /0.8/
6 SIGMA_A AGENT A ELASTICITY PARAMETER /2.0/
7 SIGMA_B AGENT B ELASTICITY PARAMETER /0.5/;
8
This model is actually simpler than the models presented above because we have no need for pro-
duction. There are simply two commodities and two consumers. The consumers dier in terms of
commodity endowments and preferences. The competitive equilibrium prices are such that supply
equals demand for both goods and both agents spend an amount equal to their endowment income.
This model illustrates how to use computed function coecients. See, for example, Q:(1-THETA A)
in the $DEMAND:A block. Any numeric input eld in an MPSGE model may be computed,
provided that the algebraic expression is enclosed within parentheses and legitimate GAMS code.
This model specication uses the default values for reference prices in the demand function blocks.
When P:value is not specied in a D:,I: or O: record, P:1 is assumed.
This model uses the more general constant-elasticity-of-substitution utility function.
1
2 $ONTEXT
3
4 $MODEL:EXCHANGE
5
6 $COMMODITIES:
7 PX ! EXCHANGE PRICE OF GOOD X
8 PY ! EXCHANGE PRICE OF GOOD Y
9
10 $CONSUMERS:
11 A ! CONSUMER A
12 B ! CONSUMER B
13
14 $DEMAND:A s:SIGMA_A
15 E:PX Q:XA
16 E:PY Q:YA
17 D:PX Q:THETA_A
94
18 D:PY Q:(1-THETA_A)
19
20 $DEMAND:B s:SIGMA_B
21 E:PX Q:(1-XA)
22 E:PY Q:(1-YA)
23 D:PX Q:THETA_B
24 D:PY Q:(1-THETA_B)
25
26 $OFFTEXT
27 $SYSINCLUDE mpsgeset EXCHANGE
28
29 $INCLUDE EXCHANGE.GEN
30 SOLVE EXCHANGE USING MCP;
31
32 SCALAR
33 PRATIO EQUILIBRIUM PRICE OF X IN TERMS OF Y,
34 IRATIO EQUILIBRIUM RATIO OF CONSUMER A INCOME TO CONSUMER B INCOME;
35
36 PRATIO = PX.L / PY.L;
37 IRATIO = A.L / B.L;
38
39 DISPLAY IRATIO, PRATIO;
40
The foregoing sets up the model and computes the competitive equilibrium. After GAMS returns
from the solver, we declare and compute some report values.
Absolute levels of income and price returned from a general equilibrium model are not meaningful
because a model determines only relative prices. For this reason, we report equilibrium income and
price levels in relative terms.
In the nal step, we compute an alternative ecient equilibrium, one in which the income levels
for A and B are equal. The purpose of this exercise is to demonstrate the second welfare theorem.
When incomes are both xed, the equilibrium remains ecient, but the connection between market
prices and endowment income is eliminated.
In GAMS/MPSGE a variable may be xed using the GAMS syntax
variable.fx= value;
as illustrated in this model:
1
2 A.FX = 1;
3 B.FX = 1;
4 $INCLUDE EXCHANGE.GEN
5 SOLVE EXCHANGE USING MCP;
6
7 SCALAR TRANSFER IMPLIED TRANSFER FROM A TO B AS A PERCENTAGE OF INCOME;
8
9 TRANSFER = 100 * ( A.L - PX.L * XA - PY.L * YA ); PRATIO = PX.L / PY.L;
10 IRATIO = A.L / B.L;
11
12 DISPLAY TRANSFER, PRATIO, IRATIO;
13
95
Exercises:
(a) Set up a separate models which computes the autarchy price ratios for consumers A and B. (You
can use one of the earlier models as a starting point.)
(b) Determine parameter values for which the endowment point is the equilibrium point.
(c) Set up a series of computations from which you can sketch the eciency locus. Draw the
Edgeworth box diagram which is consistent with these values.
3.4.5 Import Taris and Market Power in an Exchange Model
The exchange model provides a remarkably useful tool for analyzing issues related to international
trade. Formal trade theory is more complicated with the inclusion of separate production technolo-
gies. We will present some of those models below. Before going forward, however, we will consider a
slight generalization of the 2x2 model exchange model. In this extension, we introduce independent
markets for consumers A and B and trade activities which deliver goods from one market to the
other.
The set of input parameters largely the same as in the previous example. Two new parameters are
ad-valorem taris which apply on imports to each of the regions.
1
2 SCALAR XA AGENT A ENDOWMENT OF X ( 0 le XA le 1) /0.2/
3 YA AGENT A ENDOWMENT OF Y ( 0 le YA le 1) /0.8/
4 THETA_A AGENT A DEMAND SHARE PARAMETER FOR X /0.4/
5 THETA_B AGENT B DEMAND SHARE PARAMETER FOR X /0.6/
6 SIGMA_A AGENT A ELASTICITY PARAMETER /1.0/
7 SIGMA_B AGENT B ELASTICITY PARAMETER /1.0/,
8 T_A AD-VALOREM TARIFF ON IMPORTS TO AGENT A /0.10/
9 T_B AD-VALOREM TARIFF ON IMPORTS TO AGENT B /0.10/;
10
The program diers from the previous example in several respects. First, we introduce a separate
commodity price for each agent. In the absence of taris, these prices are identical.
A second dierence is that in this model trade activities deliver goods from one agent to the other.
These are denoted Mgoodagent for imports of good to agent. There are four ows which may be
operated in only one direction (the activity levels are non-negative). In terms of initial endowments
and preferences, this model has exactly the same economic structure as the previous model.
1
2 $ONTEXT
3
4 $MODEL:TARIFFS
5
6 $SECTORS:
7 MXA ! TRADE IN X FROM B TO A
8 MXB ! TRADE IN X FROM A TO B
9 MYA ! TRADE IN Y FROM B TO A
10 MYB ! TRADE IN Y FROM A TO B
11
12
13 $COMMODITIES:
14 PXA ! PRICE OF GOOD X FOR AGENT A
96
15 PYA ! PRICE OF GOOD Y FOR AGENT A
16 PXB ! PRICE OF GOOD X FOR AGENT B
17 PYB ! PRICE OF GOOD Y FOR AGENT B
18
19 $CONSUMERS:
20 A ! CONSUMER A
21 B ! CONSUMER B
22
23 $DEMAND:A s:SIGMA_A
24 E:PXA Q:XA
25 E:PYA Q:YA
26 D:PXA Q:THETA_A
27 D:PYA Q:(1-THETA_A)
28
29 $DEMAND:B s:SIGMA_B
30 E:PXB Q:(1-XA)
31 E:PYB Q:(1-YA)
32 D:PXB Q:THETA_B
33 D:PYB Q:(1-THETA_B)
34
The trade activities each have one input and one output. They simply deliver a good (X or Y)
from one agent to the other. The new syntax presented here is specication of an ad-valorem tax.
Adding a tax requires two new elds. The rst is A: which species the tax agent, a consumer
who collects the tax revenue as part of income. The second is T: which species the ad- valorem
tax rate.
MPSGE permits taxes to applied on production inputs and outputs but it does not permit taxes on
nal demand.
The tax applies on a net basis on inputs. For example, if we consider the MXA sector, the price of
one unit of input is given by:
Px B * (1 + Ta)
where Px B is the net of tax price of a unit of x in the agent B market and Ta is the ad-valorem
tari rate.
1
2 $PROD:MXA
3 O:PXA Q:1
4 I:PXB Q:1 A:A T:T_A
5
6 $PROD:MXB
7 O:PXB Q:1
8 I:PXA Q:1 A:B T:T_B
9
10 $PROD:MYA
11 O:PYA Q:1
12 I:PYB Q:1 A:A T:T_A
13
14 $PROD:MYB
15 O:PYB Q:1
16 I:PYA Q:1 A:B T:T_B
17
The nal portions of the le introduces one use of MPSGE report variables. In this case, report
variables are used to recover a Hicksian money-metric welfare index for each of the agents. We
97
compute the initial, tari-ridden equilibrium in order to compute the benchmark welfare levels. We
then set all taris to zero and compute the free-trade equilibrium. Using the nal welfare indices
and the saved values of the benchmark welfare levels, we are able to report the change in welfare
from removing tari distortions.
1
2 $REPORT:
3 V:WA W:A
4 V:WB W:B
5
6 $OFFTEXT
7 $SYSINCLUDE mpsgeset TARIFFS
8
9 $INCLUDE TARIFFS.GEN
10 SOLVE TARIFFS USING MCP;
11
12 SCALAR
13 WA0 BENCHMARK WELFARE INDEX FOR AGENT A
14 WB0 BENCHMARK WELFARE INDEX FOR AGENT B;
15
16 WA0 = WA.L;
17 WB0 = WB.L;
18 T_A = 0;
19 T_B = 0;
20
21 $INCLUDE TARIFFS.GEN
22 SOLVE TARIFFS USING MCP;
23
24 SCALAR
25 EVA HICKSIAN EQUIVALENT VARIATION FOR AGENT A
26 EVB HICKSIAN EQUIVALENT VARIATION FOR AGENT B;
27
28 EVA = 100 * (WA.L-WA0)/WA0;
29 EVB = 100 * (WB.L-WB0)/WB0;
30 DISPLAY EVA, EVB;
31
Exercises:
(a) Find the optimal tari in this model for agent A, assuming that agent B does not retaliate
and leaves her tari rate at the benchmark level.
(b) Insert the endowment and preference parameters from the previous problem, retaining the same
benchmark tari rates. Does free trade benet both countries? If not, why not?
98
4. MPSGE Syntax
4.1 GAMS/MPSGE Program Structure
A typical GAMS/MPSGE program has the following elements:
1. GAMS set declarations. GAMS does not require that all sets be dened at the head
of a program, but it is convenient to do so. A key advantage conferred by GAMS is that
the denitions of sets are separable from the denition of a model. This means that small
dimensional examples may be used for model development, and once a model is operational it
may be applied to larger dimensional applications.
2. GAMS parameter declarations and denitions. GAMS statements such as PARAMETER
or TABLE may be used to dene numeric data structdures. Alternatively, data may be read from
external sources, such as Excel les. It is common that some model input may be computed
using GAMSalgebraic syntax.
3. MPSGE Model Denition The MPSGE model denition is provided in a GAMS comment
block, delimited by $ontext and $offtext. Details of the syntax are provided subsequently,
but so far as program structure the key input eld is the $model statement which denes a
GAMS symbol which is subsequently used to refer to the model.
4. Invocation of the MPSGE model-compiler. The statement:
$sysinclude mpsgeset modelID
must be included in the GAMS/MPSGE program immediately following the $ontext/$offtext
block which denes the MPSGE model. (When two or more models are dened in a single
program, each must have its own mpsgeset statement.)
5. Scenario denition and solution. This part of the program involves assignment of param-
eter values and the computation of equilibria. The computation of an economic equilibrium
involves two steps: (1) model generation, something which is accomplished with the statement:
$include modelID.gen
and (2) model solution, something which follows conventional GAMS syntax for complemen-
tarity solves:
solve modelID using mcp;
6. Report generation. Reporting relies on GAMS parameter assignment statements which
transfer solution values from the model into text or Excel tables or gures.
4.2 MPSGE Basic Syntax Rules
The following rules apply the the statements which dene an MPSGE model within an $ontext-
$offtext block:
99
All input is free format (spaces and tabs are ignored) except keywords for which $ must
appear in column 1.
End-of-line is signicant. Continuation lines are indicated by a + in column 1.
Text is not case sensitive.
Numeric elds may be specied as computed values using expressions involving GAMS param-
eters or constants. Fields based on computed values must must be enclosed in parentheses.
4.3 MPSGE Keywords
There are nine MPSGE keywords which appear in an MPSGE model declaration. These are
$MODEL:modelID This statement assigns an identier to the present model. This must be the rst
statement within the $ontext-$offtext block. MPSGE treats all records appearing prior to
the $MODEL keyword within the $ontext-$offtext block as comments.
modelID must be both a legitimate GAMS model identier and a valid le name. This name
is used to form modelID.GEN. (This le name must be upper case when running under Linux
or UNIX).
$SECTORS:, $COMMODITIES:, $AUXILIARY:, $CONSUMERS: These four keywords dene the vari-
ables which are used to dene the MPSGE model. Entries in these blocks share the same
syntax.
The $SECTORS keyword does not appear in models without production (pure exchange economies).
The $AUXILIARY keyword is only used in models with side constraints and endogenous taxes
or rationed endowments.
$PROD:sector This statement indicates the start of a set of records which dene technology and
taxes for a particular activity.
$DEMAND:consumer This statement indicates the start of a set of records which dene initial en-
dowments and preferences for consumers in the model. The representation of preferences and
technology follow a similar syntax, based on the calibrated share form of nested CES functions.
$REPORT: This statement indicates the start of a set of records which dene GAMS variables through
which MPSGE returns producer inputs, producer outputs and/or consumer demand. The
variables dened in $REPORT blocks may not be used in model equations.
$CONSTRAINT:auxiliary This statement species the equilibrium condition which is to be asso-
ciated with a particular auxiliary variable. Equilibrium conditions are written following the
conventional rules for expressing equations in GAMS. An auxiliary constraint may include vari-
ables which correspond to commodity prices, production activity levels and consumer incomes.
Auxiliary constraints may not refer to $REPORT variables.
4.4 Variable Declarations
A conventional GAMS program has a single VARIABLE statement for declaring the variables which
are to appear in a given model. MPSGE requires that variables be declared according to their
specic role in a model. The four MPSGE keywords $SECTORS:, $COMMODITIES:, $CONSUMERS: and
100
$AUXILIARY: therefore refer to the four dierent types of unknowns which may appear in a general
equilibrium model.
When variables are dened according to their classication the compiler is then able to verify that
when a variable appears within a function declaration it is properly referenced.
Here is a typical declaration block, one that refers to three classes of production activities in a given
model:
$SECTORS:
Y(R,T) ! Output in region R in period T
K(T) ! "Aggregate capital stock, period T"
I0 ! Base year investment
One dierence between VARIABLE declarations in GAMS and variable declarations in MPSGE is that
in the MPSGE syntax trailing comments (signied by !) are interpreted as variable descriptors
which subsequently appear in the solution listing. The equivalent GAMS declaration for these
variables would be:
VARIABLES
Y(R,T) Output in region R in period T
K(T) "Aggregate capital stock, period T"
I0 Base year investment;
As with the usual GAMS syntax, when a variable descriptor contains a punctuation symbol such as
,, it is required to enclosed in quotes.
4.4.1 Domain Restriction
MPSGE is designed so that all and only those variables which are declared are actually employed
in a particular model. This form of explicit declaration helps to catch nuisance bugs in large-
dimensional datasets.
The explicit declaration feature in MPSGE means that wildcard declarations, such as X(*,*,*)
are not permitted. It also means that some care must be exercised when a database includes missing
goods. Considerd, for example, a model in which g is the set of goods in the underlying database,
and P(g) is the associated vector of prices for these commodities. If a subset of the goods are missing
from the database, then the declaration of P(g) must be restricted to those goods which are actually
appear in the model. If y0(g) is a vector in which a value of zero indicates that the associated good
is not in the dataset. Appropriate declaration for the price vector could then be:
$COMMODITIES:
P(g)$y0(g) ! Commodity price vector
Detailed cross-checking can be somewhat annoying for users accustomed to the conventional algebraic
GAMS syntax in which the declared domain of a variable may include many more scalar elements
than are actually used in the model.
In order to simplify the declaration of irregular domains for variables in MPSGE the declaration
syntax accomodates the GAMS conditional operator $. The condition expression following the
101
dollar sign is passed through to the GAMS compiler and must conform to conventional GAMS syntax
rules for exceptions.
To illustrate how this might work in a more complicated situation, suppose that a dynamic, multi-
sectoral, multi-regional model accounts for the production of good i in region r and time period
t with X(i,r,t). Suppose that base year production levels are given by x0(i,r), and suppose,
furthermore, that the model includes an upper bound on production in later periods given by
u(i,r,t).
We would then only want to declare X(i,r,t) when both x0(i,r) and u(i,r,t) are nonzero. The
MPSGE declaration to do this could be:
$SECTORS:
X(i,r,t)$(min(x0(i,r),u(i,r,t)) > 0) ! Production levels
The computed conditional ($()) is handy because it avoids the need to introduce any additional
symbols into the program. If, however, the same conditional restriction appears at several points in
a model it may be helpful to dene a set with which to control declarations for several variables.
Suppose, for example that in the previous example there are several variables associated with the
production of good i in region r in time period t. The GAMS code might then introduce a dynamic
tuple:
SET IX(i,r,t) Active production sectors;
IX(i,r,t) = YES$(min(X0(i,r),U(i,r,t)) > 0);
We then could, for example, have declarations such as:
$SECTORS:
X(i,r,t)$IX(i,r,t) ! Production levels
...
$COMMODITIES:
PX(i,r,t)$IX(i,r,t) ! Output prices
RK(i,r,t)$IX(i,r,t) ! Capital returns
...
4.5 Function Declarations
A general equilibrium model is based on technology, preferences, policy instruments (most notably
tax rates) and primary factor endowments. Technology and policy instruments are described in
$PPROD blocks. Preferences and primary factor endowments are described in $DEMAND blocks.
4.5.1 $PROD Block Syntax
Most of the power and subtleties of the MPSGE framework for applied general equilibrium anal-
ysis centers on the $PROD tables. The information conveyed in a $PROD block includes which is
characterized:
102
Reference quantities for inputs and outputs.
Reference producer prics of inputs and outputs.
Exogenous taxes applied to inputs and outputs.
Endogenous taxes applied to inputs and outputs.
The nested constant elasticity of substitution (CES) / constant elasticity of transformation
(CET) elasticity structure at the reference point.
All records in a $PROD block must begin with either an I: or O: record. The recognized labels in
these records within a $PROD block include:
Q: Reference quantity. Default value is 1. When specied, it must be the second eld, immediately
following I: or O:.
P: Reference price. The default value of the reference price is 1.
A: Tax revenue agent. This eld must be followed by a consumer name.
T: Tax rate eld identier. (More than one tax may apply to a single entry.)
N: Endogenous tax. This label must be followed by the name of an auxiliary variable.
M: Endogenous tax multiplier. The advalorem tax rate is the product of the value of the endogenous
tax and this multiplier.
va:, kle:, etc. Nesting assignments referencing identiers introduced in the $PROD record. Only
one such label may be applied at a time, although several nesting assignemnts may be included
on a given line when exception operators identify only a single nest assignment to be included.
At an abstract level, the MPSGE representation of technology can be thought of as a second-order
Taylor approximation to the underlying production function at the benchmark point. A second
order approximation to f(x) might be written:
Q(x) = f( x) +f
( x)(x x) + (x x)
f(x)|
x= x
2
(x x) +o(x x)
3
The intercept term, f( x), corresponds to the values which appear in the Q: elds these values
correspond to a feasible point in the space of inputs and outputs, the point at which the technology
is evaluated. The slope term, f
@
@
@
@
@
@
@
@
`
s:esub
@
@
@
`
`
I:PY(g) Q:yx0(g)
I:PK Q:kx0 P:pk0
I:PL Q:lx0 P:pl0
id:0 va:esub/5
The rst record in the $PROD block contains the nest identier for top level inputs (a reserved name),
s:. The record introduces two new nest identiers, a: and va:. These nest identiers are arbitrary
names with up to four characters. The nest identier for top level outputs is t:. Both t: and s:
are reserved names.
In the $PROD block shown here, commodities PY(g) enter jointly in xed proportions in nest id:,
while labor ( PL) and capital (PK) enter as part of the value-added nest (va:).
Provided that esub is not equal to 1 or 5, the function form described by this $PROD block could be
written in conventional algebraic format as:
x = f(y, K, L) =
_
min
g
(y
g
)
+ (1 ) (L
+ (1 )K
)
/
_
1/
In this function = 1-1/esub and =1-5/esub. The share parameters, in the function, and
could be dened on the basis of data in the $PROD block, but their values are messy and dicult to
derive. Given the values of those share parameters, however, the value of can be calibrated using
base year output.
The values of share parameters (, , and ) are chosen such that a solution to the following problem
is consistent with the benchmark point. That is, if we solve:
minimize PL * L + PK * K + SUM(g, PY(g) * y(g))
subject to f(y,K,L) = x0
the optimal value is L=lx0, K=kx0, y(g)=yx0(g). The key idea here is that when the functional form
is calibrated to a reference price-quantity point, then if we evaluate the cost-minimization problem
at the same price point we get back the benchmark quantity point.
105
4.5.4 $PROD Block Multi-level Nesting
CES and CET functions can be nested to arbitrary depth in MPSGE. It is somewhat rare to nd
applications in which functions are nested deeper than three levels, but instances can arise where
this is required. A typical application of deeply nested function is in the representation of energy
demand.
Here is a simple example of a function with multiple levels of nesting:
X = min
_
min
g/ E
(
y
g
a
g
),
_
_
K
L
1
_
+ (1 )
_
y
E
y
1
N
_
_
1/
_
in which electric and nonelectric energy form the set E{E, N}.
The nesting tree is dene in the $PROD record through the introduction of pointers to the parent
nest for the kl and en nests (the name of the parent node in the nesting tree is listed in paretheses
immediately after the nest identier, e.g. kl(e) and en(e)).
The tricky bit in representing this function in MPSGE is the assignment of P("N") and P("E") to
the EN: nest. Conditional assignments may be applied to nest assignments for inputs and outputs.
This permits arbitrary assignments of elements from a single vector input to multiple nests. Here is
the MPSGE representation of this function:
set en(g) Electric and non-electric energy /E, N/;
...
$PROD:X s:esub id:0 e:sigma kl(e):1 en(e):1
O:PX Q:x0
I:P(g) Q:yx0(g) id:$(not en(g)) en:$en(g)
I:PL Q:lx0 P:pl0 kl:
I:PK Q:kx0 P:pk0 kl:
Here is a graphical representation of the MPSGE function as a nesting tree:
@
@
@
@
@
@
@
@
@
@
@
@
`
s:0
@
@
@
`
id:0
`
e:sigma
`
kl:1
`
en:1
@
@
@
O:PX Q:x0
I:PK Q:kx0 I:P("E") Q:yx0("E")
I:PL Q:lx0 I:P("N") Q:yx0("N") I:P(g) Q:yx0(g)
g / {E, N}
4.5.5 $PROD Block Joint Outputs
The following production function describes a production function which produces goods D and E
as joint products:
106
$PROD:E t:eta
O:PD Q:d0 P:pd0
O:PE Q:e0 P:pe0
I:PY Q:y0
The rst record in this $PROD block species a value for t:, the top-level elasticity of transformation.
Commodities with prices PD and PE are produced using inputs of the commodity with price PY.
The functional form described by this $PROD block could be written in conventional algebraic format
to express Y inputs as a function of D and E outputs:
y = g(D, E) = (D
1+
+ (1 )E
1+
)
/(1+)
As in the case of elastic inputs, the calibrated values of is chosen such that a solution to the
producer maximization problem when faced with benchmark prices (PD = PE = 1) corresponds to
the benchmark quantities. The scale factor is then assigned:
= y
_
D
1+
+ (1 )
E
1+
_
1/(1+
This means that the optimal solution to the problem:
maximize D + E
subject to g(D,E) = y0
is D=d0 and E=e0. The CET functional form is calibrated to a reference price-quantity point, then
if we evaluate the cost-minimization problem at the same price point we get back the benchmark
quantity point.
4.5.6 Taxes on Inputs in a $PROD Block
An input record in a production block may contain the following elds related to ad-valorem taxes:
A: Tax revenue agent. This eld must reference a consumer name.
T: Tax rate eld identier. (More than one tax may apply to a single entry.)
N: Endogenous tax. This label must be followed by the name of an auxiliary variable.
M: Endogenous tax multiplier. The advalorem tax rate is the product of the value of the endogenous
tax and this multiplier.
Rules relating to the application of taxes on inputs are as follows:
A tax revenue agent must be specied prior to a T: or N: eld. One important extremely
valuable sevice provided by MPSGE is that taxes may not be applied without consistent ac-
counting of associated tax revenue in consumer incomes. A tax therefore cannot be introduced
without have specifying a consumer which receives the revenue.
107
If revenue from a particular tax is to be paid to more than one consumer, then two (or more)
tax elds may be introduced on a single input with revenue accruing to dierent consumers.
In the following example two taxes are applied on the input of PL, one of which accrues to
consumer FED (the federal government) and another which accrues to consumer STATE (the
state government):
I:PL Q:l0 A:FED T:tlfica A:STATE T:tlinc
The tax rate on an input is evaluated on a net basis. The user cost of an input is the market
(net) price marked up by all applicable taxes. In the previous example the user cost of labor
is given by:
PLUSER = PL * (1 + tlfica + tlinc)
The net tax must be greater than -1, i.e. the user cost of any input must be positive.
Endgenous taxes are described by a pair of elds, labelled N: and M:. The N: eld identies
the auxiliary variable which is proportional to the tax rate, and the M: eld indicates the
proportionality factor. Consider the input record:
I:PL Q:l0 A:FED N:TFED M:tlfica A:STATE N:TSTATE M:tlinc
In this case the user cost of labor is given by:
PLUSER = PL * (1 + TFED * tlfica + TSTATE * tlinc)
4.5.7 Taxes on Outputs in a $PROD Block
An output record in a production block may contain elds relating to proportional taxes:
A: Tax revenue agent. Must be followed by a consumer name.
T: Tax rate eld identier. (More than one tax may apply to a single entry.)
N: Endogenous tax. This label must be followed by the name of an auxiliary variable.
M: Endogenous tax multiplier. The advalorem tax rate is the product of the value of the endogenous
tax and this multiplier.
Rules relating to the application of taxes on outputs are as follows:
A tax revenue agent must be specied prior to a T: or N: eld.
If revenue from a particular tax is to be paid to more than one consumer, then two (or more)
tax elds must be introduced. In the following example two taxes are applied on the output of
PX, one of which accrues to consumer FED (the federal government) and another which accrues
to consumer STATE (the state government):
I:PX Q:l0 A:FED T:tvat A:STATE T:tsales
108
The tax rate on an output is evaluated on a gross basis. The user price of an output is
the market (gross) price marked down by all applicable taxes. In the previous example the
producer price of X is given by:
PXUSER = PX (1 - tvat - tsales)
The gross tax must be less than 1, i.e. the producer price of any output must be positive.
Endgenous taxes are described by a pair of elds, labelled N: and M:. The N: eld identies
the auxiliary variable which is proportional to the tax rate, and the M: eld indicates the
proportionality factor. Consider the output record:
I:PX Q:l0 A:FED N:TFED M:tvat A:STATE N:TSTATE M:tsales
In this case the user cost of labor is given by:
PXUSER = PX * (1 - TFED * tvat - TSTATE * tsales)
4.5.8 Modeling technical change
Suppose that good X is produced using inputs of K and L. Write the production function in calibrated
share form:
X = X0 * (theta * (L/L0)**rho + (1-theta) * (K/K0)**rho)**(1/rho)
At reference prices PL0, PK0, the demands for labor and capital are L0 and K0, and the level of
output is X0.
We use this point to dene the value share, i.e.
theta = PL0*L0/(PL0*L0+PK0*K0)
Now, suppose we have a technical change parameter which is labor augmenting, so:
X = X0 * (theta * (L*gamma/L0)**rho + (1-theta) *(K/K0)**rho)**(1/rho) > where gamma>1.
We can alter the function by setting L0=L0/gamma, but we need to hold theta constant. The
problem (when using MPSGE) is that L0 is used to compute theta. In order to alter L0 while
holding theta xed, we let PL0=gamma*PL0.
In the MPSGE program, technical change then is represented as:
$PROD:X s:esub
O:PX Q:X0
I:PL Q:(L0/gamma) P:(PL0*gamma)
I:PK Q:K0 P:PK0
109
The intuitive explaination for introducing gamma in the reference price is that this incorporates
the rebound eect which is commonly part of technical change. Car engines get more ecient
with the introduction of CAFE standards, so people drive more and gasoline demand is virtually
unaected. Economic eects once again thwart well intentioned environmental policy!
4.5.9 $DEMAND Block Syntax
A demand block provides reference commodity demands and primary factor endowments for con-
sumers. These blocks eectively characterize nal demand, as they describe both initial endowments
and preferences. The information provided in a $DEMAND block includes:
Reference quantities of demanded goods.
Reference prices of demanded goods.
Endowment quantities with optional rationing multipliers
Elasticity nesting structure for nal demand.
The income level of any conssumer is the sum of factor income and tax revenue income. Tax revenue
is determined by the level and assignment of taxes on producer inputs and outputs. Those income
ows are not repeated in the $DEMAND block which only describes initial endowment income.
The recognized labels in an D: (reference demand ) record within a $DEMAND block include:
Q: Reference demand quantity. Default value is 1. When specice, the Q: eld must be the second
eld in the record, follow immediately after the D: eld.
P: Reference demand price. Default value is 1.
The recognized labels in an E: (endowment) record include:
Q: Reference quantity.
R: Rationing instrument indicating an auxiliary variable.
4.5.10 Applying Taxes on Final Demand
In MPSGE taxes may not be applied directly to consumer demands. If a sales tax is to be applied on
consumer demand, it is necessary to incorporate a aggregate consumption good and consumption
activity though which to apply the tax.
Let us illustrate with an example. The following demand block is invalid because a tax eld (T:) is
not recognized in a D: record:
$DEMAND:HH
D:P(g) Q:c0(g) P:pc0(g) A:GOVT T:tc(g)
E:W(f) Q:e0(f)
Alternatively, the logical framework presented here may be easily represented using a production
function for aggregate utility and an associated price indes:
110
$PROD:U
O:PU Q:u0
I:P(g) Q:c0(g) P:pc0(g) A:GOVT T:tc(g)
$DEMAND:HH
D:PU
E:W(f) Q:e0(f)
in which u0 = SUM(g, c0(g)*pc0(g)).
4.5.11 Classical Unemployment with Rationed Endoments
The R: eld is only used in an endowment record. The R: eld is used to ration a commodity
endowment using an auxiliary variable. The simplest example of how this might work is classical
unemployment. A model with full employment might have a demand block such as:
$DEMAND:HH
D:PC Q:c0
E:PL Q:l0
E:RK Q:k0
It might be of interest to perform an equilibrium calculation in which the wage rate is assumed
to be downward rigid. This is done in MPSGE by adding an auxiliary variable u representing the
unemployment rate. Here is what the demand function then looks like:
$DEMAND:HH
D:PC Q:c0
E:PL Q:l0
E:PL Q:(-l0) R:U
E:RK Q:k0
$CONSTRAINT:U
PL =G= PC;
The auxiliary variable removes workers from the labor market as it increases from 0. The number of
workers who are unemployed is chosen such that the real wage (the price of labor in terms of units
of nal consumption) remains xed with a value of unity. (The equation would be written literally
as PL/PC = 1 but this could create problems with divide by zero, and for this reason it is better
expressed as a linear function.
4.6 Constraints
Auxiliary constraints in MPSGE models conform to standard GAMS equation syntax. The may refer
to any of the four classes of variables, $SECTORS, $COMMODITIES, $CONSUMERS and $AUXILIARY, but
they may not reference variables names declared within a $REPORT block.
Complementarity conditions apply to upper and lower bounds on auxiliary variables and the asso-
ciated constraints. For this reason, the orientation of the equation is important. When an auxiliary
variable is designated POSITIVE (the default), the auxiliary constraint should be expressed as a
greater or equal inequality (=G=). If an auxiliary variable is designated FREE, the associated
constraint must be expressed as an equality (=E=).
111
$CONSTRAINT:TAU
G =G= X * Y;
$CONSTRAINT:MU(I)$MU0(I)
MU(I) * P(I) * Q(I) =G= SUM(J, THETA(I,J) * PX(J));
The exception applied in this example restricts the equation only to those elements of set I for which
MU0(I) is not zero.
4.7 Report Variables
The GAMS interface to MPSGE normally returns level values only for the central variables - those
declared within $SECTORS:, $COMMODITIES:, $CONSUMERS: and $AUXILIARY: sections. An equilib-
rium determines not only these values, but also levels of demand and supply by individual sectors
and consumers. Given benchmark information, elasticities and the equilibrium values, all such de-
mands can be computed, but this can be tedious to do by hand. In order to have these values
returned by MPSGE it is necessary to indicate the name of the variable into which the value is to
be returned.
The general form is as follows:
$REPORT:
V:variable name I:commodity PROD:sector
V:variable name O:commodity PROD:sector
V:variable name D:commodity DEMAND:consumer
V:variable name W:consumer
The rst row returns an input quantity, the second row returns an output quantity, the third returns
a demand quantity, and the fourth row returns a consumer welfare index. (Note: the level value
returned for a $CONSUMER variable is an income level, not a welfare index.)
$REPORT:
V:DL(S) I:PF("L") PROD:Y(S)
V:DK(S) I:PF("K") PROD:Y(S)
V:SX(G,S)$SX0(G,S) O:PX(G) PROD:X(S)
V:D(G,H) D:P(G) DEMAND:RA(H)
V:W(H) W:RA(H)
Note that the $ exception is only meaninful on the rst entry. Also notice that the domain of the
report variable must conform to the domain of the subsequent two entries.
N.B. Report variables are provided only for returning equilibrium demand and supply quantities.
These variables may not be reference in auxiliary constraints.
112
4.8 Exception Handling
The GAMS exception operator can be used on virtually any entry in the MPSGE input le. For
example, if you want to have sector X(S) have one production structure for elements S in a subset
T(S), you can provide separate production function declarations as follows:
$PROD:X(S)$T(S)
... ! sector X described for S in T
$PROD:X(S)$(NOT T(S))
... ! sector X described for S not in T.
4.9 Switches and Debug Output
Run-time tolerances and output switches may be specied within the vector-syntax model specica-
tion or using the PUT facility, they can be written directly to the MPS input le. Output switches
control the level of debug output written by the MPSGE subsystem to the solver status le. Reports
provided by $ECHOP, $FUNLOG and $DATECH can be returned to the listing le by specifying OPTION
SYSOUT=ON; within the GAMS program prior to the SOLVE statement. The recognized MPSGE
parameters are:
$ECHOP: logical Default=.FALSE.
is a switch for returning all or part of the scalar MPSGE le to the solver status le. In order to
have this output printed in the listing le, enter the GAMS statement OPTION SYSOUT=ON; prior
to solving the model.
$PEPS: real Default=1.0E-6
is the smallest price for which price-responsive demand and supply functions are evaluated. If a
price is below PEPS, it is perturbed (set equal to PEPS) prior to the evaluation.
$EULCHK: logical Default=.TRUE.
is a switch for evaluating Eulers identity for homogeneous equations. The output is useful for
monitoring the numerical precision of a Jacobian evaluation. When a price or income level is
perturbed in a function, the Euler check may fail.
$WALCHK: logical Default=.TRUE.
is a switch for checking Walrass law. Like EULCHK, this switch is provided primarily to monitor
numerical precision. When an income level is perturbed, the Walras check may fail.
113
$FUNLOG: logical Default=.FALSE.
is a switch to generate a detailed listing of function evaluations for all production sectors and
consumers.
FUNLOG triggers a function evaluation report which provides detailed output describing the evaluation
of supply and demand coecients. The information provide is sucient that an industrious graduate
student should be able to reproduce the results (given a pencil, paper and slide rule).
The evaluation report has the following headings:
T Coecient type with the following interpretation:
IA Input aggregate
OA Output aggregate
I Input
O Output
D Demand
E Endowment
N Name (either nest identier or commodity name)
PBAR Benchmark price (the P: eld value)
P Current price (gross of tax)
QBAR Benchmark quantitity (the Q: eld value)
Q Current quantity
KP Identier for parent entry in nesting structure.
ELAS Associated elasticity (input or output aggregates only)
When $FUNLOG:.TRUE is specied, a complete report of demand and supply coecients for every
production and demand function in every iteration. Be warned that with large models this can
produce an enrmous amount of output!
$DATECH: logical Default=.FALSE.
is a switch to generate a annotated listing of the function and Jacobian evaluation including a
complete listing of all the nonzero coecients.
MPSGE generates an analytic full rst-order Taylor series expansion of the nonlinear equations in
every iteration. Nonzero elements of the Jacobian matrix are passed to the system solver (MILES
or PATH) which uses this information in the direction-nding step of the Newton algorithm. Coef-
cients are produced with codes which help interpret where they came from. The following codes
are used:
114
W0 indicates an element from the orthogonal part of F().
W1 indicates an element from the non-orthogonal part of F().
B indicates a linear term from F.
E0 indicates a homogeneous Jacobian entry.
E1 indicates a non-homogeneous Jacobian entry.
The Euler checksum examines elements from the linearization which are type E0. The Walras
check sum examines elements from the function evaluation which are type W0.
Needless to say, the $DATECH:.TRUE. switch produces a very big status le for large models. It is
not something which is very useful for the casual user.
115
116
5. Three Small MPSGE Models
5.1 Overview
This section of the paper introduces MPSGE model building using a two- good, two-factor (2x2)
example. This is addressed to readers who may be unfamiliar with GAMS and/or the original
(scalar) MPSGE syntax. The discussion provides some details on the formulation and specication
of one small model from the MPSGE library. Subsequently, two extensions are presented, one which
illustrates equal yield constraints and another which introduces a pure public good. These examples
are by no means exhaustive of the classes of equilibrium structures which can be investigated using
the software, but they do provide a starting point for new users.
The structure of MPSGE model HARBERGER is generic Arrow-Debreu with taxes. Households
obtain income by supplying factors of production to industry or collecting tax revenue. This income
is then allocated between alternative goods in order to maximize welfare subject to the budget
constraint.
Firms operate subject to constant returns to scale, selecting factor inputs in order to minimize cost
subject to technological constraints. For an algebraic description of a model closely related to this
one, see Shoven and Whalley (1984). The present model diers in two respects from the Shoven-
Whalley example. First, in this model there are intermediate inputs to production while in the
Shoven-Whalley model goods are produced using only value-added. Second, this model incorporates
a labor-leisure choice so that the excess burden of factor taxes here incorporates the disincentive to
work associated with a lower net wage.
5.2 Benchmark Data
The following table presents most of the input data for a two good, two factor, closed economy
model. This is an economy in which, initially, taxes are levied only on capital inputs to production.
We treat tax revenue as though it were returned lump-sum to the households.
Sectors Consumers
----------------------------------------------------
X Y OWNERS WORKERS GOVT
----------------------------------------------------
PX 100 -20 -30 -50
PY -10 80 -40 -30
PK -20 -40 60
PL -50 -10 60*
----------------------------------------------------
TK -20 -10 30
TRN 10 20 -30
----------------------------------------------------
117
* 60 = labor endowment net leisure demand= 100 - 40
The input data is presented in the form of a balanced matrix, the entries in which represent the
value of economic transactions in a given period (typically one year). Social accounting matrices
(SAMs) can be quite detailed in their representation of an economy, and they are also quite exible.
All sorts of inter-account taxes, subsidies and transfers can be represented through an appropriate
denition of the accounts.
5.2.1 Rectangular Social Accounts
Traditionally, a SAM is square with an exact correspondence between rows and columns. (For
an introduction, see Pyatt and Round, Social Accounting Matrices: A Basis for Planning, The
World Bank, 1985.) The numbers which appear in a conventional SAM are typically positive,
apart from very special circumstances, whereas the rectangular SAM displayed in Figure 1 follows
a sign convention wherein supplies or receipts are represented by positive numbers and demands or
payments are represented by negative numbers. Internal consistency of a rectangular SAM implies
that row sums and column sums are zero. This means that supply equals demand for all goods and
factors, tax payments equal tax receipts, there are no excess prots in production, the value of each
household expenditure equals the value of factor income plus transfers, and the value of government
tax revenue equals the value of transfers to households.
With simple MPSGE models, it is convenient to use a rectangular SAM format. This format empha-
sizes how the MPSGE program structure is connected to the benchmark data. In the rectangular
SAM, we have one row for every market (traded commodity), one column for every production
sector, and one column for every consumer. Benchmark equilibrium is reected in the row and
column sums. Columns corresponding to sectors sum to zero reecting zero excess prot (the value
of output equals the cost of inputs). Columns corresponding to consumers sum to zero indicating
income balance. Rows sum to zero indicating market clearance.
In the present model, there are four markets, for goods X and Y and factors L and K; two production
sectors (X and Y) and three consumers (OWNERS, WORKERS and GOVT).
5.3 Partitioning the Social Accounts
Consider a generalized version of the model in which the set of production sectors be denoted S
(here, S = {X,Y} ). Let the set of goods be G. Production sectors are mapped one-to-one with the
goods, so we see that sets S and G are in fact the same set. Let F denote the set of primary factors
(here, F={L,K}), and let H denote the set of households (here H={OWNER,WORKER}).
Now that we have identied the underlying sets, we may interpret the input matrix as a set of
parameters with which we can easily specify the benchmark equilibrium. It is quite common to
begin a general equilibrium modelling project with a large input-output Figure or social accounting
matrix which may then be mapped onto a number of submatrices, each of which is dimensioned
according to the underlying sets used in the model.
It should be emphasized at this point that there is an enormous dierence between Figures 1 and
2. While Figure 1 concisely represents an equilibrium for a single two-sector model, Figure 2 rep-
resents an arbitrary set of commodities, factors, production sectors and households. Scalability is
an enormous advantage of the GAMS/MPSGE modeling environment. Model implementation and
118
debugging can be conducted on a tiny prototype, and then the same computer code can be employed
with a large-scale dataset.
Sectors Consumers
------------------------------------------
(S) Households(H) Government
------------------------------------------
Goods Markets (G): A(G,S)-B(G,S) -C(G,H)
Factor Markets (F): -FD(F,S) E(F,H)-D(F,H)
Capital taxes: -T("K",S) GREV
Transfers: TRN(H) -GREV
5.4 Extracting Data from the Social Accounts
The GAMS specication of benchmark data is presented in Figure 3 which begins with a statement
of the underlying sets (G, F, H). The statement ALIAS (S,G); simply says that S and G both
reference {X,Y}. Thereafter follows the social accounting data table and declarations for the various
submatrices. The parameters ELAS() and ESUB() are elasticities (free parameters) which can be
chosen independently from the benchmark accounts. The parameters TF and PF are calibrated tax
and reference price arrays which are computed given benchmark factor and tax payments. (In this
model, average and marginal tax rates are not distinguished, so the benchmark marginal tax rate is
simply the tax payment divided by the net factor income.)
A general equilibrium model determines only relative prices. For purposes of reporting or construct-
ing value-indices, we use a Laspeyres quantity index, THETA(G), the elements of which correspond
to shares of aggregate consumer expenditure in the benchmark period.
1
2 * SECTION (i) DATA SPECIFICATION AND BENCHMARKING
3
4 SETS G GOODS AND SECTORS /X, Y/,
5 F PRIMARY FACTORS /K, L/,
6 H HOUSEHOLDS /OWNER, WORKER/;
7
8 ALIAS (S,G);
9
10 TABLE SAM(*,*) SOCIAL ACCOUNTING MATRIX
11
12 X Y OWNER WORKER GOVT
13 X 100 -20 -30 -50
14 Y -10 80 -40 -30
15 K -20 -40 60
16 L -50 -10 60
17 TK -20 -10 30
18 TRN 10 20 -30
19
20
21 PARAMETER
22 A(S) BENCHMARK OUTPUT
23 B(G,S) USE MATRIX (GOODS INPUTS BY SECTOR)
24 C(G,H) HOUSEHOLD DEMAND
25 FD(F,S) FACTOR DEMAND BY SECTOR
119
26 E(F,H) FACTOR ENDOWMENTS
27 D(F,H) FACTOR DEMAND BY HOUSEHOLDS
28 T(F,S) TAX PAYMENT BY FACTOR BY SECTOR
29 TRN(H) TRANSFER REVENUE
30 ELAS(S) ELASTICITY OF SUBSTITUTION IN PRODUCTION
31 ESUB(H) ELASTICITY OF SUBSTITUTION IN DEMAND
32 GREV BENCHMARK GOVERNMENT REVENUE
33 TF(F,S) FACTOR TAX RATE
34 PF(F,S) BENCHMARK FACTOR PRICES GROSS OF TAX
35 THETA(G) WEIGHTS IN NUMERAIRE PRICE INDEX
36 WBAR(H) BENCHMARK WELFARE INDEX;
37
38 * EXTRACT DATA FROM THE SOCIAL ACCOUNTING MATRIX:
39
40 A(S) = SAM(S,S); B(G,S) = MAX(0, -SAM(G,S));
41 C(G,H) = -SAM(G,H); FD(F,S) = -SAM(F,S);
42 E(F,H) = SAM(F,H); D(F,H) = 0;
43 T("K",S) = -SAM("TK",S); TRN(H) = SAM("TRN",H);
44
45 * INSTALL "FREE" ELASTICITY PARAMETERS:
46
47 E("L","WORKER") = 100; D("L","WORKER") = 40;
48 ELAS(S) = 1; ESUB(H) = 0.5;
49
50 * INSTALL FUNCTIONS OF BENCHMARK VALUES:
51
52 GREV = SUM(H, TRN(H));
53 TF(F,S) = T(F,S) / FD(F,S);
54 PF(F,S) = 1 + TF(F,S);
55 THETA(G) = SUM(H, C(G,H));
56 THETA(G) = THETA(G) / SUM(S, THETA(S));
57 WBAR(H) = SUM(G, C(G,H)) + SUM(F, D(F,H));
5.5 The MPSGE Model
The MPSGE description of this model is shown in Figure 4. Declarations following the $MODEL
statement indicate that the model involves one class of production activities (AL(S)), three classes
of commodities (P(G), W(F) and PT), and two types of consumers, private consumers (RA(H) ), and
a government consumer (GOVT).
One $PROD: block describes the single class of production activities, and two $DEMAND: blocks
characterize endowments and preferences for the two classes of consumers.
Consider the records associated with production sector AL(S). The entries on the rst line of a $PROD:
block are elasticity values. The s:0 eld indicates that the top-level elasticity of substitution
between inputs is zero (Leontief). The entry va:ELAS(S) indicates that inputs identied as
belonging to the va: aggregate trade o with an elasticity of substitution ELAS(S) (at the second
level of the production function). In these production functions, the primary factors (W(F)) are
identied as entering in the va: aggregate.
The nesting assignments within an MPSGE model can be easily modied by the assignment of inputs
to aggregates, as has been done in this model using the va: nest. This exibility is very helpful
when testing robustness with respect to changes in the elasticity structure of a model. (A note on
syntax: nesting identiers are limited to four characters.)
1
2 * SECTION (ii) MPSGE MODEL DECLARATION
120
3
4 $ONTEXT
5
6 $MODEL:HARBERGER
7
8 $SECTORS:
9 AL(S)
10
11 $COMMODITIES:
12 P(G) W(F) PT
13
14 $CONSUMERS:
15 RA(H) GOVT
16
17 $PROD:AL(S) s:0 va:ELAS(S)
18 O:P(S) Q:A(S)
19 I:P(G) Q:B(G,S)
20 I:W(F) Q:FD(F,S) P:PF(F,S) A:GOVT T:TF(F,S) va:
21
22 $DEMAND:RA(H) s:1 gds:ESUB(H)
23 D:P(G) Q:C(G,H) gds:
24 D:W(F) Q:D(F,H)
25 E:W(F) Q:E(F,H)
26 E:PT Q:TRN(H)
27
28 $DEMAND:GOVT
29 D:PT Q:GREV
30
31 $REPORT:
32 V:CD(G,H) D:P(G) DEMAND:RA(H)
33 V:DF(F,H) D:W(F) DEMAND:RA(H)
34 V:EMPLOY(S) I:W("L") PROD:AL(S)
35 V:WLF(H) W:RA(H)
36
37
38 $OFFTEXT
39
40 * Invoke the preprocessor to declare the model for GAMS:
41
42 $SYSINCLUDE mpsgeset HARBERGER
43
44
45 * ------------------------------------------------------------------
46 * SECTION (iii) BENCHMARK REPLICATION
47
48 HARBERGER.ITERLIM = 0;
49 $INCLUDE HARBERGER.GEN
50 SOLVE HARBERGER USING MCP;
51 ABORT$(ABS(HARBERGER.OBJVAL) GT 1.E-4)
52 "*** HARBERGER benchmark does not calibrate.";
53 HARBERGER.ITERLIM = 1000;
54
5.5.1 Comments Regarding the Model
The records within a $PROD: block begin with O: or I:. An O: indicates an output and an
I: represents an input. In both types of records, Q: is a quantity eld indicating a reference
input or output level of the named commodity. A P: signies a reference price eld. This price
is measured as a user cost, gross of applicable taxes. The default values for reference price and
reference quantity are both unity (i.e., a value of 1 is installed if a P: or Q: eld is missing).
121
The va: and T: elds in a $PROD: block indicate tax agent and ad-valorem tax rate, respectively.
The tax agent is specied before the tax rate. A single input or output coecient may have two
or more taxes applied. Consumers are treated symmetrically, and there is thus no restriction on
the consumer to whom the tax is paid. Typically, however, one consumer is associated with the
government.
To better understand the relationship between reference prices and base year tax rates, consider
inputs of W.K to sector AL.X in this model. The benchmark payment to capital in the X sector is 20
and the tax payment is 20. Hence the ad-valorem tax rate in the benchmark equilibrium is 100%
(T:1), and the reference price of capital, market price of unity times (1 + 100%), is 2 (P:2). If in a
counterfactual experiment the tax rate on capital inputs to sector X is altered, this will change the
T: eld but it will not change the P: eld. Q: and P: characterize a reference equilibrium point,
and these are therefore unaected by subsequent changes in the exogenous parameters.
It is important to remember that the $PROD:AL(S) block represents as many individual production
functions as there are elements in set S (two in this case). Within the $PROD:AL(S) block, inputs
refer to sets G and F , while the output coecient, O:P(S), refers only to set S. Sets referenced within
a commodity name in an I: or O: eld may be sets which are controlled by the sets referenced
in the function itself, in which case only a scalar entry is produced. In $PROD:AL(S) there are only
outputs of commodity S in sector S.
The rst line of a $DEMAND block also contains elds (e.g., s:, gds:, cl: etc.) which represent
elasticities of substitution. The subsequent records may begin with either an E: eld or a D: eld.
These, respectively, represent commodity endowments and demands. In the demand elds, the P:
and Q: entries are interpreted as reference price and reference quantity, analogous to the input elds
in a $PROD block. Ad-valorem taxes may not be applied on nal demands, so that if consumption
taxes are to be applied in a model they must be levied on production activities upstream of the nal
demand.
The benchmark values for all activity levels and prices are equal to the default value of unity,
and therefore we are able to specify values in the Q: elds directly from the benchmark data. An
equivalent model could be specied in which the benchmark activity levels for AL(S) equal, for
example, A(S,S). This would then require rescaling the input and output coecients for those
sectors, and it would not necessarily be helpful, because in a scaled model it is more dicult to
verify consistency of the benchmark accounts and MPSGE input le. Furthermore, for numerical
reasons it is advisable to scale equilibrium values for the central variables to be close to unity.
Government transfers to households are accomplished through the use of an articial commodity
(PT). The government is identied as the agent who receives all tax revenue (see the A:GOVT entry
in both of the $PROD: blocks). Commodity PT is the only commodity on which GOVT spends this
income, hence government tax revenue is divided between the two households in proportion to their
endowments of the articial good. In order to scale units so that the benchmark price of PT is unity,
the $30 of government tax revenue chases 10 units of PT assigned to OWNER and 20 units assigned to
WORKER. (See values for TRN(H) in Figure 3.)
The $REPORT section of the input le requests the solution system to return values for inputs, outputs,
nal demands or welfare indices at the equilibrium. Only those items which are requested will be
written to the solution le. Each record in the report block begins with a V: (variable name) eld.
These names must be distinct from all other names in the model. The second eld of the report
record must have one of the labels I:, O: or D: followed by a commodity name, or the label W:
followed by a consumer name. The third elds label must be PROD: in an I: or O: record, and it
must be DEMAND: if it is a D: record.
122
5.5.2 MPSGE Formulation: Key Ideas
There are two points regarding the MPSGE function format which are important yet easily misun-
derstood by new users:
(i) The elasticities together with the reference quantities and reference prices of inputs and outputs
completely characterize the underlying nested CES functions. No other data elds in the $PROD:
block alters the technology. If, for example, a tax rate changes as part of a counter-factual experi-
ment, this has no eect on the reference price. The value in the P: eld depends on the benchmark
value of the T: eld if the model has been calibrated, but subsequent changes in T: do not change
the underlying technology.
(ii) Tax rates are interpreted dierently for inputs and outputs. The tax rate on inputs is specied
on a net basis, while the tax rate on outputs is specied on a gross basis. That is, the user cost of
an input with market price p subject to an ad-valorem tax at rate t is p (1 + t), while the user cost
of an output subject to an ad-valorem tax at rate t is p (1 - t). (A tax increases the producer cost
of inputs and decreases the producer value of outputs.)
MPSGE provides a limited number of economic components with which complex models can be
constructed. There are some models which lie outside the MPSGE domain, but in many cases it is
possible to recast the equilibrium structure in order to produce an MPSGE model which is logically
equivalent to the original model - usually after having introduced some sort of articial commodity
or consumer. In the present model, the use of commodity PT to allocate government revenue between
households provides a fairly typical example of how this can be done. In the process of making such
a transformation, one often gains a meaningful economic insight.
5.5.3 Computing Counter-factual Scenarios
The GAMS code shown below species and solves three counterfactual equilibria. In these experi-
ments, the nonuniform system of capital taxes from the benchmark is replaced by three alternative
uniform factor tax structures: a tax on labor, a tax on capital, and a tax on both labor and capital.
In each case, the tax rate is chosen to replace the benchmark tax revenue at benchmark prices and
demand (ignoring induced substitution eects). Following each solution, the equilibrium values for
tax revenue, welfare (Hicksian equivalent variation), employment, prices and output are stored in
parameter REPORT.
1 * ------------------------------------------------------------------
2 * SECTION (iv) COUNTER-FACTUAL SPECIFICATION AND SOLUTION:
3
4 SET SC COUNTERFACTUAL SCENARIOS TO BE COMPUTED /
5 UNIF_L UNIFORM TAX ON LABOR,
6 UNIF_K UNIFORM TAX ON CAPITAL,
7 UNIF_VA UNIFORM VALUE-ADDED TAX/
8
9 PARAMETER TAXRATE(F,S,SC) COUNTERFACTUAL TAX RATES,
10 REPORT(*,*,*,SC) SOLUTION REPORT - % CHANGES,
11 PINDEX PRICE DEFLATOR;
12
13
14 * SPECIFY COUNTER-FACTUAL TAX RATES TO ACHIEVE CETERIS
15 * PARIBUS BALANCED BUDGET:
16
17 TAXRATE("L",S,"UNIF_L") = GREV / SUM(G, FD("L",G));
18 TAXRATE("K",S,"UNIF_K") = GREV / SUM(G, FD("K",G));
19 TAXRATE("L",S,"UNIF_VA") = GREV / SUM((F,G), FD(F,G));
123
20 TAXRATE("K",S,"UNIF_VA") = GREV / SUM((F,G), FD(F,G));
21
22 LOOP(SC,
23
24 * INSTALL TAX RATES FOR THIS COUNTERFACTUAL:
25
26 TF(F,S) = TAXRATE(F,S,SC);
27
28 $INCLUDE HARBERGER.GEN
29 SOLVE HARBERGER USING MCP;
30
31 * ------------------------------------------------------------------
32 * SECTION (v) REPORT WRITING:
33
34 * REPORT SOME RESULTS:
35
36 PINDEX = SUM(G, P.L(G) * THETA(G));
37
38 REPORT("REVENUE","_",SC) = 100 * (PT.L/PINDEX - 1);
39 REPORT("TAXRATE","_",SC) =
40 100 * SMAX((F,S), TAXRATE(F,S,SC));
41 REPORT("WELFARE",H,SC) = 100 * (WLF.L(H) - 1);
42 REPORT("EMPLOY",S,SC) = 100 * (EMPLOY.L(S)/FD("L",S) - 1);
43 REPORT("PRICE",G,SC) = 100 * (P.L(G)/PINDEX - 1);
44 REPORT("PRICE",F,SC) = 100 * (W.L(F)/PINDEX - 1);
45 REPORT("OUTPUT",S,SC) = 100 * (AL.L(S) - 1);
46 );
47 DISPLAY REPORT;
5.6 Alternative Models
The standard MPSGE model is based on xed endowments and tax rates, but many empirical
models do not t into this structure. For example, in the model HARBERGER, the level of each
replacement tax was specied to be consistent with equal yield, but as a result of the endogenous
response of prices and quantities, the resulting tax revenues diered signicantly from the benchmark
levels. For example, when the capital tax is replaced by a uniform labor tax at a rate which, in the
absence of labor supply response, produces equal yield, we nd that tax revenue in fact declines
by 39%. In order to perform dierential (equal yield) tax policy analysis, it is therefore necessary
to accommodate the endogenous determination of tax rates as part of the equilibrium computation.
This is one of many possible uses of auxiliary variables in MPSGE.
5.6.1 Tax Analysis with Equal Yield
The following GAMS code presents the MPSGE model denition for test problem SHOVEN. This
model is equivalent to the HARBERGER, apart from the addition of an auxiliary variable TAU.
Within MPSGE, auxiliary variables can either represent price-adjustment instruments (endogenous
taxes) or they can represent a quantity-adjustment instruments (endowment rations). In model
SHOVEN, TAU is used to proportionally scale factor taxes in order to achieve a target level of gov-
ernment revenue. The auxiliary variable rst appears in the $PROD:AL(S) block, following the
declaration of a tax agent. There are two elds associated with an endogenous tax. The rst eld
(N:) gives the name of the auxiliary variable which will scale the tax rate. The second eld (M:)
species the multiplier. If the M: eld is omitted, the multiplier assumes a default value of unity. If
the value in the M: eld is zero, the tax does not apply.
The auxiliary variable TAU also appears at the bottom of the le where it labels an associated
124
equation. An auxiliary variable may or may not appear in its associated constraint. The constraint
associated with TAU is based on a price index dened by THETA(G). The equilibrium level of TAU
is selected to provide level of tax revenue such that the value of transfers to households is held
constant. (Endowments of the commodity PT are xed, so when the value of PT is xed, then so too
are the value of transfers from GOVT to each of the households.)
SHOVEN illustrates how an auxiliary variable can be interpreted as a tax instrument. In the MPSGE
syntax, auxiliary variables may also be employed to endogenously determine commodity endow-
ments. There is no restrictions on how a particular auxiliary variable is to be interpreted. A single
variable could conceivably serve simultaneously as an endogenous tax as well as a endowment ratio,
although this would be rather unusual.
1 $ONTEXT
2
3 $MODEL: SHOVEN
4
5 $SECTORS:
6 AL(S)
7
8 $COMMODITIES:
9 P(G) W(F) PT
10
11 $CONSUMERS:
12 RA(H) GOVT
13
14 $AUXILIARY:
15 TAU
16
17 $REPORT:
18 V:CD(G,H) D:P(G) DEMAND:RA(H)
19 V:DF(F,H) D:W(F) DEMAND:RA(H)
20 V:EMPLOY(S) I:W("L") PROD:AL(S)
21 V:WLF(H) W:RA(H)
22
23 $PROD:AL(S) s:0 va:ELAS(S)
24 O:P(G) Q:A(G,S)
25 I:P(G) Q:B(G,S)
26 I:W(F) Q:FD(F,S) P:PF(F,S)
27 + A:GOVT N:TAU$TF(F,S) M:TF(F,S)$TF(F,S) va:
28
29 $DEMAND:RA(H) s:1 gds:ESUB(H)
30 D:P(G) Q:C(G,H) gds:
31 D:W(F) Q:D(F,H)
32 E:W(F) Q:E(F,H)
33 E:PT Q:TRN(H)
34
35 $DEMAND:GOVT
36 D:PT Q:GREV
37
38 $CONSTRAINT:TAU
39 PT =E= SUM(G, THETA(G) * P(G));
40
41 $OFFTEXT
An algebraic formulation of the Shoven model is provided in Appendix D for the interested reader.
125
5.6.2 Public Goods and Endogenous Taxation
Consider a nal extension of the 2x2 model in which tax revenue funds a pure public good. Model
SAMUELSON presented in Figure 8. This model illustrates one of several ways that public goods can
be modelled in MPSGE. Here the level of public provision is determined by a Samuelson-condition
equating the sum of individual marginal rates of substitution (marginal benet) with the marginal
rate of transformation (marginal cost). Unlike the equal yield formulation, the tax revenues collected
by GOVT are not returned lump-sum but are instead used to nance provision of a pure public good.
This representation of government has not been widely adopted in the CGE literature, perhaps
because of the diculties involved in specifying preferences for public goods.
The relevant characteristic of a pure public good entering nal demand is that each consumer
owns the same quantity. Agents attitudes toward public goods dier, and because there is no
market, agents valuations of the public good will also dier. In an MPSGE model, the separate
valuations are accommodated through the introduction of personalized markets for public good -
one market for each consumer. In the model, consumer expenditure encompasses both private and
public purchases, and consumer income encompasses both private and public endowments. An
individual is endowed with a quantity of her own version of the public good determined by the level
of public expenditures. An increase in taxes, to the extent that it increases tax revenue, will increase
the level of public provision.
In this model, the structure of relative factor taxes is exogenous but the aggregate level of taxes is
not. Tax rates are scaled up or down so that the sum of individual valuations of the public good
(the marginal benet) equals the cost of supply of the public good (the direct marginal cost).
Consider features of model SAMUELSON which do not appear in SHOVEN:
(i) There are new commodities PG and VG(H). The rst of these represents the direct marginal cost
of public output from sector GP, a Leontief technology which converts private goods inputs into
the public good. For the SAMUELSON structure, all government revenues apply to purchases of the
public good (observe that the only good demanded by consumer GOVT is PG ). The prices VG(H)
represent the individual consumer valuations of the public good. Commodity VG(H) appears only
in the endowments and demands of consumer RA(H). The endowment record for VG(H) includes a
quantity V(H) which is the benchmark valuation of the public good by agent H.
(ii) There are two auxiliary variables. TAU has the same interpretation as in the SHOVEN, determining
the aggregate tax level. Auxiliary variable LGP is a rationing instrument representing an index of
the level of public goods provision, scaled to unity in the benchmark. Consumer RA(H) thus is
endowed with a quantity of VG(H) given by V(H) * LGP .
(iii) The constraint for TAU in SAMUELSON diers from the TAU constraint in SHOVEN. Here the con-
straint represents the Samuelson condition, equating the marginal cost (PG*GREV) and the sum of
individuals marginal benet ( SUM(H,VG(H)*V(H)) ). The constraint for LGP simply assigns LGP
equal to the sector GP activity level. (The LGP variable and constraint are only needed because the
R: eld only accepts auxiliary variables.)
1 $ONTEXT
2
3 $MODEL: SAMUELSON
4
5 $SECTORS:
6 AL(S) GP
7
8 $COMMODITIES:
126
9 P(G) W(F) PG VG(H)
10
11 $CONSUMERS:
12 RA(H) GOVT
13
14 $AUXILIARY:
15 TAU LGP
16
17 $REPORT:
18 V:CD(G,H) D:P(G) DEMAND:RA(H)
19 V:DF(F,H) D:W(F) DEMAND:RA(H)
20 V:EMPLOY(S) I:W("L") PROD:AL(S)
21 V:WLF(H) W:RA(H)
22
23 $PROD:AL(S) s:0 va:ELAS(S)
24 O:P(G) Q:A(G,S)
25 I:P(G) Q:B(G,S)
26 I:W(F) Q:FD(F,S) P:PF(F,S)
27 + A:GOVT N:TAU$TF(F,S) M:TF(F,S)$TF(F,S) va:
28
29 $PROD:GP s:0
30 O:PG Q:GREV
31 I:P(G) Q:GD(G)
32
33 $DEMAND:RA(H) s:1 gds:ESUB(H)
34 D:P(G) Q:C(G,H) gds:
35 D:W(F) Q:D(F,H)
36 D:VG(H) Q:V(H)
37 E:VG(H) Q:V(H) R:LGP
38 E:W(F) Q:E(F,H)
39
40 $DEMAND:GOVT
41 D:PG Q:GREV
42
43 $CONSTRAINT:TAU
44 GREV * PG =E= SUM(H, V(H) * VG(H));
45
46 $CONSTRAINT:LGP
47 LGP =E= GP;
48
49 $OFFTEXT
5.6.3 Comparing Model Results
Although the foregoing discussion has focused on the nuances of MPSGE model syntax, but there are
many interesting economic questions which can be addressed using even small-scale models such as
the ones described here. Consider the output listing from parameter REPORT is displayed in Figure 9.
It is perhaps surprising to note that none of the uniform tax structures represents a Pareto-superior
choice compared to the benchmark tax structure. Furthermore, from the standpoint of aggregate
welfare (WELFARE.TOTAL = income-weighted sum of individual EVs), only the uniform capital tax
represents an improvement.
INDEX 1 = HARBERGER
UNIF_K UNIF_L UNIF_VA
REVENUE._ 3.9 -38.9 -0.8
TAXRATE._ 50.0 50.0 25.0
WELFARE.OWNER 1.9 42.4 18.5
WELFARE.WORKER -0.1 -26.8 -10.9
WELFARE.TOTAL 0.6 -1.3 -3.48143E-2
127
EMPLOY .X -5.3 -6.9 -8.4
EMPLOY .Y 20.5 34.4 22.1
PRICE .X -10.4 -11.2 -10.3
PRICE .Y 11.8 12.8 11.8
PRICE .K 3.9 59.5 24.5
PRICE .L -4.7 -38.9 -23.5
OUTPUT .X 3.6 -1.0 0.4
OUTPUT .Y -3.7 2.0 -2.0
INDEX 1 = SHOVEN
UNIF_K UNIF_L UNIF_VA
TAXRATE._ 47.1 134.2 25.3
WELFARE.OWNER 3.3 40.2 18.3
WELFARE.WORKER -1.0 -29.2 -10.8
WELFARE.TOTAL 0.6 -3.6 -3.51710E-2
EMPLOY .X -5.0 -19.7 -8.5
EMPLOY .Y 21.5 12.1 21.9
PRICE .X -10.4 -9.0 -10.3
PRICE .Y 11.9 10.2 11.8
PRICE .K 6.2 49.8 24.2
PRICE .L -5.0 -56.5 -23.6
OUTPUT .X 3.6 -7.9 0.3
OUTPUT .Y -3.4 -2.0 -2.1
INDEX 1 = SAMUELSON
UNIF_K UNIF_L UNIF_VA
REVENUE ._ -1.4 -14.5 -6.7
TAXRATE ._ 45.7 88.8 22.8
WELFARE .OWNER 4.7 43.9 21.1
WELFARE .WORKER -2.0 -31.4 -12.9
WELFARE .TOTAL 0.5 -3.7 -0.4
EMPLOY .X -4.9 -7.5 -5.9
EMPLOY .Y 24.5 37.5 29.7
PRICE .X -10.7 -11.3 -10.9
PRICE .Y 12.2 13.0 12.5
PRICE .K 7.8 60.3 29.0
PRICE .L -6.0 -51.8 -24.5
OUTPUT .X 3.0 -2.2 0.9
OUTPUT .Y -2.3 3.3 -2.58148E-2
PROVISION._ -0.8 -13.9 -6.1
5.7 Algebraic Representations
5.7.1 Harberger
Zero Net Profit
The unit cost of production in sector A(h, s) is given by a nested Leontief-CES function dened over
the cost of intermediate inputs and primary factors with ad-valorem taxes on factor demands. In
equilibrium, the unit cost must be no less than the market price of output:
s
=
g
p
g
B
bs
+
s
_
_
fs
(w
f
(1 +t
fs
))
1
s
_
_
1
1
s
p
s
0 s|
s
= 1
and
s
=
g
p
g
B
bs
+
s
_
_
f
(w
f
(1 +t
fs
))
fs
_
_
p
s
0 s|
s
= 1
128
Income Balance for Government
Government tax income (PT) is determined by the value of tax revenue, calculated using activity
levels, compensated demands, market prices and ad-valorem tax rates:
PT =
s
(w
f
(1 +t
fs
))
AL
s
w
f
t
fs
Income Balance for Households
Household income is determined by the net of tax return to primary factors plus the household share
of government revenue:
M
h
=
f
w
f
E
fh
+s
h
PT
Market Clearance for Goods
Producer output is equal to the sum of intermediate plus nal demand:
AL
g
s
AL
s
B
gs
+
h
M
h
e
h
(p)
_
e
h
(p)
p
g
_
h
where gamma
h
is the household budget share devoted to the consumption of goods, and e
h
is the
unit expenditure function which may be written:
e
h
(p)
_
ih
p
1
h
i
_ 1
1
h
Market Clearance for Factors
The aggregate supply of factors equals the sum of producer and consumer demand. Producers pay
taxes on factor inputs, consumers do not because we consider these demands to be leisure or
household production. Consumer demands for factors are specied as Cobb-Douglas (constant
budget shares):
h
E
fh
=
s
AL
s
s
(w
f
(1 +t
fs
))
+
fh
M
h
w
f
5.7.2 Shoven
Zero Net Profit
The unit cost of production in sector A
h
s is given by a nested Leontief-CES function dened over the
cost of intermediate inputs and primary factors with ad-valorem taxes on factor demands. Unlike
the Harberger models, tax rates in this model are determined endogenously. In equilibrium, the unit
cost must be no less than the market price of output:
s
=
g
p
g
B
bs
+
s
_
_
fs
(w
f
(1 +t
fs
))
1
s
_
_
1
1
s
p
s
0 s|
s
= 1
129
and
s
=
g
p
g
B
bs
+
s
_
_
f
(w
f
(1 +t
fs
))
fs
_
_
p
s
0 s|
s
= 1
Income Balance for Government
Government tax income (PT) is determined by the value of tax revenue, calculated using activity
levels, compensated demands, market prices and ad-valorem tax rates:
PT =
s
(w
f
(1 +t
fs
))
AL
s
w
f
t
fs
Equal Yield
In equilibrium, tax rates are multiplicatively adjusted to achieve a target level of government revenue:
PT =
g
p
g
Income Balance for Households
Household income is determined by the net of tax return to primary factors plus the household share
of government revenue:
M
h
=
f
w
f
E
fh
+s
h
PT
Market Clearance for Goods
Producer output is equal to the sum of intermediate plus nal demand:
AL
g
s
AL
s
B
gs
+
h
M
h
e
h
(p)
_
e
h
(p)
p
g
_
h
where
h
is the household budget share devoted to the consumption of goods, and e
h
h is the unit
expenditure function which may be written:
e
h
(p)
_
ih
p
1
h
i
_ 1
1
h
Market Clearance for Factors
The aggregate supply of factors equals the sum of producer and consumer demand. Producers pay
taxes on factor inputs, consumers do not because we consider these demands to be leisure or
household production. Consumer demands for factors are specied as Cobb-Douglas (constant
budget shares):
h
E
fh
=
s
AL
s
s
(w
f
(1 +t
fs
))
+
fh
M
h
w
f
130
5.7.3 Samuelson
Zero Net Profit for Private Production
The unit cost of production in sector A
h
s is given by a nested Leontief - Cobb-Douglas function
dened over the cost of intermediate inputs and primary factors with ad-valorem taxes on factor
demands. Unlike the Harberger models, tax rates in this model are determined endogenously. In
equilibrium, the unit cost must be no less than the market price of output:
s
=
g
p
g
B
bs
+
s
_
_
f
(w
f
(1 + t
fs
))
fs
_
_
p
s
0 s
Zero Net Profit for Public Sector Contractors
The unit cost of public provision is determined by the market price of commodity inputs to the
Leontief activity. Input requirements are dened by a vector of public sector input coecients, a
h
g.
In equilibrium, the price paid by the government equals the cost of market inputs:
g
p
g
a
g
p
G
0
Income Balance for Government
Government tax income (PT) is determined by the value of tax revenue, calculated using activity
levels, compensated demands, market prices and ad-valorem tax rates. In equilibrium, the value of
tax revenue equals the market cost of public sector output:
PT =
s
(w
f
(1 + t
fs
))
AL
s
w
f
t
fs
= p
G
G
Income Balance for Households
Household income is determined by the net of tax return to primary factors plus the imputed value
of public provision:
M
h
=
f
w
f
E
fh
+v
h
G
Market Clearance for Private Goods
Producer output is equal to the sum of intermediate plus nal demand:
AL
g
s
AL
s
B
gs
+
h
M
h
e
h
(p)
_
e
h
(p)
p
g
_
h
where
h
is the household budget share devoted to the consumption of goods, and e
h
h is the unit
expenditure function which may be written:
e
h
(p)
_
ih
p
1
h
i
_ 1
1
h
131
Personalized Markets for Public Goods
We assume a pure public good in this model, hence each household may attach a dierent marginal
valuation to public provision in an equilibrium. In order to compute these marginal values, we include
a separate public good market for each houshold which balances the level of provision with the
household demand:
G =
Gh
M
h
v
h
in which
Gh
is the budget share of public goods in the top-level Cobb-Douglas preferences of
household h.
Market Clearance for Factors
The aggregate supply of factors equals the sum of producer and consumer demand. Producers pay
taxes on factor inputs, consumers do not because we consider these demands to be leisure or
household production. Consumer demands for factors are specied as Cobb-Douglas (constant
budget shares):
h
E
fh
=
s
AL
s
s
(w
f
(1 + t
fs
))
+
fh
M
h
w
f
Samuelson Rule for Optimal Provision of Public Goods
The tax rate multiplier is adjusted to balance the marginal cost of public provision with the sum-
mation across households of marginal willingness to pay. Due to the existence of household factor
demand, factor taxes are necessarily distortionary and there will be an excess social cost of public
funds. For this reason, the Samuelson rule is neither necessary nor sucient for optimal provision.
We apply the rule here merely to illustrate the programming methodology, even though the resulting
equilibrium may be suboptimal:
p
G
=
h
v
h
132
6. An Empirical Model
This chapter was jointly authored with Miles Light.
6.1 Introduction
The analysis of economic policy in a micro-consistent framework demands both theory and data.
A common theoretical basis for economic analysis is the Shoven-Whalley (1992) applied general
equilibrium framework which is quite exible and can be applied to a large number of economy-wide
issues (commercial policy, tax reform, environmental policy, etc.). The Shoven-Whalley approach is
normally based on a multi-sectoral dataset which is provided by an input-output table or a Social
Accounting Matrix (SAM). In a textbook exposition, the development of the model and the dataset
are conceptually separate activities; in practice, however, these two activities proceed in parallel.
This paper is intended to document the development of a pilot general equilibrium model for Colom-
bia based on a recent (1996) input-output table. To do this, we follow a path starting with the
Colombian national accounts, then into GAMS-readable format, through structural assumptions
and functional forms, and ending with the nal model structure. We then take the model through a
typical exercise: we calculate the least-cost source of public funds. Because this is an introductory
paper, we do not attempt to model non-standard aspects of indirect taxation such as tax avoidance
or corruption
1
. For concreteness, we formulate a static model with constant-returns to scale. It is
understood that this analysis will ultimately provide a point of departure for subsequent assessments
of tax policy options based on more complex formulations.
The paper has the following structure. In Section 6.2, we consider general features of an IO table and
a Social Accounting Matrix. Section 6.5 describes the process of importing the Social Accounts from
a spreadsheet into GAMS. Section 6.3 presents the key equations in the mcfmodel.gms formulation.
We conduct an illustrative calculation of the marginal cost of additional revenue from dierent tax
sources in Section 6.4.
6.2 Social Accounting
Payments for goods and services can be represented concisely by using a social accounting frame-
work. Dierent industries, consumers and government agents sell and purchase goods, then those
transactions are recorded and combined to form a Social Accounting Matrix (SAM). The informa-
tion contained in a SAM is the starting-point for most general equilibrium models. See Pyatt and
Round (1985) or Ben Kings What is a SAM, (1981) for a more detailed introduction to SAM con-
struction and interpretation. A more recent treatment such as Keuning and Ruijter, Guidelines to
the Construction of a Social Accounting Matrix, (1998) may also be useful.
1
However, we do include an informal labor sector which does not pay labor taxes
133
The business of interpreting a particular countrys accounting data, and creating a sensible economic
framework around a SAM is not so obvious. Often, the social accounts will contain more information
than than necessary for a straightforward GE model. For example, an industry may purchase and
sell the same commodity simultaneously. We know that this probably represents transactions for
slightly dierent commodities within a certain sector, but since we aim to build an overview of
the economy, this sort of simultaneous transaction represents a redundancy. In this section we will
discuss how to interpret a SAM and build a workable CGE model around this data. The Colombian
1996 social accounts are discussed as a specic example of how to build a static GE model from
national accounting data. Some important considerations when doing such an exercise are:
The type of policy analysis What is the purpose of the modeling exercise? If the purpose is
tax-analysis, then it makes sense to include as much domestic tax information as possible, while
other portions of the data (such as specic trade data) can be treated generically. Conversely, a
model to analyze international trade patterns would imply a dierent data aggregation routine
and a dierent model.
The scope of the analysis Is the analysis regional (e.g., is it one state in the United States),
national, or global? The scope of the analysis will help determine where the important data
is.
Quality of data Some portions of national accounting are almost completely ctitious. The
nancial (capital) accounts, for example, are often notoriously inaccurate. Local experts should
use their specic knowledge of the accounts to downplay shady reporting and focus upon what
is known to be more accurate.
6.2.1 SAM Layout
The core of a SAM is the Input-Output table for production. The IO table shows production and use
of commodities, distinguished by sector. In this case, the Colombia 1996 SAM contains 13 sectors,
but other SAMs may contain 100 sectors or more. Each sector uses outputs from other sectors as
intermediate inputs. The IO also includes factors of production such as labor and capital, which are
sold by households and purchased by dierent industries.
Beyond the core IO table are government and household activities. These activities include items
like government taxation and provision, household savings and private or public investment. The
government often represents a substantial portion of the economy in developing countries, so the
transfers between rms, households and institutions are usually included. Colombia is no exception,
government activity there accounts for almost 25% of GDP.
Other miscellaneous information may be available and possibly important. In the case of Colombia,
the informal labor sector represents a large portion of total labor (compared to other countries).
Of course, understanding the scope of informal labor supply and tax avoidance is crucial when
investigating how best to support the government budget. The large informal labor market in
Colombia means labor taxes are not a promising candidate for collecting tax revenues.
Table 6.1 shows the layout for a typical (rectangular) SAM
2
. The sub-matrix A shows industrial
production and use of commodities. This is the core portion of the SAM. Sub-matrix B contains
nal consumption data. This portion of the SAM shows who ended up buying nal production of
2
A rectangular SAM is another way to represent the national accounts. Instead of using Row/Column notation
for sales and purchases as in a square SAM, a rectangular SAM uses negative gures to represent inputs and positive
gures to represent outputs.
134
each commodity. Notice that export is considered to be a nal consumer in this framework. Sub-
matrices C and D list consumption of imports and sales of exports. These imports are either
consumed for intermediate use or nal use. There is often a BOP element, which shows the relative
value of exports minus imports.
Factors of production and other types of endowments are included using sub-matrices E and
F. Submatrix E represents the sales of labor and capital to industry and F represents most of
the household earnings . Institutional transfers, taxes, trade and transportation markups, and any
other transaction is usually listed at the bottom of the SAM using components G and H. Much
of the tricky interpretation relates to the transfers and margins at the bottom of a SAM.
Table 6.1: A Typical (Rectangular) SAM
INTERMEDIATE USE FINAL USE
by Production Sectors Private Govt
1 2 ...j... n consum. consum. Invest. Export
1
Domestic 2
Production :
by i A B
sector :
n
Trade C D
Value added:
-labor
-capital E F
Transfers
-taxes G H
-margins
6.2.2 Colombian 1996 SAM
The SAM for Colombia is shown in Table 6.2. This is a square SAM, because it has an equal num-
ber of rows and columns. The row-sums and column-sums should be equal for any consistent square
SAM. Industrial production as shown in Table 6.2 is aggregated in this document for presentation
purposes only. The 1996 SAM has detailed sectoral tax information, two types of labor (formal and
informal), and two types of rms and capital (public and private). These features are incorporated
into the model. The SAM does not oer household information by income class. This means that
the current model should focus upon eciency issues, rather than distributional impact. Most of
the accounts listed to the right of the ROW account are considered transfers in a static model. A
dynamic model can account for these accumulated variables more accurately.
Next we will discuss the changes that were made to the SAM while constructing the static CGE
model, mcfmodel.gms, and we will construct a rectangular SAM as used in the model.
135
Table 6.2: Original Square SAM for Colombia 1996
(Industrial Detail Aggregated)
Manu- Servcs Govnt Formal Informal Capital Other VAT Commerc Transprt
facturing Services Labor Labor Ind.Tax Margin Margin
Manufact. 15418.3 11206.1 1112.6
Service 8007.9 31629.5 5102.3
Gov Svcs
Formal L. 6766.1 19990.9 10610.1
Informal L. 10723.7 14183.3
Capital 6551.1 20766.1 2026.4
Other Ind.Tx. 364.8 877.4 188.8
VAT 958.7 3227.2
Tariffs 258.7 842.6
Comm. Marg. 6133.8 -6133.8
Trns. Marg. 930.7 -930.7
Indir.Tax 2385.6 119.9
Subsidies -81.9 -47.5
Direct Tax
Households 37376.4 24906.3 6350.7
Government 2742.9 1429.5 4186.9 1100.7
Pub firms 5782.8
Priv firms 14468.5
ROW 5467.1 15525.7 3.1
Acummulation
Stocks
Public Inv
Private Inv
Original Square SAM for Colombia 1996 (continued...)
Indirect Subsidies Direct H.Holds Govnt Public Private ROW Accum- Stock Public Private
Taxes Taxes Firms Firms ulation Invest Invest
Manufact. 24108.5 10704.8 778.5 5.9 550.3
Service 40940.5 4602.1 -219.8 5025.9 16168.1
Gov Svcs 916.9 18122.5
Formal L. 12.4
Informal L.
Capital
Other Ind.Tx.
VAT
Tariffs
Comm. Marg.
Trns. Marg.
Indir.Tax
Subsidies
Direct Tax 1555.5 48.5 4133.1
Households 115.2 4702.1 604.2 8881.3 4178.8
Government 2505.5 -128.4 5737.1 5593.1 6647.1 1061.1 2453.8 203.9
Pub firms 442.5 109.2 713.3 33.6
Priv firms 7714.7 2177.5 950.6 11098.9 736.1
ROW 678.5 163.4 2489.6
Acummulation 5727.7 -3823.7 4143.5 7375.2 3855.4
Stocks 559.7
Public Inv 5030.7
Private Inv 16718.4
136
6.2.3 Data Management and Model-Building
Some adjustments to thte 1996 social accounting matrix were required in order to produce a dataset
consistent with the static model. This section goes through a few of the interpretations for the
Colombian data. We feel that GAMS provides the most consistent environment for data adjustments,
hence the rst step in the process is to import the SAM from the XLS worksheet into GAMS. We
imported the 1996 data into gams using xlimport, then began compartmentalizing the accounts for
the model.
6.2.4 Details
The SAM for mcfmodel.gms is shown in Table 6.3. We itemize some aspects of the data adjustments
and the interpretations below:
Intermediate Inputs The IO table is copied almost exactly as is appears in the 1996 SAM. One
change was a netting of production outputs and the own-use of output within an industry. For
example, the 118.8 million dollars going from Other Crops to itself (cell E9 in the spreadsheet) was
subtracted from production.
Indirect Taxes Indirect taxes represent a composite of three items from the original SAM: indirect
taxes (21), other indirect taxes (26), and subsidies (27).
Labor taxes are shown in the original SAM as a single tax on formal labor supply. This tax is divided
up and applied at the production level, so that each producer pays a small share of the total labor
tax (as an input tax).
Capital Taxes - treated similarly to labor taxes, each production sector pays their share of the total
tax as an input tax.
Trade and Transport Margins The SAM contains margins, or markups, between production and
consumption. The trade margins represent transportation costs or markups for retail shops. We
can see that these margins must be paid by most industries, but they are collected (indicated
by a negative number in the SAM) by other sectors. The transport industry collects most of
the transportation margins, and the service industry collects commercial margins. The problem
arises because the margins have both positive and negative entries. The traditional interpretation
is that they are negative inputs to production. However, production functions are not dened
for negative numbers, so these margins had to be accounted-for elsewhere. To solve the problem, a
separate margin commodity was created for inputs and for outputs. Positive margins were treated
as an input to production for most sectors, negative margins were treated as an additional output
for the transport, oil, and service sectors. This portion of the SAM is a good example of how some
of the more mysterious entries must be interpreted.
Foreign Exchange Colombia is a Small Open Economy (SOE) because Colombias international trade
activities have a minimal impact on world prices. We record trade using the pfx (price of foreign
exchange) commodity. pfx represents Colombias exchange rate on the world market. For example, if
imports fall relative to exports, the decreased demand for pfx will make foreign goods seem relatively
less-expensive. In the Rectangular SAM, the pfx row only shows net exports. In the model, imports
are combined with their domestically-produced counterparts before nal consumption. Exports are
explicitly sold in exchange for pfx.
Capital Transfers Items 31 and 32 in the original SAM show capital transfers between public and pri-
vate companies and other agents in the economy. These transfers are nancial transactions, which
137
are important, especially in monetary economics. But since we are working with real production
and consumption, these accounts are omitted.
Resources Payments Natural resources are an important factor for extraction industries, because
they are a xed factor. The inclusion of this xed factor reects the fact that extraction industries
exhibit decreasing returns to scale, so that a developing country cannot simply extract natural
resources indenitely. We included a resource payment, which is considered part of the return to
capital, and reects a certain level of xed inputs. Country experts should consider the best value-
share to choose for each industry. The rectangular SAM shows these estimates for the current static
model.
Other Items Accumulation (34) and the Change in Stocks (35) have also been omitted from the
model along with the capital transfers.
Table 6.3: Rectangular Social Accounting Matrix for MCFMODEL
Manufact Service Government Government Investment Household Total:
Industries Industries Services Agent Agent
Manufact 44976.4 -10910.2 -1436.7 -1918.7 -30710.8 0.0
Service -9120.6 68626.7 -4778.0 -20389.9 -34338.3 0.0
Gov Serv 19039.2 -18122.5 -916.6 0.0
FOREX 4690.9 -10376.3 6344.3 -658.9 0.0
Formal L -7577.5 -18066.0 -10168.5 35812.0 0.0
Informal L -11285.8 -13620.5 24906.3 0.0
Privat K -3728.1 -16818.4 20546.4 0.0
Public K -2026.3 2026.3 0.0
Resources -2637.6 2637.6 0.0
VAT -1571.1 -2615.2 4186.3 0.0
TM -349.6 -751.0 1100.6 0.0
TL -329.0 -784.5 -441.5 1555.1 0.0
TK -1135.1 -2998.9 4134.0 0.0
IndTx -2758.7 -860.1 -188.1 3806.9
Trans Marg -945.2 945.2 0.0
Comerc Marg -8229.1 8229.1 0.0
Investment -5030.8 22308.5 -17277.7 0.0
Total: 0.0 0.0 0.0 0.0 0.0 0.0
6.2.5 Checking Consistency
Since the original 1996 SAM was consistent, our primary goal after including and adjusting the
accounts via the static model is that all of the accounts still balance. In the model, we create an
aggregate good, called and Armington Composite Commodity, which combines domestic production
and imports. This aggregate commodity, A
j
, is used as an intermediate input or for nal demand.
At a minimum, we check supply/demand balance using this commodity. On the left side, A
j
is
a combination of domestic production, imports and (specic to Colombia) trade and transport
margins:
A
j
= D
j
+M
j
P
M
j
+
m
(Mrg
D
j
Mrg
S
j
)
Now, we know that A
j
is supplied for intermediate and nal demand, so that the following equation
must hold:
A
j
i
ID
ij
C
j
I
j
G
j
= 0.
If a SAM is not balanced, the analyst gure out what went wrong, and then decide how to remedy
the situation. Another issue is the interpretation of certain taxes and subsidies. For example, value-
138
Table 6.4: Echo Print of Base Year Value Shares
X/(X +D)% L/V % M/(M +D)% L
F
/(L
F
+L
I
)% GDP%
COF 90 100 0 30 1
CRO 0 95 1 19 5
LVS 2 92 6 19 1
FFH 62 23 0 100 3
OIL 70 66 10 38 2
MIN 37 31 0 68 0
THR 35 99 21 28 6
FOD 5 64 5 45 4
NRI 11 53 22 84 4
NSI 18 65 24 67 3
HTC 16 48 57 91 3
CON 0 56 0 61 7
TRN 8 91 6 65 5
ELE 0 26 0 100 3
COM 10 36 4 98 2
SER 0 66 2 51 35
GOV 0 84 0 100 14
1. X/(X +D)% is the export value-share in total production.
2. L/V % is the labor value-share in total value-added.
3. M/(M +D)% is the import value-share in total consumption.
4. L
F
/(L
F
+L
I
)% is the formal labor share of total labor.
5. GDP% is the percentage of total GDP.
added tax (VAT) can be interpreted as a tax on labor and capital as factors of production, or it can
be interpreted as a consumption tax (since investment is not taxed). The tax system adopted for
mcfmodel.gms is described in Section 6.3.4. The implication of any assumptions are usually checked
by conducting a sensitivity analysis, where the results from a policy simulation are tested with and
without imposing certain modeling assumptions.
In is section we described how to convert a SAM into a CGE model conceptually. We also describe
the specic computational details about how to convert the original SAM data, located in an Excel
spreadsheet, into a GAMS dataset and model. These details are listed in Appendix 6.5.
6.2.6 Forensic Calculations
When assessing a new dataset it is helpful to rst develop a sense of the key statistics in the social
accounting matrix. Table 6.4 provides some of these indicators, including the export share of market
supply (E/(E + D), the labor share of value-added (L/V ), the import share of domestic supply
(M/(M + D)), formal labor share of wage payments (L
F
/(L
F
+ L
I
)), and (in the nal column)
sectoral shares of aggregate GDP.
Value-added and indirect tax rates are computed from the SAM and are round to vary considerably
across sectors. Likewise, we use the tari and import rows from the SAM to compute the benchmark
tari rates. All of these tax rates are shown in Table 6.5.
139
Table 6.5: Percentage Tax Rates from 1996 SAM
V AT T
Y
T
M
V AT T
Y
T
M
COF 1 NSI 25 1 5
CRO 2 HTC 53 1 6
LVS 6 CON 1
FFH 6 TRN 1 1
OIL 2 4 ELE -1
MIN 1 19 COM 21 1
THR 3 SER 2 1
FOD 2 1 6 GOV 1
NRI 24 14 5
6.3 A Static General Equilibrium Model
In this section, we work through the model framework for the basic static model: mcfmodel.gms.
A typical analysis may require a custom-tailored version of this basic model, but the underlying
assumptions and model structure will typically remain intact. Thus, the documentation underlying
this model can be recycled for subsequent models derived from the mcfmodel.gms general structure.
mcfmodel incorporates several key elements of the social accounts, including:
Two types of labor (formal and informal)
Five sets of tax instruments:
1. Value-added taxes, applied to primary factor inputs (vat)
2. Import taris (t
M
)
3. Direct taxes on capital (t
K
)
4. Direct taxes on formal labor (t
F
)
5. Indirect taxes and substitutions on production (t
i
)
Armington dierentiation of domestic and foreign goods, include a constant-elasticity of substi-
tution aggregation of imports and domestic goods and a constant elasticity of transformation
between goods produced for domestic and export markets
Constant investment demand
Constant elasticity of transformation between labor supplied to the formal and informal labor
markets. When the elasticity is set to zero, both types of labor are in xed supply.
6.3.1 General Overview of GE Modeling
The static model recreates an Arrow-Debreu (1954) general economic equilibrium model
3
. Each
consumer has an initial endowment of labor, capital, and resources, and a set of preferences resulting
in demand functions for each commodity. Market demands are the sum of consumer and intermediate
demand. All of the consumers are typically combined to for a representative agent, with aggregated
3
For a detailed discussion of general-equilibrium, see Arrow and Hahn (1971), and Shoven and Whalley (1992).
140
demand and total endowments. Commodity market demands depend on all prices and satisfy
Walrass law. That is, at any set of prices, the total value of consumer expenditures equals consumer
incomes. Technology is described by constant returns to scale production functions. Producers
maximize prots. The zero homogeneity of demand functions and the linear homogeneity of prots
in prices (i.e. doubling all prices double money prots) imply that only relative prices are of any
signicance in such a model. The absolute price level has no impact on the equilibrium outcome.
Equilibrium in this model is characterized by a set of prices and levels of production in each industry
such that the market demand equals supply for all commodities. Since producers are assumed to
maximize prots, and production exhibits constant returns to scale, this implies that no activity
(or cost-minimizing technique for production functions) does any better than break even at the
equilibrium prices. Mathiesen (1985) has shown that an Arrow-Debreu model can be formulated and
solved as a complimentarity problem. Accordingly, three types of equations dene an equilibrium:
market clearance, zero prot, and income balance.
6.3.2 Economic Flows
The relationship between dierent sectors and consumers in mcfmodel is shown in Figure 6.1. Taxes
are discussed in the next section and therefore, for simplicity, do not appear in this gure.
E Y
D M A
RA, Gov
G I C
-
?
H
H
H
H
H
H
H
H
HY
J
J
J
J]
? ? ?
K
L
R
Figure 6.1: Flows in mcfmodel.gms
Production (denoted as Y ) combines three factors: capital K, labor L, resources R, and intermediate
inputs A, to produce outputs going to the domestic market D or the export market E. An Armington
Composite good (Armington, 1969) (denoted as A) is a combination of domestic goods D and imports
M. Armington aggregate goods are the basic consumption commodity. They are consumed by
industry as an intermediate input and they are also goods for nal consumption, C, government
141
consumption G, and or investment I. Consumers, RA, and the government, Gov are endowed with
factors of producton (L, K, R), which get sold to industry (Y ). They are also the nal consumers,
who use income from factor sales to purchase Armington goods (C via A), to invest (I), or to create
government services (G).
6.3.3 Symbol Table
Any model exposition can quickly become confusing when symbols are ambiguous. Key symbols are
listed in Table 6.6.
Note that these symbols may not correspond directly to symbols in the computer code. For example,
we use i and j for set identiers in the paper, but in the mcfmodel.gms model code, the set identiers
are s and ss.
The model has the production sectors detailed in Table 6.7.
142
Table 6.6: Symbol Lookup Table
Set Label Elements
i (or j) Sectors (listed in Table 6.7)
l Labor types {formal, informal}
k Capital types {public, private}
m Margin types {trade, commerce}
Symbol Description
Y
i
Production of good i
x
ij
Intermediate Input: level of A
i
used in sector j production
L
i
Formal labor input into sector i
L
Ii
In-formal labor input into sector i
K
i
Capital input into sector i
R
i
Fixed-supply natural resource input into sector i
A
i
Armington aggregate good (Imports plus Domestic)
E
i
Export output of good i
D
i
Domestic output of good i
M
i
Imports of good i
I
i
Investment demand i
G
i
Government demand
C
i
Household nal demand
a
ij
Share parameter for factor inputs
Taxes
t
i
, t
F
, t
K
Production, Formal-labor, and Capital taxes, respectively
vat
i
Value-added tax
Prices
p
i
Output price of the Armington aggregate, A
i
w
l
Wage for formal or in-formal labor
rk Single-period (rental) price of capital
pfx Aggregate exchange rate
143
Table 6.7: Sectors in the 1996 SAM
cof Coee
cro Other crops
lvs Livestock
ffh Forestry shing and hunting
oil Oil
min Other Minerals
thr Coee Threshing
fod Foodstus
nri Natural Resources Intensive Industries
nsi Non-skilled Labor Intensive Industries
htc Capital and High Technology Industries
con Construction
trn Transport
ele Electricity Gas and Water
com Communications
ser Private Services
gov Government Services
6.3.4 Functional Forms
The Constant Elasticity of Substitution (CES) function is adopted for the static model. CES func-
tions are widely accepted by economists because they are globally regular, and can be dened by their
zeroth, rst, and second order properties. This means that the location (price and quantity), slope
(marginal rate of substitution), and curvature (or convexity) completely characterize a CES produc-
tion or consumption function. MPSGE is a convenient modeling tool because it accepts these three
arguments and automatically constructs a CES function in the model. This allows economists to
take a high-level approach to production and consumption. Production and consumption structure
is dened by showing the linkage between sectors and the elasticity of substitution in consumption
and production.
Using this convention, the model structure for mcfmodel is shown in Figure 6.2, where is the
elasticity of substitution and is the elasticity of transformation.
Production Functions
Production Inputs Goods are produced according to a nested Leontief-Cobb Douglas technology.
Intermediate inputs and aggregate value-added enter at the top level:
Y
i
= min
_
min
j
_
x
ji
a
ji
_
,
v
i
b
i
_
Value-added represents a Cobb-Douglas aggregation of labor, capital and sector-specic resources:
4
v
i
= L
F
Fi
L
I
Ii
K
i
R
i
4
The numerical model permits the more general CES functional form for valued-added based on model input
esubkl. When this input is unity, value-added aggregates are Cobb-Douglas as shown here.
144
Figure 6.2: mcfmodel.gms production structure
R K L
@
@
@
6 6 6
A
1
... A
j
L
L
L
@
@
@
!
!
!
!
!
a
a
a
a
a
Y
i
!
!
!
!
!
a
a
a
a
a
E
i
D
i
M
i
A
i
!
!
!
!
!
a
a
a
a
a
-
6
C, G, I
`
` `
`
_
= 1 = 0
= 0
= 1
= 4
?
RA
in which constant returns to scale implies that
F
+
I
+ + = 1.
5
Production Outputs Each production sector Y produces two types of commodities: domestic goods
D
i
and goods for export E
i
. These goods are assumed to be imperfect substitutes, and they have
a constant elasticity of transformation. An algebraic formulation of this transformation function is
written:
Y
i
= g(D
i
, E
i
) =
_
D
i
D
1+1/
i
+ (1
D
i
)E
1+1/
i
_
1/(1+1/)
where
D
i
is the benchmark value share of domestic sales in total output for sector i and corresponds
to the model input etrndx.
Imports The model adopts an Armington representation of the import demand. Armington goods,
A
i
, are produced by combining domestic goods with imports from the same sector. These goods are
treated as imperfect substitutes (e.g., Coee from Colombia vs. Java). We use as the Armington
elasticity, which corresponds to esubdm in the computer code.
A
i
=
_
M
i
M
11/
i
+ (1
M
i
)D
11/
i
_
1/(11/)
Some confusion can arise trying to distinguish between production, Y
i
, output (D
i
,E
i
) and the
consumption good (A
i
). The Armington aggregate good is the main commodity for use in production
and nal demand. It combines domestic output, D
i
(which is produced via Y
i
), with imports, M
i
.
5
For purposes of illustration we assume that sector-specic resource inputs are a given fraction of the base year
capital earnings: Coee (25), Other crops (25), Livestock (25), Forestry shing and hunting (25), Oil (75), Other
Minerals (75), Natural Resources Intensive Industries (50). Model input resource can be used to scale assumed
resource shares of base year capital income. When resource=0, sector-specic resources are omitted from the model.
145
Trade Balance The real exchange rate () is determined by supply of exports and demand for
imports, which is determined in units of foreign currency.
i
p
E
i
E
i
+B =
i
p
M
i
M
i
Holding all else equal, rising import demand will increase , which reects increased demand for
external currency. The xed parameter B denotes the exogenously-specied current account balance.
Because this is a small-open economy, import and export prices (p
E
i
, p
M
i
) are xed exogenously.
Consumption, Investment and Government
Final Consumption A single representative agent (RA) is endowed with primary factors of produc-
tion: capital, labor, and resources. The RA demands investment, private and government goods.
Investment and government output are exogenous, while private demand is determined by utility
maximizing behavior. The RA utility function is a Cobb-Douglass:
U(A
i
) =
i
A
i
i
i
= 1
The RA maximizes utility subject to a budget constraint:
max
A
i
U(A
i
)
s.t.
i
p
i
A
i
p
K
K +p
L
(L
I
+L
F
) +p
R
R +trn I
Investment In the static formulation, investment demand is held constant at base-year levels. In-
vestments are aggregated into a single, national investment pool, then distributed among production
and government sectors according to base-year accounts. Investment funds come from households
and government. The level of investment can be altered in the steady-state formulation, which is
discussed in section 6.3.5.
Government The government spends money on the purchase of government services and investment.
Purchases are supported with tax revenue, capital rents, and net foreign exchange transfers. Total
tax revenues are described in section 6.3.4.
Tax Structure
Production inputs are subject to three types of taxes, value-added is taxed at rated vat
i
, formal
labor is taxed at rate t
F
and capital earnings are taxed at rate t
K
. Resource inputs are sector-
specic, hence their inputs are xed and the tax applied to resource inputs is lump-sum. Capital
and labor allocations are, however, price-responsive. Hence dierences in VAT rates across sectors
lead to eciency costs which are captured in the model. Tax-inclusive cost of production is then:
Cost
Y
i
=
j
p
j
x
ji
+ (1 +vat
i
)[w
F
(1 +t
F
)L
F
i
+w
I
L
I
i
+ (1 +t
K
)(rkK
i
+r
i
R
i
)]
Tax-inclusive output value for Y is:
V alue
Y
i
= (1 +t
Y
i
)
_
p
D
i
D
i
+p
X
i
X
i
_
146
In equilibrium, the tax-inclusive cost of production equals output value across all sectors, this rep-
resents the zero-prot market condition.
Import taris are included into the Armington commoditys unit cost function:
p
i
=
_
M
i
_
p
M
i
(1 +t
M
i
)
p
i
M
_
1
+
_
p
D
i
p
i
D
_
1
_
1/(1)
The benchmark tax rate applied on formal labor inputs (t
F
) is based on direct tax payment by
households in the SAM and gross payments to formal labor. In Colombia, the imputed tax rate on
a net basis is 4.3%. The benchmark tax rate applied to private capital (t
K
) is based on the direct
tax payments by private rms and the gross payments to capital in all non-government sectors. The
imputed tax rate here is 17.8%.
The Colombian static model tax application is shown graphically in Figure 6.3.
E
i
Y
i
D
i
M
i
A
ji
RA
G I C
GOV
-
?
H
H
H
H
H
H
H
H
HY
J
J
J
J]
-
? ?
K
L
R
t
Y
t
Y
t
F
t
K
t
K
t
M
?
vat, t
F
, t
Y
, t
M
, t
K
Figure 6.3: Taxes in mcfmodel.gms
147
6.3.5 Other Model Features
Steady-State
A major drawback of static analysis is the presence of a xed capital stock which does not align
with investment. Logically, the level of investment depends upon depreciation, interest rates and the
capital stock. Static CGE models usually fail to address the possible changes to investment and the
capital stock the counterfactual. We remedy this drawback by including the Steady-State option.
The Steady-State feature allows capital and investment to change in response to policy directives,
as would happen in a long-run analysis. The adjustment process is consistent with the following
complimentarity condition:
(p
inv
= rk)
The scale parameter, , is complimentary to the steady-state investment equation above, so when rk
rises relative to p
inv
, scales up government and private investment to reect the arbitrage condition.
Thus, in the steady-state equilibrium, adjusts investment so that investment is consistent with
the return to capital. This is done in the MPSGE program using a $constraint:
$constraint:kstock
pinv =e= rk("private");
kstock ( in the documentation) then scales government and private investment in the $demand
blocks:
$demand:govt
d:p(s) q:g0(s)
e:pinv q:(-govtinv) r:kstock
e:rk(k) q:govtk(k) r:kstock
e:pfx q:govttrn
$demand:hh
d:pc q:(sum(s,c0(s)))
e:pinv q:(-hhinv) r:kstock
e:rk(k) q:hhk(k) r:kstock
e:pfx q:hhtrn
e:wage q:(sum(l,ls0(l)))
e:pr(s) q:rd0(s)
If kstock is xed at unity, then the steady-state feature is disabled, allowing for a short-run
comparative-static analysis.
Informal Labor Supply
The labor supply in mcfmodel.gms is xed. However, this labor endowment can be allocated to
either formal labor supply (L
F
) which is taxed, or informal labor (L
I
) which is un-taxed. Agents
choose how much of each type to supply according to relative wages. The benchmark data reects
a substantial informal labor supply, with almost 40% of the total labor endowment going to the
informal sector. The labor-supply unit-revenue function is written:
w =
_
L
_
w
F
w
F
_
1+
L
+ (1
L
)
_
w
I
w
I
_
1+
L
_
1/(1+
L
)
148
Where
L
represents the model elasticity etrnl. The detailed labor supply and demand structure
is shown in Figure 6.4.
Figure 6.4: Detailed Labor Supply/Demand
L
@
@
@
@
@
@
L
I
L
F
`
= 1
_
L
RA
Y
The rst partial-derivative (
w
w
l
) determines sector-specic labor supply:
L
F
=
L
_
w
w
F
_
L
L
I
= (1
L
)
_
w
w
I
_
L
Labor is taxed as an input to production by the direct labor tax (t
F
) and value-added taxes (vat).
These taxes change equilibrium wages, and the corresponding split between formal and informal
labor supply.
6.3.6 Harris-Todaro Employment
We include a richer description of labor migration and unemployment in the Harris-Todaro model,
called htmodel.gms.
In this formulation unemployment, urban-rural migration, and the real wage are linked. The ur-
ban (formal) unemployment rate is determined by a wage equation, which uses a wage elasticity
parameter, . The real wage for formal labor and informal labor is determined by the total labor
supply, after migration, and the total demand for each type of labor. Migration between formal and
informal labor markets equalize the informal wage and the expected wage in the formal market.
Unemployment
The unemployment rate is determined through a wage equation which postulates a negative rela-
tionship between the real wage rate and the rate of employment:
w
P
= g(ur) (6.1)
149
where P denotes a consumer goods price index and ur is the unemployment rate, taken to be 16%
for 1997 in Colombia. This type of wage equation can be derived from trade union wage models, as
well as from eciency wage models (e.g., Hutton and Ruocco, 1999). Figure ?? illustrates the wage
curve in a traditional labor market diagram (instead of the w/p - ur space from equation 6.1). In
this gure, the real wage rate is measured on the vertical axis and the quantity of labor is measured
on the horizontal axis.
Figure 6.5: The formal-sector wage curve and unemployment
Full employment occurs with the real wage rate of (w/P)
0
a the intersection of the (inverse) labor
demand function, L, and the formal labor supply function, L
S
. Here, we replace the labor supply
curve with the real wage curve from equation (6.1). Consequently, the equilibrium wage rate (w/P)
1
lies above the market clearing wage rate. This causes unemployment equal to (L
S
)
1
L
1
.
In htmodel.gms, we specify the wage equation, g(ur) using an elasticity parameter, :
w
P
= g(ur) = ur
1/
if < (6.2)
and
w
P
= 1 if =
As , the real wage curve approaches a a neoclassical, downward-rigid real wage.
Migration
Following Todaro (1970), we link the labor migration rate, the real-wage dierential, and unemploy-
ment. Migration occurs when the expected real wage stream for urban employment is high relative
to rural (informal) employment. In our treatment, workers migrate into the formal labor sector until
informal wages are equal to expected formal wages.
w
I
= (1 ur) w
F
(6.3)
The expected wage in the formal sector is the wage, w
F
, times the employment rate (1ur). In the
htmodel, we specify the initial unemployment rate to be 16%, which was the 1997 rate in Colombia.
As ur rises, the gap between formal and informal wages widens.
Labor supply for the formal and informal sectors is determined by the migration rate and the
unemployment rate. First, the supply of formal labor is equal to the employed fraction of the
workers who chose to migrate to the formal sector:
L
F
= L
F
0
1 ur
1 ur
0
m
m
0
(6.4)
where m is the migration rate between the informal and formal labor sectors, ur
0
is the initial
unemployment rate, and L
F
0
is the benchmark formal labor supply. Then the informal labor supply
is equal to those workers who did not migrate:
L
I
= L
I
0
1 m
1 m
0
. (6.5)
150
The analyst is free to choose the elasticity of transformation between the formal and informal labor
sectors. In the Overview of the Harris-Todaro model for Colombia, this elasticity is estimated at
3
10
.
In the htmodel framework, the net migration level will depend upon this elasticity of transformation,
as well as the wage equation parameter, , and the unemployment rate.
6.3.7 Equilibrium Conditions
Three equation classes dene an Arrow-Debreu equilibrium in mcfmodel.gms:
Zero Prots: Cost
i
(p) Rev
i
(p) Y
i
Market Clearance: D
i
+M
i
j
A
ij
+E
i
+RA
i
+GOV
i
p
i
Income Balance:
i
p
i
A
i
w
L +p
K
K +p
R
R +trn I for (GOV,RA)
Zero Prot Thee rst class of constraint requires that in equilibrium no producer earns an excess
prot, i.e. the value of inputs per unit activity must be equal to or greater than the value of outputs.
The corresponding complementary variable for a zero prot condition is output (Y
i
). Holding all
else equal, if output prices rise for commodity i, production activity increases until marginal cost
equals marginal revenue.
Market Clearance The second class of equilibrium conditions is that at equilibrium prices and ac-
tivity levels, the supply of any commodity must balance or exceed excess demand by consumers
and producers. The equation above refers to produced commodities, a similar constraint holds for
endowed goods like labor, capital and resources.
The corresponding complementary (dual) variable for the market clearance condition is price (p
i
or
p
F
, p
K
, P
R
, w). Prices adjust until supply equals demand for a given commodity or factor.
Income Balance The third condition is that at an equilibrium, the value of each agents income
must equal the total value of expenditures. We always work with utility functions which exhibit
non-satiation, so Walras law always holds.
6.4 Conducting Economic Policy Analysis
6.4.1 Example: Compute the Marginal Cost of Funds
Having implemented the model we do some initial calculations in which we assess the welfare cost
of the ve tax instruments. In each calculation we proportionally increase tax rates by 10%. The
tax streams we evaluate are the value-added tax (revenue 4.2), the import tari (1.1), the labor
tax (1.6), the direct tax on capital (4.1) and other indirect taxes (3.8). When we scale tax rates,
consumers and producers adjust behavior to produce a new equilibrium consistent with a new level
of government income and expenditure. Government expenditure increases less than proportionally
151
Table 6.8: Marginal Eciency and Incidence of Base Year Taxes
Y IELD MCF MCF
F
MCF
I
MCF
K
VAT 70% 1.27 -0.12 -0.19 -0.71
TY 75% 1.30 -0.02 -0.52 -0.38
TM 66% 1.09 0.11 -0.61 -0.26
TL 71% 1.10 -0.36 -0.18 -0.15
TK 62% 1.10 0.33 -0.18 -1.20
to the tax rate as a result of changes in individual behavior.
Table 6.8 indicates the results of calculations with the static model. There is one row for each of
the tax instruments. The rst column of Table 6.8 indicates the responsiveness of the tax based to
changes in the tax rate. A 70% yield means that when the tax rate is increased by 10%, aggregate
tax revenues only increase by 7%. The column titled MCF indicates the marginal cost of funds,
based on the welfare cost of a marginal tax increase. This column suggests that in a static model
the system of indirect taxes (TY ) is the most costly source of tax revenue while the import tari
(TM) is the least costly revenue source, in which the economic cost of raising $1 of additional public
revenue costs roughly $1.10.
The nal three columns in Table 6.8 indicate the marginal incidence of each tax instrument for formal
labor (MCF
F
), informal labor (MCF
I
) and capital (MCF
K
). The marginal incidence indicates the
percentage change in the real return to each of these factors per percentage increase in tax revenue.
The value of -0.12 for VAT for formal labor indicates that a one percent increase in tax revenue
nanced through an increase in the VAT produces a 0.2% decrease in the real wage of formal sector
workers and a 0.7% decrease in the real return to capital.
6.4.2 Short Run vs. Long Run Tax Incidence
Table 6.9: Tax Eciency in the Steady-State
Y IELD MCF MCF
F
MCF
I
MCF
K
K
VAT 67% 1.72 -0.45 -0.44 -0.07 -1.65%
TY 73% 1.56 -0.20 -0.71 0.02 -0.88%
TM 64% 1.32 -0.06 -0.79 0.16 -0.21%
TL 70% 1.20 -0.43 -0.24 0.01 -0.14%
TK 57% 1.86 -0.20 -0.65 -0.07 -2.31%
1. The K column shows the percentage change in the national
capital stock.
The cost of additional funds, when taken from a long-run perspective shows us two things. First,
152
the cost of funds is much higher when agents are allowed more time to adjust. The marginal cost
of funds (MCF) column in Table 6.9 is about 50% higher when taken from a long-run perspective.
This is intuitive, since in the long-run, the demand for all goods is relatively more elastic, which
implies a less-ecient tax instrument. Second, we see that raising direct labor taxes is less costly
in the long-run. This is obvious given that we are now allowing capital stock to adjust to changes
in the economy. In most dynamic tax analyses (cite some papers here), investigators nd that
labor taxation is preferred from an eciency standpoint because long-run labor supply is relatively
inelastic when compared to long-run capital supply. Import taris remain a relatively in-expensive
source of government revenues relative to capital or indirect taxation.
6.5 Data Processing
The rst step in dealing with a SAM is to transfer the data into GAMS readable format. In order
to transfer an Excel le into GAMS format, we use the following:
sam1996.xls (Original data le)
sam.gms (Data extraction program)
xllink.exe (XL conversion utility)
gams2prm.gms (GAMS data utility)
If you do not have xllink.exe and gams2prm.gms, read about how to download and install them
at: http://debreu.colorado.edu/inclib/tools.htm
We start with the Microsoft Excel le named sam1996.xls. The spreadsheet consists of row and
column headings, and a 37x37 data matrix. The data ows from the xls le into the model as
depicted in Figure 6.6:
Figure 6.6: Data Flow from Excel to GAMS
sam1996.xls --------> sam.dat ---------> mcfmodel.gms ----> output
| |
sam.gms data-checking
xlimport.gms sam(r,c)
gams2prm.gms map(*,r)
First, sam.gms manages the data transfer from .xls to .dat, then sam.dat is included directly
into the main GAMS model, mcfmodel.gms. The rst part of mcfmodel.gms interprets the national
accounts data and checks for consistency. At this point, the data is ready to be included in the CGE
model. In order to minimize the number of potential mistakes, we stress the necessity of multiple
checks during the process of data transformation and model building.
153
Converting the data from XL format into GAMS-readable format is a one-time aair. Once the data
is converted, only the GAMS dataset (sam.dat) is required
6
. Each step in this process is described
below.
6.5.1 The Excel input le
Each account is referenced in the xls le using a long description, such as Forestry, Fishing and
Hunting. To facilitate moving the data out of the spreadsheet, row and column index numbers are
used to identify each element. The descriptive sector names will be re-applied downstream, in the
model itself.
Figure 6.7: The 1996 Colombia SAM with Numbered Rows and Columns
6.5.2 Reading the SAM into GAMS with XLIMPORT
A small GAMS program, called sam.gms moves the 1996 data from xls format into a GAMS
dataset
7
. sam.gms uses the spreadsheet import routine, xlimport
8
, which must be installed before
data can be moved between GAMS and Excel. The basic syntax for xlimport is as follows:
$LIBINCLUDE xlimport parameter le range
where
parameter is a name of the GAMS parameter to which data will be retrieved;
le is a name of a le from which data will be read;
range is a range of data in the file which needs to be imported.
This command is part of sam.gms, shown below:
sam.gms (partial listing):
1 set r /1*37/; alias (r,c);
2 parameter sam(r,c) Original SAM data for 1996;
3 $libinclude xlimport sam sam1996.xls samdata
4
5 file kdat/sam.dat/; put kdat;
6 $libinclude gams2prm sam
6
Of course, hold onto the original data in case sam.dat becomes unreadable or is deleted!
7
It is useful to note that a GAMS dataset is simply a text le which complies with GAMS syntax. GAMS datasets
are not binary, and they can be opened and viewed with any text editor.
8
xlimport, xlexport, and xldump are all functions included in the xllink.exe utility. For installation and syntax
information, visit http://debreu.colorado.edu/xllink/xllink.htm
154
Line 1 denes the row and column dimensions for the spreadsheet to import. Thus, rows and columns
1 . . . 37 should correspond to rows/columns in the spreadsheet. Next, the parameter sam(r,c) is
dened as a 37x37 matrix to hold the original spreadsheet data. sam(r,c) is used as a temporary
place-holder for the data until economic parameters are dened in the main GAMS model. Line 3
executes the xllink.exe utility and extracts the data from the Excel spreadsheet.
A new datale is created using lines 5 and 6. First an output handle (kdat) is created. This handle
is an alias for the physical le, called sam.dat, the GAMS data le. The gams2prm utility is used
to export sam(r,c) into the le sam.dat.
Here is the dataset created using sam.gms:
sam.dat (partial listing):
parameter sam Original SAM data for 1996/
*=>gams2prm sam
* Called from J:\SAM.GMS, line 1479
* 11/29/01 09:41:04
1.2 2.1250985919499E+00
1.3 5.6248830334883E-01
1.4 1.0322435297989E-01
1.6 4.4898020242278E-05
1.7 2.0578320648199E+02
1.8 2.2765243456326E+01
1.9 5.2251918488353E+00
1.10 7.3400583958944E-06
1.11 3.1007968762837E-01
1.12 2.7406671636713E-01
1.14 3.4119510427834E-02
...
sam.dat is a text le which can be inserted directly into any GAMS program. The gams2prm utility
dened the parameter sam, using the same description as in sam.gms, then wrote out each element
of the matrix according to index number. For example, element 1.9, equal to about 5.22 million
1996 dollars, represents the input of Coee into the Natural Resource Intensive Industries sector.
We insert sam.dat into the main GAMS program, mcfmodel.gms, then dene each data element for
use in the model.
6.5.3 Economic Accounting and Consistency Checks
At this point, we can include the data into mcfmodel.gms and make some economic interpretations.
The sam.dat data le is inserted by using the $include directive, as in
mcfmodel.gms (partial listing):
$include sam.dat
This pastes the contents of sam.dat into the program exactly where the $include statement is used.
155
Data Mapping GAMS provides users with the luxury of using human notation for set elements.
For example, the Oil sector in the model could have been called sector 5, but a much better
abbreviation is something like oil. So we dene a set of production sectors, S, with each row of
the SAM as elements:
mcfmodel.gms (partial listing):
set s Sectors /
cof Coffee
cro Other crops
lvs Livestock
ffh Forestry fishing and hunting
Next, we make an association between the set S, and the rows/columns in the dataset. This can
be done eciently by using a temporary set called map(*,r). Where the basis of this set can be
anything in the rst dimension (denoted by the wildcard symbol, *), but only elements of the set
r in the second dimension (which contains the digits 1 . . . 37). It is easy to see that the denition
of map simply connects each element of s to the corresponding row in the SAM. Coee (cof) is
connected with row number 1, and so on:
set map(*,r) Mapping onto the SAM rows /
cof.1 Coffee
cro.2 Other crops
lvs.3 Livestock
ffh.4 Forestry fishing and hunting
oil.5 Oil
Parameter Assignments The base-year economic ows are dened by picking elements from sam(r,c).
For example, intermediate inputs are inserted into the parameter id0(s,ss) by picking out the di-
agonal elements:
loop((s,ss,r,c)$(map(s,r)*map(ss,c)),
id0(s,ss) = sam(r,c);
sam(r,c) = 0;
);
Final consumption is assigned to a parameter called c0(s), and is dened by picking up the elements
of column number 29:
c0(s) = sam(c,"29");
To verify that we are getting the correct element from the 1996 spreadsheet, take a look at the
IO table and verify that households consume 12,613 million dollars worth of Foodstus, then check
corresponding values for c0:
---- 675 PARAMETER C0 Household consumption demand
thr 3.443, fod 12.613, nri 6.552, nsi 6.602, htc 6.243
156
ser 20.924, gov 0.917
As expected, the fod listing above shows 12.613 billion, or 12,613 million
9
.
The rest of these parameters are assigned similarly. The loop statement repeats the exercise for
each sector and column, so long as map(s,c) exists. A portion of these assignments is below:
loop((s,c)$map(s,c),
* Extract components of final demand:
c0(s) = sam(c,"29"); sam(c,"29") = 0;
g0(s) = sam(c,"30"); sam(c,"30") = 0;
x0(s) = sam(c,"33"); sam(c,"33") = 0;
* Extract margin supply and demand:
md0("trade",s) = max(0, sam("25",c));
ms0("trade",s) = max(0, -sam("25",c));
... and so on ...
6.5.4 Accounting Identities
Some simple accounting checks often help ensure the national accounts have been correctly inserted.
For example, we check a consumption-production identity. Domestic consumption, a0(s), can be
calculated two ways, via domestic production and imports:
a
0
s
= d
0
s
+m
0
s
pm
0
s
+
m
_
md
0
m,s
ms
0
m,s
_
or via nal demand, investment, and government:
a
0
s
=
ss
id
0
s,ss
+c
0
s
+i
0
s
+g
0
s
The equivalence is checked in mcfmodel.gms using parameter denitions:
a0(s) = d0(s) + m0(s)*pm0(s) + sum(m, md0(m,s)-ms0(m,s));
parameter mktchk(s) Cross check of consistency;
mktchk(s) = a0(s) - sum(ss, id0(s,ss)) - c0(s) - i0(s) - g0(s);
display mktchk;
mktchk is displayed in the listing le:
---- 723 PARAMETER MKTCHK Cross check of consistency
cof 5.80092E-15, cro 7.21645E-16, lvs 8.64846E-15, ffh 2.17465E-14,
oil -7.5530E-15, min 4.87175E-15, thr 5.79536E-14, fod 3.98848E-13,
nri -7.1831E-14, nsi 7.27196E-14, htc 1.84741E-13, con -3.7303E-14,
trn 1.77636E-15, ele -9.3259E-15, com 2.84217E-14, ser 9.85656E-13,
gov 1.70530E-13
The accounts are consistent because mktchk is a very small number
10
.
9
The values from the original IO table were scaled by 1000, making the unit of measurement, billions of US dollars.
10
Typically, we consider numbers less than 1e-6 to be fairly small, and 1e-10 small enough to be a result of computer
tolerances.
157
158
7. Nested CES Functions
This chapter of the guide provides some backgound documentation on the application of nested CES
functions. While MPSGE greatly simplies the use of CES functions, an informed user needs to
understand the properties and application of the functional form in order to construct useful models.
7.1 CES Utility
In many economic textbooks the constant-elasticity-of-substitution (CES) utility function is dened
as:
U(x, y) = (x
+ (1 )y
)
1/
It is a tedious but straight-forward application of Lagrangian calculus to demonstrate that the
associated demand functions are:
x(p
x
, p
y
, M) =
_
p
x
_
p
1
x
+ (1 )
p
1
y
and
y(p
x
, p
y
, M) =
_
1
p
y
_
p
1
x
+ (1 )
p
1
y
.
The corresponding indirect utility function has is:
V (p
x
, p
y
, M) = M
_
p
1
x
+ (1 )
p
1
y
_ 1
1
Note that U(x, y) is linearly homogeneous:
U(x, y) = U(x, y)
This is a convenient cardinalization of utility, because percentage changes in U are equivalent to
percentage Hicksian equivalent variations in income. Because U is linearly homogeneous, V is
homogeneous of degree one in M:
V (p
x
, p
y
, M) = V (p
x
, p
y
, M)
159
and V is homogeneous of degree -1 in p.
V (p
x
, p
y
, M) =
V (p
x
, p
y
, M)
.
Furthermore, linear homogeneity permits us to form an exact price index corresponding to the cost
of a unit of utility:
e(p
x
, p
y
) =
_
p
1
x
+ (1 )
p
1
y
_ 1
1
The indirect utility function can then be written:
V (p
x
, p
y
, M) =
M
e(p
x
, p
y
)
Conceptually, this equation states that the utility which can be realized with income M and prices
p
x
and p
y
is equal to the income level divided by the unit cost of utility. The key idea is that
when the underlying is linearly homogeneous, utility can be represented like any other good in the
economy. Put another way, without loss of generality, we can think of each consumer demanding
only one good.
7.2 CES Technology
In the representation of technology, we have a set of relationships which are directly analogous to the
CES utility function. These relationships are based on the cost and compensated demand functions.
If we have a CES production function of the form:
y(K, L) = (K
+ (1 )L
)
1/
the unit cost function then has the form:
c(p
K
, p
L
) =
1
p
1
K
+ (1 )
p
1
L
_ 1
1
and associated demand functions are:
K(p
K
, p
L
, y) =
_
y
__
c(p
K
, p
L
)
p
K
_
and
L(p
K
, p
L
, y) =
_
y
__
(1 )c(p
K
, p
L
)
p
L
_
.
In most large-scale applied general equilibrium models, we have many function parameters to specify
with relatively few observations. The conventional approach is to calibrate functional parameters
to a single benchmark equilibrium. For example, if we have benchmark estimates for output, labor,
160
capital inputs and factor prices , we calibrate function coecients by inverting the factor demand
functions:
=
p
K
K
p
K
K + p
L
L
, =
1
, =
p
K
K
1/
p
K
K
1/
+ p
L
L
1/
and
= y
_
+ (1 )
1/
7.3 The Calibrated Share Form
Calibration formulae for CES functions are messy and dicult to remember. Consequently, the
specication of function coecients is complicated and error-prone. For applied work using cali-
brated functions, it is much easier to use the calibrated share form of the CES function. In the
calibrated form, the cost and demand functions explicitly incorporate
benchmark factor demands
benchmark factor prices
the elasticity of substitution
benchmark cost
benchmark output
benchmark value shares
In this form, the production function is written:
y = y
_
_
K
K
_
+ (1 )
_
L
L
_
_
1/
The only calibrated parameter, , represents the value share of capital at the benchmark point, i.e.
=
p
K
K
p
K
K + p
L
L
The corresponding cost functions in the calibrated form is written:
c(p
K
, p
L
) = c
_
_
p
K
p
K
_
1
+ (1 )
_
p
L
p
L
_
1
_ 1
1
where
c = p
L
L + p
K
K
161
and the compensated demand functions are:
K(p
K
, p
L
, y) =
K
y
y
_
p
K
c
p
K
c
_
and
L(p
K
, p
L
, y) =
L
y
y
_
c p
L
c p
L
_
Normalizing the benchmark utility index to unity, the utility function in calibrated share form is
written:
U(x, y) =
_
_
x
x
_
+ (1 )
_
y
y
_
_
1/
The unit expenditure function can be written:
e(p
x
, p
y
) =
_
_
p
x
p
x
_
1
+ (1 )
_
p
y
p
y
_
_ 1
1
,
the indirect utility function is:
V (p
x
, p
y
, M) =
M
Me(p
x
, p
y
)
,
and the demand functions are:
x(p
x
, p
y
, M) = x V (p
x
, p
y
, M)
_
e(p
x
, p
y
) p
x
p
x
_
and
y(p
x
, p
y
, M) = y V (p
x
, p
y
, M)
_
e(p
x
, p
y
) p
y
p
y
_
.
The calibrated form extends directly to the n-factor case. An n-factor production function is written:
y = f(x) = y
_
i
_
x
i
x
i
_
_
1/
and has unit cost function:
C(p) =
C
_
i
_
p
i
p
i
_
1
_ 1
1
and compensated factor demands:
x
i
= x
i
y
y
_
C p
i
C p
i
_
162
7.4 Exercises with CES Functions
1. Show that given a generic CES utility function:
U(x, y) = (
+ (1 )y
)
1/
can be represented in share form using:
x = 1, y = 1, p
x
= t, p
y
= t(1 ),
M = t.
for any value of t > 0.
2. Consider the utility function dened:
U(x, y) = (x a)
(y b)
1
A benchmark demand point with both prices equal and demand for y equal to twice the
demand for x. Find values for which are consistent with optimal choice at the benchmark.
Select these parameters so that the income elasticity of demand for x at the benchmark point
equals 1.1.
3. Consider the utility function:
U(x, L) = (L
+ (1 )x
)
1/
which is maximized subject to the budget constraint:
p
x
x = M +w(
L L)
in which M is interpreted as non-wage income, w is the market wage rate. Assume a benchmark
equilibrium in which prices for x and L are equal, demands for x and L are equal, and non-
wage income equals one-half of expenditure on x. Find values of and consistent with these
choices and for which the price elasticity of labor supply equals 0.2.
4. Consider a consumer with CES preferences over two goods. A price change makes the bench-
mark consumption bundle unaordable, yet the consumer is indierent. Graph the choice.
Find an equation which determines the elasticity of substitution as a function of the bench-
mark value shares. (You can write down the equation, but it cannot be solved in closed form.)
5. Consider a model with three commodities, x, y and z. Preferences are CES. Benchmark
demands and prices are equal for all goods. Find demands for x, y and z for a doubling in the
price of x as a function of the elasticity of substitution.
6. Consider the same model in the immediately preceeding question, except assume that prefer-
ences are instead given by:
U(x, y, z) = ( min(x, y)
+ (1 )z
)
1/
Determine from the benchmark, and nd demands for x, y and z if the price of x doubles.
163
7. Consider a two-period model in which consumers maximizes the discounted present value of
utility:
U(c
1
, c
2
) =
c
1
1
1
+
c
1
2
1
subject to the budget constraint:
c
1
+
c
2
1 +r
= 1 +
1
1 +r
in which is the discount factor, is the intertempoal elasticity parameter and r is the given
interest rate.
Use the calibrated share formulation to show (on inspection) that the equivalent variation of
a change in the interest rate from r
0
to r is equal to:
EV = M/
M 1 =
_
2 +r
2 +r
0
__
1 +r
0
1 +r
__
1 +
1/
(1 +r)
1/1
1 +
1/
(1 +r
0
)
1/1
_/(1)
1
8. Mikki once lived in Boulder and spent 30% of her income for rent, 10% for food and 60% for
skiing. She then moved to Georgetown where rent and food prices are identical to Boulder. In
Georgetown, however, Mikki discovered that the quality-adjusted cost of skiing was ten-times
the cost of skiing in Boulder. She adopted a lifestyle in which she spend only 30% of her
income on skiing. Suppose that her preferences are characterized by a CES utility function.
What values of and describe Mikkis utility function?
9. What fraction of Mikkis income does she spend on rent in Georgetown?
10. How much larger would Mikkis income need to be to compensate for the higher cost of skiing
such that she would be indierent between living in Boulder or Georgetown.
7.5 Benchmarking Supply Functions
This section describes how calibrate the xed factor input for constant returns to scale CES technol-
ogy and in order to obtain a specied price elasticity of supply at a reference point. We rst consider
the long-run model with one xed and one variable factor. We then consider the transitional model
in which it may be helpful to calibrate a model to both the short- and long-run supply responses.
7.5.1 A Long-run Model
For concreteness, consider output as a function of labor and capital inputs. Consider the labor
input to be variable and the capital input to be xed. We then have a CES cost function which in
equilibrium denes the price of output:
p = c(r, w)
in which w is the exogenous wage rate and r is the residual return to the sectors xed factor.
Because this factor is xed, by Shepards lemma we have the following relationship between output,
164
the supply of the xed factor and the return to the xed factor:
y
c(r, w)
r
=
R
If we use the calibrated CES cost function of the form:
c(r, w) =
_
r
1
+ (1 )w
1
_ 1
1
then the calibration problem consists of nding a values for and for which:
y
(p/w)
(p/w)
y
=
at the benchmark point.
Note that we are free to choose units of the specic factor such that its benchmark price is unity.
Hence, when we calibrate the share parameter, we are also determining the supply of the xed factor:
R = y
in which we scale the benchmark price of output to unity.
If the relative price of output and the variable factor depart from their benchmark values, the supply
constraint for sector-specic can be inverted to obtain an explicit expression for the return:
r = p
_
y
R
_
1/
where we have substituted the equilibrium price for the cost function. Substituting back into the
cost function, we have
p
1
= p
1
_
y
R
_
1
+ (1 )w
1
or
y =
R
1
1
_
1 (1 )
_
w
p
_
1
_
1
Dierentiating this expression with respect the relative price of output, and setting all prices equal
to unit, we have:
=
(1 )
This equation can be used in a variety of ways to calibrate the supply function. One approach would
be to choose the value share of the xed factor to match the base year prots, and then assign the
elasticity according to:
=
(1 )
165
Alternatively, one choose to use a Cobb-Douglas function and set the specic factor value share
accordingly:
=
1
1 +
7.5.2 Calibrating Both Short- and Long-Run Responses
In a dynamic model it may be helpful to introduce two notions of the elasticity of supply: short-run
and long-run. A simple way to introduce this distinction into a numerical model is to work with a
three factor production function:
y = f(L, K, R)
where L is labor, a production factor which is variable in both the short and long run, K is capital,
a quasi-xed production factor which is variable in the long run but xed in the short run, and R is
a sector-specic resource which is xed in both the short and long run.
We can write the long-run production function as:
y = y
_
L
_
L
L
_
+
K
_
K
K
_
+ (1
L
K
)
_
1/
The R input does not appear in the calibrated production function because we have assumed that
R is equal to the benchmark value. In the short-run model, we have:
y = y
_
L
_
L
L
_
+ (1
L
)
_
1/
If the short-run elasticity of supply is given by
S
, and the labor value share (
L
) is given in the
benchmark data, we can then calibrate the elasticity of substitution to match these inputs:
=
S
1
L
L
Let us assume that while the labor value share is observed (employment statistics are commonly
available for many secttors and regions), but the allocation of the remaining value added is not
known with certainty. We can take advantage of this uncertainty to calibrate the long-run supply
response by choosing the capital value as:
K
=
L
+
L
L
given the value of previously calibrated. It can be shown that when
L
>
S
and we nd that
K
< 1
L
.
166
7.6 Flexibility and Non-Separable CES
We let
i
denote the user price of the ith input, and let x
i
() be the cost-minizing demand for the
ith input. The reference price and quantities are
i
and x
i
. One can think of set i as {K, L, E, M}
but the methods we employ may be applied to any number of inputs. Dene the reference cost, and
reference value share for ith input by
C and
i
, where
i
i
x
i
and
i
i
x
i
C
The single-level constant elasticity of substitution cost function in calibrated form is written:
C() =
C
_
i
_
i
i
_
1
_ 1
1
Compensated demands may be obtained from Shephards lemma:
x
i
() =
C
i
C
i
= x
i
_
C()
C
i
i
_
ij
C
ij
C
C
i
C
j
where
C
ij
2
C()
i
j
=
x
i
j
=
x
j
i
For single-level CES functions:
ij
= i = j
The CES cost function exibits homogeneity of degree one, hence Eulers condition applies to the
second derivatives of the cost function (the Slutsky matrix):
j
C
ij
()
j
= 0
or, equivalently:
ij
j
= 0
The Euler condition provides a simple formula for the diagonal AUES values:
ii
=
j=i
ij
i
167
As an aside, note that convexity of the cost function implies that all minors of order 1 are negative,
i.e.
ii
< 0 i. Hence, there must be at least one positive o-diagonal element in each row of
the AUES or Slutsky matrices. When there are only two factors, then the o-diagonals must be
negative. When there are three factors, then only one pair of negative goods may be complements.
Let:
k index a second-level nest
s
ik
denote the fraction of good i inputs assigned to the kth nest
k
denote the benchmark value share of total cost which enters through the kth nest
denote the top-level elasticity of substitution
k
denote the elasticity of substitution in the kth aggregate
p
k
() denote the price index associated with aggregate k, normalized to equal unity in the benchmark,
i.e.:
p
k
() =
_
i
s
ik
i
i
)
1
k
_ 1
1
k
The two-level nested, nonseparable constant-elasticity-of-substitution (NNCES) cost function is then
dened as:
C() =
C
_
k
p
k
()
1
_ 1
1
Demand indices for second-level aggregates are needed to express demand functions in a compact
form. Let z
k
() denote the demand index for aggregate k, normalized to unity in the benchmark;
i.e.
z
k
() =
_
C()
C
1
p
k
()
_
Compensated demand functions are obtained by dierentiating C(). In this derivative, one term
arise for each nest in which the commodity enters, so:
x
i
() = x
i
k
z
k
()
_
p
k
()
i
i
_
k
= x
i
k
_
C()
C
1
p
k
()
_
_
p
k
()
i
i
_
k
Simple dierentiation shows that benchmark cross-elasticities of substitution have the form:
ij
= +
k
(
k
)s
ik
s
jk
k
Given the benchmark value shares
i
and the benchmark cross-price elasticities of substitution,
ij
,
we can solve for values of s
ik
,
k
,
k
and . A closed-form solution of the calibration problem is
168
not always practical, so it is convenient to compute these parameters using a constrained nonlin-
ear programming algorithm, CONOPT, which is available through GAMS, the same programming
environment in which the equilibrium model is specied. Perroni and Rutherford prove that cali-
bration of the NNCES form is possible for arbitrary dimensions whenever the given Slutsky matrix
is negative semi-denite. The two-level (N N) function is exible for three inputs; and although
we have not proven that it is exible for 4 inputs, the only diculties we have encountered have
resulted from indenite calibration data points.
7.7 Calibrating Three Factor Cost Functions
1 $TITLE Two nonseparable CES calibrations for a 3-input cost function.
2
3 * Model-specific data defined here:
4
5 SET i Production input aggregates / A,B,C /; ALIAS (i,j);
6
7 PARAMETER
8
9 theta(i) Benchmark value shares /A 0.2, B 0.5, C 0.3/
10
11 aues(i,j) Benchmark cross-elasticities (off-diagonals) /
12 A.B 2
13 A.C -0.05
14 B.C 0.5 /;
15
16 * Use an analytic calibration of the three-factor CES cost
17 * function:
18
19 ABORT$(CARD(i) <> 3) "Error: not a three-factor model!";
20
21 * Fill in off-diagonals:
22
23 aues(i,j)$aues(j,i) = aues(j,i);
24
25 * Verify that the cross elasticities are symmetric:
26
27 ABORT$SUM((i,j), ABS(aues(i,j)-aues(j,i))) " AUES values non-symmetric?";
28
29 * Check that all value shares are positive:
30
31 ABORT$(SMIN(i, theta(i)) <= 0) " Zero value shares are not valid:",THETA;
32
33 * Fill in the elasticity matrices:
34
35 aues(i,i) = 0; aues(i,i) = -SUM(j, aues(i,j)*theta(j))/theta(i); DISPLAY aues;
36
37 SET n Potential nesting /N1*N3/
38 k(n) Nesting aggregates used in the model
39 i1(i) Good fully assigned to first nest
40 i2(i) Good fully assigned to second nest
169
41 i3(i) Good split between nests;
42
43 SCALAR assigned /0/;
44
45 PARAMETER
46 esub(*,*) Alternative calibrated elasticities
47 shr(*,i,n) Alternative calibrated shares
48 sigma(n) Second level elasticities
49 s(i,n) Nesting assignments (in model)
50 gamma Top level elasticity (in model);
51
52 * First the Leontief structure:
53
54 esub("LTF","GAMMA") = SMAX((i,j), aues(i,j));
55 esub("LTF",n) = 0;
56 LOOP((i,j)$((aues(i,j) = esub("LTF","GAMMA"))*(NOT assigned)),
57 i1(i) = YES;
58 i2(j) = YES;
59 assigned = 1;
60 );
61
62 i3(i) = YES$((NOT i1(i))*(NOT i2(i)));
63 DISPLAY i1,i2,i3;
64 LOOP((i1,i2,i3),
65 shr("LTF",i1,"N1") = 1;
66 shr("LTF",i2,"N2") = 1;
67 shr("LTF",i3,"N1") = theta(i1)*(1-aues(i1,i3)/aues(i1,i2)) /
68 ( 1 - theta(i3) * (1-aues(i1,i3)/aues(i1,i2)) );
69 shr("LTF",i3,"N2") = theta(i2)*(1-aues(i2,i3)/aues(i1,i2)) /
70 ( 1 - theta(i3) * (1-aues(i2,i3)/aues(i1,i2)) );
71 shr("LTF",i3,"N3") = 1 - shr("LTF",i3,"N1") - shr("LTF",i3,"N2");
72 );
73 ABORT$(SMIN((i,n), shr("LTF",i,n)) < 0) "Benchmark AUES is indefinite.";
74
75 * Now specify the two-level CES function:
76
77 esub("CES","GAMMA") = SMAX((i,j), aues(i,j));
78 ESUB("CES","N1") = 0;
79 LOOP((i1,i2,i3),
80 shr("CES",i1,"N1") = 1;
81 shr("CES",i2,"N2") = 1;
82 esub("CES","N2") = (aues(i1,i2)*aues(i1,i3)-aues(i2,i3)*aues(i1,i1)) /
83 (aues(i1,i3)-aues(i1,i1));
84 shr("CES",i3,"N1") =
85 (aues(i1,i2)-aues(i1,i3)) / (aues(i1,i2)-aues(i1,i1));
86 shr("CES",i3,"N2") = 1 - shr("CES",i3,"N1");
87 );
88 ABORT$(SMIN(n, esub("CES",n)) < 0) "Benchmark AUES is indefinite?";
89 ABORT$(SMIN((i,n), shr("CES",i,n)) < 0) "Benchmark AUES is indefinite?";
90
91 PARAMETER price(i) Price indices used to verify calibration,
92 aueschk(*,i,j) Check of benchmark AUES values;
93
170
94 price(i) = 1;
95
96 $ontext
97
98 $MODEL:CHKCALIB
99
100 $SECTORS:
101 Y ! PRODUCTION FUNCTION
102 D(i)
103
104 $COMMODITIES:
105 PY ! PRODUCTION FUNCTION OUTPUT
106 P(i) ! FACTORS OF PRODUCTION
107 PFX ! AGGREGATE PRICE LEVEL
108
109 $CONSUMERS:
110 RA
111
112 $PROD:Y s:gamma k.tl:sigma(k)
113 O:PY Q:1
114 I:P(i)#(k) Q:(theta(i)*s(i,k)) k.TL:
115
116 $PROD:D(i)
117 O:P(i) Q:theta(i)
118 I:PFX Q:(theta(i)*price(i))
119
120 $DEMAND:RA
121 D:PFX
122 E:PFX Q:2
123 E:PY Q:-1
124 $OFFTEXT
125 $SYSINCLUDE mpsgeset CHKCALIB
126
127 SCALAR delta /1.E-5/;
128 SET function /ltf, ces/;
129 alias (i,ii);
130
131 LOOP(function,
132 k(n) = YES$SUM(i, shr(function,i,n));
133 gamma = esub(function,"GAMMA");
134 sigma(k) = esub(function,k);
135 s(i,k) = shr(function,i,k);
136 loop(ii,
137 price(j) = 1; price(ii) = 1 + delta;
138 $INCLUDE CHKCALIB.GEN
139 SOLVE CHKCALIB USING MCP;
140 aueschk(function,j,ii) = (D.L(j)-1) / (delta*theta(ii));
141 ));
142 aueschk(function,i,j) = aueschk(function,i,j) - aues(i,j);
143 DISPLAY aueschk;
144
145 * Evaluate the demand functions:
146
171
147 $LIBINCLUDE plot
148
149 SET pr Alternative price levels /pr0*pr10/;
150
151 PARAMETER
152 demand(function,i,pr) Demand functions
153 dplot(pr,function) Demand function comparison
154
155 loop(ii,
156 LOOP(function,
157 k(n) = YES$SUM(i, shr(function,i,n));
158 gamma = esub(function,"GAMMA");
159 sigma(k) = esub(function,k);
160 s(i,k) = shr(function,i,k);
161 LOOP(pr,
162 price(j) = 1;
163 price(ii) = 0.2 * ORD(pr);
164 $INCLUDE CHKCALIB.GEN
165 SOLVE CHKCALIB USING MCP;
166 demand(function,ii,pr) = D.L(ii);
167 dplot(pr,function) = D.L(ii);
168 );
169 );
170
171 * Display the comparisons:
172
173 $LIBINCLUDE PLOT dplot
174 );
175
176 DISPLAY demand;
7.8 Calibrating Four Factor Cost Functions
1 $TITLE Numerical calibration of Nested CES from KLEM elasticities
2
3 SET i Production input aggregates / K, L, E, M/; ALIAS (i,j);
4
5 * Model-specific data defined here:
6
7 PARAMETER
8 theta(i) Benchmark value shares /K 0.2, L 0.4, E 0.05, M 0.35/
9
10 aues(i,j) Benchmark cross-elasticities (off-diagonals) /
11 K.L 1
12 K.E -0.1
13 K.M 0
14 L.E 0.3
15 L.M 0
16 E.M 0.1 /;
17
18 SCALAR epsilon Minimum value share tolerance /0.001/;
19
172
20 * Fill in off-diagonals:
21
22 aues(i,j)$aues(j,i) = aues(j,i);
23
24 * Verify that the cross elasticities are symmetric:
25
26 ABORT$SUM((i,j), ABS(aues(i,j)-aues(j,i))) " AUES values non-symmetric?";
27
28 * Check that all value shares are positive:
29
30 ABORT$(SMIN(i, theta(i)) le 0) " Zero value shares are not valid:",theta;
31
32 * Fill in the elasticity matrices:
33
34 aues(i,i) = 0; aues(i,i) = -SUM(j, aues(i,j)*theta(j))/theta(i); DISPLAY aues;
35
36 * Define variables and equations for NNCES calibration:
37
38 SET n Nests within the two-level NNCES function /N1*N4/,
39 k(n) Nests which are in use;
40
41 VARIABLES
42 S(i,n) Fraction of good I which enters through nest N,
43 SHARE(n) Value share of nest N,
44 SIGMA(n) Elasticity of substitution within nest N,
45 GAMMA Elasticity of substitution at the top level,
46 OBJ Objective function;
47
48 POSITIVE VARIABLES S, SHARE, SIGMA, GAMMA;
49
50 EQUATIONS
51 SDEF(i) Nest shares must sum to one,
52 TDEF(n) Nest share in total cost,
53 ELAST(i,j) Consistency with given AUES values,
54 OBJDEF Maximize concentration;
55
56 ELAST(i,j)$(ORD(i) > ORD(j))..
57
58 aues(i,j) =E= GAMMA +
59
60 SUM(k, (SIGMA(k)-GAMMA)*S(i,k)*S(j,k)/SHARE(k));
61
62 TDEF(k).. SHARE(k) =E= SUM(i, theta(i) * S(i,k));
63
64 SDEF(i).. SUM(n, S(i,n)) =E= 1;
65
66 * Maximize concentration at the same time keeping the elasticities
67 * to be reasonable:
68
69 OBJDEF.. OBJ =E= SUM((i,k),S(i,k)*S(i,k))
70
71 - SQR(GAMMA) - SUM(k, SQR(sigma(k)));
72
173
73 MODEL CESCALIB /ELAST, TDEF, SDEF, OBJDEF/;
74
75 * Apply some bounds to avoid divide by zero:
76
77 SHARE.LO(n) = epsilon;
78
79 SCALAR solved Flag for having solved the calibration problem /0/
80 minshr Minimum share in candidate calibration;
81
82 SET tries Counter on the number of attempted calibrations /T1*T10/;
83
84 OPTION SEED=0;
85
86 LOOP(tries$(NOT solved),
87
88 * Initialize the set of active nests and the bounds:
89
90 k(n) = YES;
91 S.LO(i,n) = 0; S.UP(i,n) = 1;
92 SHARE.LO(n) = epsilon; SHARE.UP(n) = 1;
93 SIGMA.LO(n) = 0; SIGMA.UP(n) = +INF;
94
95 * Install a starting point:
96
97 SHARE.L(k) = MAX(UNIFORM(0,1), epsilon);
98 S.L(i,k) = UNIFORM(0,1);
99 GAMMA.L = UNIFORM(0,1);
100 SIGMA.L(k) = UNIFORM(0,1);
101 SDEF.M(i) = 0; TDEF.M(k) = 0; ELAST.M(i,j) = 0;
102
103 SOLVE CESCALIB USING NLP MAXIMIZING OBJ;
104
105 solved = 1$(CESCALIB.MODELSTAT LE 2);
106 IF (solved,
107 minshr = SMIN(k, SHARE.L(k)) - epsilon;
108 IF (minshr EQ 0,
109 k(n)$(SHARE.L(n) = epsilon) = NO;
110 S.FX(i,n)$(not k(n)) = 0;
111 SHARE.FX(n)$(not k(n)) = 0;
112 SIGMA.FX(n)$(not k(n)) = 0;
113 DISPLAY "Recalibrating with the following nests:",k;
114 SOLVE CESCALIB USING NLP MAXIMIZING OBJ;
115 IF (cescalib.modelstat gt 2, solved = 0;);
116 minshr = SMIN(k, SHARE.L(k)) - epsilon;
117 IF (minshr=0, solved = 0;);
118 );
119 );
120 );
121 IF (solved, DISPLAY "Function calibrated:",GAMMA.L,SIGMA.L,SHARE.L,S.L;
122 ELSE DISPLAY "Function calibration fails!";
123 );
124
174
C
0
C
1
C
2
C
k
C
L
p
j
p
i
,
,
,
,
,
,
,
, ,
,
,
,
, ,
@
@
@
@
@
@
@
@
@
@
@
@
k
c
k
(p)
1
0
_
1/1
0
in which:
c
k
(p) =
_
iI
k
ik
p
1
k
i
_
1/1
k
where I
k
indicates the set of commodities entering nest k.
In a more general case, we could have cost aggregates as arguments to other cost aggregates. The
gure shown below displays a graph of the nested CES cost function in which we number the nested
cost functions which lead from the top level to nest containing good i as C
0
(top level), C
1
, . . . , C
L
.
If we construct the cost function from a calibrated benchmark in which input prices and total cost
175
are unity , we can scale the benchmark values of the subaggregate cost functions as unity and express
the demand for good i as:
x
i
= x
i
_
C
L
p
i
_
L
_
C
L1
C
L
_
L1
. . .
_
C
0
C
1
_
0
= x
i
p
L
i
C
0
0
L
n=1
C
n1
n
7.9.1 The Own-Price Elasticity of Demand
By Shephards lemma the derivative of C
n
with respect to p
i
equals the demand for good i per unit
of aggregate n. Recalling that all prices are scaled to unity, the benchmark quantity of aggregate
n equals the sum of the inputs which enter directly or indirectly into that cost function:
X
n
=
jI
n
x
j
and
C
n
p
i
p=1
=
_
0 i / I
n
x
i
X
n
i I
n
We then can compute the compensated own-price elasticity of demand for good i:
i
x
i
p
i
p=1
=
L
+ x
i
_
0
+
L
n=1
n1
X
n
_
7.9.2 The Cross-Price Elasticity of Demand
When we evaluate the elasticity of demand for i with respect to a change in the price of good j, we
can let k denote the deepest price aggregate which contains both p
i
and p
j
. (See Figure 7.1).
The cross derivative can then be computed using the demand function for x
i
, taking into account
the impact of p
j
on C
k
, C
k1
, . . . , C
0
:
x
i
p
j
p=1
= x
i
_
0
C
0
p
j
+
k
n=1
(
n
n1
)
C
n
p
j
_
One means of representing the dependence of x
i
on p
j
is with the Allen-Uzawa elasticity-of-substitution
which:
ij
x
i
p
j
C
0
x
i
x
j
=
0
+
k
n=1
n1
X
n
As a logical check on this elasticity, consider two special cases:
1.
n
=
0
n
This then leads to single level CES, impling a constant cross elasticity of substitution between
all input pairs.
176
2.
n
= 0 n < k
We then have Leontief demand for aggregate k, implying that the elasticity of substitution
between i and j is given by
ij
=
k
N.B. The cross elasticity between i and j is independent of the subnest elasticity for all nests
n > k.
177