Вы находитесь на странице: 1из 18

NAF

International Working Paper Series


Year 2013 paper n. 13/01

Technical Issues for Modelling


Economic Partial Equilibrium Problems with GAMS

Maria Sassi
Department of Economics and Management
University of Pavia – Italy
e-mail : msassi@eco.unipv.it

The online version of this article can be found at:

http://economia.unipv.it/naf/
Scientific Board

Maria Sassi (Editor) - University of Pavia


Johann Kirsten (Co-editor)- University of Pretoria
Gero Carletto - The World Bank
Piero Conforti - Food and Agriculture Organization of the United Nations
Marco Cavalcante - United Nations World Food Programme
Luc de Haese - Gent University
Stefano Farolfi - Cirad - Joint Research Unit G-Eau University of Pretoria
Ilaria Firmian -IFAD
Mohamed Babekir Elgali – University of Gezira
Firmino G. Mucavele - Universidade Eduardo Mondlane
Michele Nardella - International Cocoa Organization
Nick Vink - University of Stellenbosch
Alessandro Zanotta - Delegation of the European Commission to Zambia

Copyright @ Sassi Maria ed.

Pavia -IT

naf@eco.unipv.it

ISBN: 978-88-961889-11-5
1
Basic concepts for quantitative policy analysis

1.1. Introduction
The purpose of this Chapter is the introduction of basic concepts of quantitative policy analysis. They
represent the components of the framework adopted in the section dedicated to modelling with
GAMS.
More precisely, after the clarification of the objective of policy analysis the steps in which it is
articulated are described. Afterwards, this Chapter illustrates the components of a model and
discusses the importance of its solution with respect to the observed values, that is of the base run.
Finally, the different types of model are presented underlining their possible policy evaluation
options.

1.2. Steps in quantitative policy analysis


Quantitative policy analysis involves quantitative methods to:
- Define a policy problem;
- Demonstrate its impact;
- Show potential solutions and policy alternatives.
It can be developed at three different levels corresponding to the policy levels. They are:
- Microeconomic level, which is focused on policies aimed at individual parts of the economy, such
as, industries, businesses and households;
- Sector level, which is targeted to interventions directed to a specific sector of the economy, for
example, the maize sector;
- Macroeconomic level, which is centred on policies aimed at the aggregate economy.
In order to investigate the policy impact, quantitative policy analysis adopts a four-step approach
illustrated in Figure 1.

Figure 1 - Steps in quantitative policy analysis


The roots of the process are represented by the economic theory that, implemented with information
provided by historical trends and experience, provides guidelines to help conceptualise and design
policy interventions. For this reason, quantitative policy analysis can be define as a process aimed at
quantifying the various mechanisms analysed by theory.
On the basis of a theory, quantitative modelling designs a model and estimate parameters and calibrate
the model itself in order to provide the framework for policy simulation.
Modelling and policy simulation are the two core elements of quantitative policy analysis.
Modelling includes the construction of a model and the computation of the base run.

1.3. Construction of a model


Constructing a model consists on the definition of a theoretical construct that represents the
investigated economic process. It is made of equations which represent logical and/or quantitative
relationships (equalities or inequalities) between a set of four components. They are:
- Exogenous variables;
- Endogenous variables;
- Parameters;
- Indices.
The exogenous or independent variables are factors that affect a model without being affected by the
model. They are fixed in the sense that they cannot be manipulated within the economic model.
The endogenous or dependent variables are those whose values are determined within the model.
Parameters or coefficients are fixed values that describe the effect of one exogenous variable on the
endogenous variable.
Let us consider a linear model for the estimate of the quantity of meat demanded by a group of
consumers (D) given a certain level of price (P), income (Y), the related price and income coefficients
(β, γ) and technical efficiency (α). Its mathematical notation and the typology of components is
represented in Figure 2.

Figure 2 - Linear demand model

The exogenous variables and parameters can be further distinguished in uncontrollable and policy
instruments. They are both observable variables and coefficients, but the latter are the objective of
the policy intervention.
In addition, in the model the endogenous variable is selected to enter into the definition of criteria for
policy evaluation.
In our previous example, let us assume that the government controls meat price (policy instrument)
and wants to change it in order to achieve a certain level of meat consumption (criteria for policy
evaluation). The other exogenous variables and the parameters are uncontrollable to the purpose of
the policy intervention (Figure 3).

Figure 3 - Linear demand model with uncontrolled variables and parameters and a policy instrument

