Introduction to Quantitative Policy Analysis with GAMS Technical issues for modelling partial equilibrium models Maria Sassi Introduction The purpose of this paper is to provide an introduction to the use of GAMS for economic partial equilibrium problems. No GAMS experience is requested. The basic syntax of the software is supported by examples in order to better clarify how to construct, calibrate and modify models in order to simulate alternative policy options. Each section starts with a short presentation of the theoretical concepts behind the economic partial equilibrium models which find application in the examples. The organization of the paper is reported in Box 1 Box 1 – Organization of the paper Topics Knowledge Skills 1. Introduction to Quantitative Policy Analysis Basics of quantitative policy analysis - Objective and steps of QPA; - Component of a model; - Base run; - Types of models. Understanding of modelling basic concepts Introduction to GAMS - What is GAMS; - Installation; - Knowing the interface; - Starting a new project; - Input and output structure; Understanding of GAMS basic elements 2. Using GAMS for QPA Short introduction of basic concepts of economic theory for modelling with GAMS Modeling with GAMS Developed models with GAMS GAMS elements introduced by exercises Demand Analysis - The concept of demand - The objective of demand analysis - Elasticities and functional form of demand (pragmatic approach, Engel function, LES, AIDS, GAIDS) - Single good, single market linear demand function The structure of a model In GAMS - Single good, two markets linear demand function SET command - Single good, two markets, Engel function, semi-log Engel function - Log - DISPLAY command - Log endogenous variable (.L=1)
Figure 21 – Syntax for the command Parameters Two alternative ways for the specification of the command is illustrated in Figure 22. Figure 22 - Alternative syntax for the command Parameters GAMS also accepts to break this one statement into four, putting a semicolon at the end of each of them, as illustrated for the first alternative by Figure 23. Figure 23 – Alternative use of semicolon in Parameters entry The use of tables and direct assignment for data entry will be illustrated in the following, when requested by the examples. 3.4.3. Variables The command Variables defines the endogenous variables used in the model. They must be declared and optionally defined. Declaration consists in listing the variables with a short description of each of them and end with a semicolon, as illustrated by Figure 24 for our example. Figure 24 – Declaration of the command Variables The syntax for this command is presented in Figure 25. Figure 25 - Syntax for the command Variables Definition is an optional component that usually refers to the specification of the variable type, as reported in Table 5.
The available information are listed in Table 25. Table 25 – Available information Variable Value Intercept North 0.70 Price coefficient of demand function North -1.2 Price North (pounds kg) 0.10 Intercept South 11.50 Income coefficient South 0.01 Income South (000 pounds) 1.2 Demand function North Linear Demand function South Semilogarithmic Engel In this example there are two new elements. The former is how to use of logarithms in equation entry and the latter is the command DISPLAY. As illustrated in Table 7 at Par. 3.4.4, the notation for the logarithm is LOG(.) with dot in brackets the symbol of the parameter in Equation definition. As far as the comma Display is concerned, it specifies the type of output generated by the GAMS program. For this reason it is written after the SOLVE command. It is used to show the values of parameters and variables. The SYNTAX in the case we want to see two parameters and tow variables is: DISPLAY <parameter name>, <parameter name>, <variable name>.L, <variable name>.L; As noticed, for variables a specific notation must be added to the name; it is .L. The statement ends with a semicolon. The model is written in the following form. *GAMS model for different functional forms PARAMETERS A Intercept North B Price coefficient of demand function North P Price North