Escolar Documentos
Profissional Documentos
Cultura Documentos
This material is based upon activities supported by the National Science Foundation under
Agreement No DUE-0632836. Any opinions, findings, and conclusions or recommendations
expressed are those of the authors and do not necessarily reflect the views of the National
Science Foundation.
Before you execute a GAMS program, you must create a project file this is where you
will keep all files used in the course; as GAMS solves, it will look in this directory for
any files called in the main GAMS model program. YOU MUST FIRST OPEN THE
PROJECT FILE BEFORE DOING WORK IN GAMS.
2.
Create a course directory and store all files in that directory. The files you will need can
be found at http://www.usna.edu/users/Econ/thier. Copy the following files to your
3
course directory: TUG-CGE1d.gms, TUG-DATA1b.gms, GTAP_SUM_v7.xls,
Experiment.inc, results.xls
3. Open GAMSIDE (Use the Windows icon. If it is not available, explore your computer to
locate the GAMS directory. Find the GAMSIDE icon and pin it to your start menu.)
4. Create a GAMSIDE project:
(GAMS needs to know where you have stored your files. A Project is a GAMS file
folder.)
a. On the menu bar at the top, select: >File >Project >New Project if it is the first time
you are identifying the folder.
b. In the box, look in, type in the name of the directory in which you placed your model
and database
c. At to the bottom of your screen, fill in the file name with the name the of project:
YOURNAME, (the file will be assigned a suffix gpr and the file YOURNAME.gpr will
appear in the directory in the future).
d. You will be in the GAMS program with access to the files in your project directory.
-- To REOPEN your GAMS project:
e. >File >Project >Open Project >Your project name (called YOURNAME.gpr, in the
example above).
5. If you do not open a project file at the beginning of a GAMS session, you will get an
error message because GAMS cannot find the working file it needs to run the program.
Execute GAMS:
1.
2.
3.
4.
5.
4
will print solution diagnostics which are helpful if the file does not solve. If you have an
error, the error message will appear in red.
Search the program for a particular variable name
1. When you have opened a file, enter the variable name in the search window (the box
directly to the right of the symbol with a flashlight and the letter A) and hit F3, this will
search down from the location of the cursor. Alternatively, you can go to the bottom of
the code (control end) and search up using shift F3.
Turn off a section of code (so the GAMS software does not execute that command)
1. Put a * in the far left corner of the code. The line should turn to a light grey color. To
turn on a section of code, remove the * and the code should return to normal print. This
command will be useful when setting up experiments the file has many different
options and you can choose which option you would like to analyze by removing the *
from before the relevant line of code.
5
internet security, disable the feature (you should get a pop-up box on your machine to
notify you of the problem). Once you allow the download, repeat the selection from the
SAM drop down menu. Save the excel file in your project directory.
3. The downloaded file will be named ???_SAM.xls file where ??? is a three letter country
code used by GTAP. (If you click on the tab Table Description 2 you will find a listing
of country codes.) For example if you use the United States as your country, your file will
be USA_SAM.xls
4. When you open the excel file, you should be on the tab with your country name, United
States of America for the US example. This tab has the country data we will use in the
course. The other tabs provide background information. The tab Sector Mapping is
particularly useful because it shows how the 57 sectors available in GTAP are mapped to
the 10 sector aggregates used in the Summary matrices. Note that for which ever country
you choose, your data will have the same 10 sectors.
Create a Social Accounting Matrix (SAM) compatible with TUG-CGE
1. Copy the excel file, GTAP_SUM_V7.xls from http://www.usna.edu/Users/econ/thier
Open the tab GTAP-SAM
2. Open your GTAP summary matrix, such as USA_SAM.xls and open the tab with the
country name, here it is United States of America
3. In USA_SAM.xls, copy from cell A1 to cell BV80 and paste in cell A1 in the tab GTAPSAM in the file GTAP_SUM_V7.xls
4. SAVE the GTAP_SUM_V7.xls DO NOT CHANGE THE FILE NAME. DO NOT
OPEN or MOVE or EDIT any other TABS in that file. The excel sheet is set up to
interface with the GAMS program to aggregate the data into a format compatible with
TUG-CGE and the exercises that follow
5. Open the GAMS fileTUG-DATA1b.gms. Hit the key F9 to run the data program. You
should create a file in your directory TUG-SAM.xls. This is the file you will use to
understand the structure of your economy.
6. To view the SAM and move around the data file easily, use View > Freeze Pane in excel
to lock the row and column titles.
Activities. Activities are the accounts of domestic industries or firms that engage in the
production of goods or services. In the GTAP Summary matrices, there are 10 activities.
Each activity column account describes the industrys production expenditures on factors,
intermediate inputs to production and taxes; it provides insight into the production
technology used. Each activity row account reports where the firms sell their output. In
the SAMs from the GTAP summary matrices, each activity output goes to a commodity
United States Naval Academy Capstone Seminar: Introduction to CGE Modeling
7
account for that industry. For example, output produced by the activity agriculture is sold
only to the commodity agriculture. This specification is not a necessity in CGE models,
but rather a feature of the data set used; intuitively it means that each marketed
commodity is produced using a single production technology as described in the activity
account for that good. With a more detailed data set, one could allow for different
production technologies to produce the same commodity for example agriculture could
be produced on family farms and on large commercial farms, each with a different
spending pattern on inputs.
The activities from the GTAP summary matrices, which are aggregates of the 57 sectors
available in the full database, are:
Table 3.1 Activities
A_agr
A_Mng_Extr
A_Pcf
A_LMnf
A_CMnf
A_Util_Cns
A_Trans_Comm
A_Svces
A_Osg
A_Dwe
Agriculture
Mining & Extraction
Processed Food
Labor-Intensive Manufactures
Capital-Intensive Manufactures
Utilitites & Construction
Transportation & Communication
Private, Financial, & Other Services
Public Services
Dwelling
Commodities. These are the goods and services that an economy demands for
consumption, investment and trade. A commodity is an economys total supply of a
good or service from domestic production and imports, combined. It is a composite of
the domestic and imported varieties. The column account for a commodity shows the
sources of its supply from domestic firms and imports. The column also reports
payments of taxes on in the imported commodity and payment of sales taxes on the
composite good. The row account for the commodity shows to whom the good has been
sold other producers as intermediate inputs, households, government, investors and
exports to foreign markets.
Commodities in the GTAP Summary matrices are as follows:
Table 3.2: Commodities
C_agr
C_Mng_Extr
C_Pcf
C_LMnf
C_CMnf
C_Util_Cns
C_Trans_Comm
Agriculture
Mining & Extraction
Processed Food
Labor-Intensive Manufactures
Capital-Intensive Manufactures
Utilitites & Construction
Transportation & Communication
8
C_Svces
C_Osg
C_Dwe
Factors of production. Factors are the primary resources used to produce goods and
services. The factors from the GTAP Summary matrices are: Land, UnSklab (unskilled
labor), SkLab (skilled labor), Capital and NatRes (natural resources).
The factor account row shows the income received by factors from the activities that
employ them. This factor income is sometimes called value added because it is the
value of the factors services which are combined with intermediate inputs to generate
firms output. The factor column accounts report factor expenditure. In the SAM used in
this course, all factor income flows to households. (Note that in the GTAP Summary
matrices, factors also pay taxes such as payroll taxes, and some proportion of capital is
depreciated. To be consistent with the CGE model used for this course, depreciation
(payment to the savings-investment account) and factor taxes are paid out of the
household account and the household account receives all factor income.)
Households. The single household, HOUS, in the SAM for this course gets income from
factors, as reported in the row of the household account. The households column
account reports expenditures by commodity as well as taxes (payment to DIRPAY) and
savings (payment to CGDS).
Taxes. There are five different tax instruments used in the CGE model for this
course. Each has a separate account in the SAM. For each tax instrument, a negative
value indicates a subsidy rather than a tax.
Indirect taxes
Tmm_world reports the tariff revenue paid. The row of the tmm_world account reports
payment by commodity to the tariff account. The column of the tmm_world account
reports the payment of total tariff revenue to the government.
Tee_world reports the revenue from export taxes. The row of the tee_world account
reports payment by commodity to the export tax account. The column of the tee_world
account reports the payment of total export tax revenue to the government.
SALTAX reports the revenue from sales taxes against a commodity. The row of the
SALTAX account reports payment by commodity to the SALTAX account. The column
of the SALTAX account reports the payment of sales tax revenue to the government.
PRODTAX reports revenue from production taxes paid by an activity. The row of the
PRODTAX account reports payments by activity to the PRODTAX account. The column
of the PRODTAX account reports the payment of production tax revenue to the
government.
United States Naval Academy Capstone Seminar: Introduction to CGE Modeling
Direct taxes
DIRTAX reports the taxes paid by households; the row of the DIRTAX account has a
single entry from the household account. The DIRTAX column reports payment of direct
tax revenues to the government.
Government. In the SAM for this course, the government column, GOVT, shows its
spending on goods and services. The government row account shows government
revenue from various types of taxes in the economy. The difference between government
revenue and government expenditure is government savings and it is the amount reported
as a payment from the GOVT to CGDS.
Savings- investment. This account, with the heading CGDS, shows the balance between
savings and investment in an economy. The accounts column records investment
expenditures on capital equipment that will be used in future production activities. The
column sum reports an economys total investment expenditures. Investment is made
possible by an economys savings. The row for CGDS describes the sources of an
economys savings. Total savings consists of foreign and domestic savings, which, in
turn, consists of household and government savings.
Rest of World. This account, with the heading ww_world, describes trade and investment
flows between a country, such as the United States, and the rest of the world. The row
account shows the countrys foreign exchange outflows, or expenditures on imports,
valued in world prices in the domestic currency. The column account reports the
countrys foreign exchange inflow, or export sales, also valued in world prices in the
domestic currency. The difference between the value of exports and imports is the
balance of trade. When a country runs a trade surplus (the value of its exports exceed the
value of its imports), its foreign savings flow is negative. When a country runs a trade
deficit (its imports exceed its exports) its foreign savings flow is positive. In either case,
the value of the foreign savings flow is recorded in the SAM as a payment from the rest
of the world (ww_world) to the savings-investment account (CGDS)
10
Households
Government
SavingsInvestment
ROW
Total
Exports
Domestic
production
revenue
Demand
Domestic
supply
Commodities
Factors
Intermediate
inputs
Factor
income (or
Value added)
Household
consumption
Government
Production
taxes
SavingsInvestment
ROW
Government
consumption
Investment
Factor
income
Households
Total
Factors
Import tariffs
Export
subsidies
Sales taxes
Net factor
income
Factor tax
Government
transfers
Household
income
Government
income
Income tax
Private
savings
Government
savings
Foreign
savings
Imports
Domestic
production
costs
Aggregate
supply
Savings
Foreign
exchange
outflow
Factor
expenditure
Household
expenditure
Government
expenditure
Investment
expenditure
Foreign
exchange
inflow
11
Macroeconomic Identities in SAM
Data from the SAM can be used to calculate national income accounting identities.
GDP from the income side
Factor income + Indirect business taxes + Commodity taxes = GDP
GDP from the expenditure side
C + I + G + E M = GDP
Using TUG-CGE.xls, the SAM data sheet for your country, calculate your countrys GDP from
both the income and expenditure side. You should get the same number for each calculation of
GDP.
Recall that you can rearrange the expression for GDP from the expenditure side, to derive the
relationship between a nations domestic savings (S) and investment (I), and its trade balance,
where E is exports and M is imports.
S-I=EM
Verify this identity is true, using your country SAM data.
As a result of this exercise, you can be confident that the base data used in the model satisfy the
market equilibrium constraints implied by national income accounting identities. These
identities will also hold following a policy shock to the base model.
Economic Structure in the SAM
The SAM can also be used to describe the underlying structure of your economy. This
knowledge is helpful for understanding and explaining model results.
Use the following information to compute the components of the structure table below for your
country.
12
The size of an industry is among its most important economic characteristics. The larger
the size of a sector in an economy, the greater is the impact of a shock to that sector on the
rest of the economy.
Factor-intensity by industry
The activity columns of the SAM show the inputs required by each industry. The factorintensity of an industry refers to the shares of each type of factor in its technology. A laborintensive technology means that the industry requires proportionally more labor than
capital. Calculate the factor-intensity for each activity, as:
Payment to factor f in activity a/ Total factor payments in activity a
13
Tax rates
Import tariffs and taxes on exports, retail sales and production all drive a wedge between
the prices received by sellers and the prices paid by consumers. Direct taxes on income
effectively reduce earnings. It is important to know the initial sizes of tariffs and taxes in
the model before you analyze the effects of reforming or eliminating them. If the tariff or
tax is small, then removing it is likely to have only small effects on an industry, or the
economy as a whole.
Tariffs (tax on imports) by commodity = (tariff payment by commodity)/(payment to Rest
of World for imported commodity)
Tax on exports by commodity = (payment of export taxes by commodity)/(payment by
ROW for the commodity)
Sales tax by commodity = (payment of sales taxes by commodity)/(payment for the
commodity from intermediates + household+government+investors payment of sales
taxes by commodity)
Production tax by activity = (payment of production taxes by activity)/ (value of eactivity
output)
Household income tax rate = (payment of direct taxes by household)/(total household
income)
14
Sector
GDP
Industry GDP
Agr
Mng_Extr
Pcf
LMnf
CMnf
Util_Cns
Trans_Comm
Svces
Osg
Dwe
Total
Sector
Factor-intensity, by industry
Industry shares in
GDP
1.00
Commodity share of final demand
Households
Govt.
Land
Capital
Land
Na
Na
na
Import
tariff rate
1.00
Export tax
rate
1.00
Sales tax
rate
1.00
Indirect
business tax
rate
na
Export sh
productio
na
na
na
Na
Na
Investment
Agr
Mng_Extr
Pcf
LMnf
CMnf
Util_Cns
Trans_Comm
Svces
Osg
Dwe
Total
1.00
1.00
1.00
Source: GTAP Summary Matrix, v. 7 as adapted to use in TUG-CGE.gms.
Exports
1.00
Import sh
consump