The indices are used to specify the elements of an array of numbers (variables and parameters).
Turning to the above described example, let us assume that the same model structure allows
estimating demand of the same group of consumers for not only meat but also maize. The model in
Figure 2 or 3 can be rewritten as:

Di = α i + β i * Pi + γ i * Yi
i = meat , maize
In a model, equations describe a system, namely a set of two or more simultaneous equations with
the same set of unknowns.
Let us consider a linear model for the analysis of the market equilibrium for two commodities, meat
and fish, with demand (D), supply (S) and prices (P) the endogenous variables. The index i is
𝑖𝑖 = 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚, 𝑓𝑓𝑓𝑓𝑓𝑓ℎ
while the equations are
𝐷𝐷𝑖𝑖 = 𝑎𝑎𝑖𝑖 + 𝑏𝑏𝑖𝑖 ∗ 𝑃𝑃𝑖𝑖 (1. Demand function)
𝑆𝑆𝑖𝑖 = 𝑓𝑓𝑖𝑖 + 𝑧𝑧𝑖𝑖 ∗ 𝑃𝑃𝑖𝑖 (2. Supply function)
𝐷𝐷𝑖𝑖 = 𝑆𝑆𝑖𝑖 (3. Equilibrium
condition)
where a and f are the technical coefficients of the demand and supply equations, respectively, and b and
z the price coefficients of demand and supply.
The definition of system of equations provide an important rule in modelling design: in order to be
solved, a system of equations must be characterised by a number of equations equals to the number
of endogenous variables. The model, in our example, is consistent in the sense that it has three unknown
variables (D, S and P) and three equations and, thus, it has a solution.
When the number of equations is greater than the number of endogenous variables, the model is
inconsistent, that is it provides no solution while if the number of equations is less than the number
of endogenous variables, the model has an infinite number of solutions.

1.4. Computation of the base run


Once the model is constructed, its solution for the observed values yields the base run.
Let us consider the linear market equilibrium model specified for meat and fish in the previous
paragraph. Given the observed values for the known components, the endogenous variables can be
estimated as illustrated in the following.
The liner market equilibrium model components are

- Two commodities

𝑖𝑖 = 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚, 𝑓𝑓𝑓𝑓𝑓𝑓ℎ

- The system of equations

𝐷𝐷𝑖𝑖 = 𝑎𝑎𝑖𝑖 + 𝑏𝑏𝑖𝑖 ∗ 𝑃𝑃𝑖𝑖


𝑆𝑆𝑖𝑖 = 𝑓𝑓𝑖𝑖 + 𝑧𝑧𝑖𝑖 ∗ 𝑃𝑃𝑖𝑖

𝐷𝐷𝑖𝑖 = 𝑆𝑆𝑖𝑖

- the observed variables

a technical coefficient of the demand equation

f technical coefficient of the supply equation

b price coefficient of demand

z price coefficient of supply

- the value of the observed variables

𝑎𝑎(𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚) = 1.07 𝑎𝑎(𝑓𝑓𝑓𝑓𝑓𝑓ℎ) = 1.012

𝑏𝑏(𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚) = −0.804 𝑏𝑏(𝑓𝑓𝑓𝑓𝑓𝑓ℎ) = −3.09

𝑓𝑓(𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚) = 1.03 𝑓𝑓(𝑓𝑓𝑓𝑓𝑓𝑓ℎ) = 0.47

𝑧𝑧(𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚) = 1.08 𝑧𝑧(𝑓𝑓𝑓𝑓𝑓𝑓ℎ) = 4.87

For the computation of the base run for meat:

- First, substitute the observed values in the model


𝐷𝐷(𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚) = 1.07 − 0.804 ∗ 𝑃𝑃(𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚) (a)
𝑆𝑆(𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚) = 1.03 + 1.08 ∗ 𝑃𝑃(𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚) (b)
𝐷𝐷(𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚) = 𝑆𝑆(𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚) (c)

- Second, solve the model as follows.


Substitute in equation c, equation a and b
1.07 − 0.804 ∗ 𝑃𝑃(𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚) = 1.03 + 1.08 ∗ 𝑃𝑃(𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚)
Calculate meat equilibrium price
1.07 − 1.03 = (1.08 + 0.804) ∗ 𝑃𝑃(𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚)
0.04 = 1.884 ∗ 𝑃𝑃(𝑚𝑚𝑒𝑒𝑎𝑎𝑎𝑎)
0.04
𝑃𝑃(𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚) = = 0.021
1.884
Substitute meat price in equation a and b and calculate demand and supply that mast be equal because
this quantity is the meat equilibrium quantity
𝐷𝐷(𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚) = 1.07 − 0.804 ∗ 0.021 = 1.053
𝑆𝑆(𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚) = 1.03 + 1.08 ∗ 0.021 = 1.053
For the computation of the base run for fish:

- First, substitute the observed values in the model


𝐷𝐷(𝑓𝑓𝑓𝑓𝑓𝑓ℎ) = 1.012 − 3.09 ∗ 𝑃𝑃(𝑓𝑓𝑓𝑓𝑓𝑓ℎ) (A)
𝑆𝑆(𝑓𝑓𝑓𝑓𝑓𝑓ℎ) = 0.47 + 4.87 ∗ 𝑃𝑃(𝑓𝑓𝑓𝑓𝑓𝑓ℎ) (B)
𝐷𝐷(𝑓𝑓𝑓𝑓𝑓𝑓ℎ) = 𝑆𝑆(𝑓𝑓𝑓𝑓𝑓𝑓ℎ) (C)

- Second, solve the model as follows.


Substitute in equation C, equation A and B
1.012 − 3.09 ∗ 𝑃𝑃(𝑓𝑓𝑓𝑓𝑓𝑓ℎ) =0.47 + 4.87 ∗ 𝑃𝑃(𝑓𝑓𝑓𝑓𝑓𝑓ℎ)
Calculate fish equilibrium price
1.012 − 0.47 = (3.09 + 4.87) ∗ 𝑃𝑃(𝑓𝑓𝑓𝑓𝑓𝑓ℎ)
0.542 = 7.96 ∗ 𝑃𝑃(𝑓𝑓𝑓𝑓𝑓𝑓ℎ)
0.542
𝑃𝑃(𝑓𝑓𝑓𝑓𝑓𝑓ℎ) = = 0.068
7.96
Substitute fish price in equation A and B and calculate demand and supply that mast be equal because
this quantity is the fish equilibrium quantity
𝐷𝐷(𝑓𝑓𝑓𝑓𝑓𝑓ℎ) = 1.012 − 3.09 ∗ 0.068 = 0.801
𝑆𝑆(𝑓𝑓𝑓𝑓𝑓𝑓ℎ) = 0.47 + 4.87 ∗ 0.068 = 0.801
Table 1 summarizes the base run.

Table 1 - Base run for meat and fish


Equilibrium value Meat Fish

Price 0.021 0.068

Quantity 1.053 0.801


1.4.1. Importance of the base run
Calculating the base run has different purposes. Two of them have a specific importance. The solution
of a model for the observed values can be adopted:
- for the validation of the model;
- as a benchmark against which to measure the impact of counterfactual policy scenarios.
The objective of the validation of a model is to seek to minimize the difference between the observed
values of the endogenous variable and its estimated value. The validation techniques can be classified
in:
- Econometric approaches, with which the accuracy of the model is verified by statistical criteria of
goodness of fit;
- Calibration procedures, adopted when the number of available observed values is not enough to
apply econometric techniques.
The second purpose of the base run is to represent the benchmark against which to measure the impact
of alternative simulated policies or shocks. This is a very important point. It means that in order to
understand the effect of a simulation on an endogenous variable, the value of the impact variable after
the simulation must be compare with its base run value and not with its observed value. An example
allows clarifying the issue.
Figure 4 illustrates the historical trend in production of maize in a hypothetical country where two
drought periods brake the normal production years.
Let us model this trend with a linear model where production of maize (y) is a function of labor (x)
that is
𝑦𝑦 = 𝑎𝑎 + 𝑏𝑏 ∗ 𝑥𝑥
where a is equal to 7.055 and b to 0.825.

Figure 4 - Data on production of maize in a


hypothetical country (1990-2012)
40 Second drought
35
30 First drought
25
20
15
10
5
0
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
Historical data on production

Figure 5 compare the base run with the observed historical data

Figure 5 - Data on production of maize in a


hypothetical country and base run (1990-2012)

40
35 Second drought
30 First drought
25
20
15
10
5
0
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012

Historical data on production


Lineare
Base(Historical
run data on production)

Let us introduce a policy aimed at increasing production as described by the “policy impact” line in
Figure 6.

Figure 6 - Data on production of maize in a hypothetical


country, base run and policy impact line (1990-2012)
Base run

If we compare the 2007 observed value with its value in the same year after the policy intervention
we make a mistake because the shock is calculated with a model that predict a level of production, in
that year, represented by the base run. In other words, the effect of a policy must be assessed against
the state predicted by the model that describe how the observed economic process evolves without
the implementation of any shock. In our example, the comparison must be between the base run and
the policy impact lines.

1.5. Taxonomy of models


Models can be classified into four typologies, namely conceptual, analytical, stylized and applied
models (Figure 7).
A model is a simplified framework designed to illustrate a complex observed economic process.
Theoretical framework and mathematical methods allow to filter out its inessential details and to
represent the investigated real complex process in terms of stylized facts, that is to design a conceptual
model. This latter allows describing the observed economic process.
Focusing on few important assumptions and casual mechanisms, casting economic relationships into
a form susceptible to mathematical analysis leads to analytical models. They are suitable for the
investigation of the implications of various sets of postulates with a few assumptions as possible
about the magnitudes of parameters.
Attaching numbers to an analytical model and relating them to the economic performance allows
designing a stylized model. This typology of framework can be adopted not only to investigate the
size of various effects but also to analyse problems that are too difficult to solve analytically or that
have ambiguous analytical answers and hence depend on particular parameter values.
Figure 7 - Taxonomy of models and policy evaluation options

Including in stylized model more details and important features of a particular economy or situation
lead to an applied model. An example can better clarify the distinction between a stylized and applied
model: the former may refer to a group of countries, for instance the Oil-importing countries, while
the applied model is related to a specific country in a group, such as Saudi Arabia.
The specific features of the above mentioned models made them suitable for different purposes. A
conceptualise model allows describing the observed economic process, an analytical model is useful
for strategic planning that is for the definition and analysis of strategies (general, undetailed plan of
action over the long time period in order to achieve the overall organization’s goals), while stylized
and applied models are indicated for policy analysis, that is for the investigation of particular
interventions aimed at specific targets.
2
Introduction to GAMS

2.1. Introduction
GAMS stands for General Algebraic Modeling System. It is a software package for:
- Designing and
- Solving
various types of models.
Originally developed by a group of economists at the World Bank for economic models, GAMS is
today suitable to solve systems of equations in any field of study.
Designing and solving represents the two parts of GAMS (Figure 8).

Figure 8 – The two parts of GAMS

The former is the core of the software that allows creating the model through a specific language. The
latter consists on a set of solvers for running the model.
This Chapter, after some preliminary information on how to download and install GAMS, illustrates
the user interface and provides information on how to start a new project.

2.2. Downloading GAMS and the user interface


A free version of the software can be downloaded at the GAMS Home Page (www.gams.com)
clicking on “Download the current GAMS system”.
The free version of GAMS has some model limitations. They are:
- The number of constraints and variables, which must be lower than 300;
- The number of nonzero elements, which must be not more than 2,000 (of which 1,000 nonlinear);
- The number of discrete variables, for a maximum of 50 (including semi continuous, semi integer
and member of SOS-Sets).
Once installed, clicking on the GAMS icon the software opens showing the user interface (Figure 9).

Figure 9 - GAMS’ user interface

At the top of the user interface there are the Menu headings and the Buttons, which in most cases
are just an alternative way of carrying out functions of the menu options, (Figure 10) whose
meaning is explained in Figure 11.

Figure 10 – Components of the user interface


Figure 11 - Menu headings and buttons
A - Menu headings B- Buttons

2.3. Starting a new project


According to the GAMS’ logic, starting a new project is a three-steps process. It requires to create,
in the following order:
- a folder, which is the box where the project is saved;
- a project within the folder, where the working files are saved;
- the working files within the project box, that is the model and output files (Figure 12).

Figure 12 – Three-steps process


for starting a new project

Working Files

Project

Folder
In practice, the Folder can be open on the desktop or in Documents or in a working folder right-
clicking the mouse, selecting “new” and then “folder”. A new cartel is created on desktop or the other
selected position. It has to be named.
For a project to be created GAMS must be opened. Afterwards, on the menu headings click on
File/Project/New project (Figure 13).

Figure 13 - The first three steps requested for the creation of a project

2 3

The previously originated folder must be opened and then the project must be named and opened
(Figure 14).

Figure 14 - How to give a project a name

MARIAGAMS is the name of Type the


previously created folder to name of the
project
Now the working files can be created clicking on File and then New. The model is written in one of
the working file and its solution in the second working file. They can be saved in the project box
clicking on File on the Menue headings, giving it a name cicking on New and then saving them
selecting the option Save as in File on the Menue headgings (Figure 15).

Figure 15 – How to create and save the working files

1. 3. Write
Project the
FILE Folder model

2 NEW

Вам также может понравиться