Excel is used at two moments with MIRAGE: for preparing input data (aggregation of GTAP data, definition of optional sets and choice of results aggregation) and for importing results in pivot-table formats.

The file Aggregation.xls provides three functions: definition of GTAP aggregation, definition of optional sets and choice of results aggregation. It contains four sheets. The first, Macros, presents all the buttons running the macros. The second and the third, Sectors and Regions, provide the definition of sectoral and geographical breakdown, and options. The last, Markup, allows to define which sectors are in imperfect competition and simple demand tree.

Macros sheet

### Extraction package

Extraction of GTAP data, sets definition and choice of results aggregation:

In addition to these files, other files are necessary to run the macros. They can be found here (2010) and here (2008). To run an extraction of GTAP data, you will need the extraction.bat file, as well as the scen and Flex subfolders and their content. The Flex subfolder should be filled with the (unzipped) content of the flexagg package, downloadable from the GTAP website. We don't provide access to it, to respect GTAP property rights.

The Trade.bat file (here (2010)) works in coordination with the Scen_Trade.txt file. It generates the Trade.gms file that is used as an aggregator for NTB data. The & Note.txt file provides additional instructions. However, this utility will be needed only if you decide to use a GTAP package that is not available on MIRAGE wiki.

These aggregation programs do not work under 64-bit Windows systems (XP or 7), because some programs provided in the Flexagg package are not compatible with these platforms.

### How to fill it out

#### Sectors

There are three parts:

• The first part allows to define the aggregation itself, in the yellow area.
• The second part is devoted to sets definition. Columns E-F automatically repeat the MIRAGE aggregation. The next 7 orange columns define 7 different sets (version 2010; in version 2008 it was 6). You can add a sector in a set by writing Y in the corresponding line. GTAP tariffs defines sectors that will rely on GTAP tariff data instead of MAcMap. Labor type 1 defines a set of sectors labour of which is imperfectly substitutable with labour in other sectors (dual labour market assumption only). SerTX are services sectors for which barriers are modelled as export taxes (barriers create a rent captured by the producer). SerTC are services sectors for which barriers are modelled as trade cost (barriers increase production cost for foreign firms). Agr is a set of sectors which corresponds as closely as possible to the WTO definition of agriculture. This set will be used to take into account inflation and growth on export subsidies in the EU. Land set-aside defines agriculture sectors concerned by European union land set-aside policy (only relevant for the EU). Intervention price defines agriculture sectors concerned by European union intervention price policy (only relevant for the EU).
• The third part of the sheet, in green, concerns results' presentation. It is not necessary to fill it at the beginning. This information is used to generate a Definition.gms file. In the first column, you can define labels for the aggregation code. In the next column, you define a broader aggregation level that will be used only to compute some result indicators. In the last green column, you can define labels for the result aggregates. Labels for aggregates should not be identical as labels for individual sectors (or regions).

#### Regions

The only difference concerns the orange part, which only comprises 3 columns.

#### Markups

You only have to fill out the orange part.

In ICI, you add a Y if you want the sector to be considered imperfectly competitive. You are advised to run the macro 'Calculate' first, as it will compute average markups for the MIRAGE aggregation. If a markup is equal to 1, the sector should not be selected as imperfectly competitive. Also, transportation sectors have to be considered as perfectly competitive.

The simple columns selects sectors for which you want to assume no quality differentiation between North and South products. At this stage, only sectors in perfect competition can be selected.

### Installing the TCD utility (Excel 2007)

Add the TCD macro as an Excel complement: Alt+F Options / Complements, etc., and tick the box to activate it. A new tab, called 'Compléments', should appear.

The TCD utility should also be compatible with earlier versions of Excel. The installation procedure may slightly differ.

### Using the TCD utility

Click on the TCD: Aggregation of results files button and follow instructions. You will have to indicate the location of txt (or csv) results files generated by Mirage simulations, and choose the appropriate simulations that you want to join and compare. An Excel file containing several pivot tables will be created. Each of them contains indicators for a given dimensionality.

In the top part of each spreadsheet, some information (sectors, region, year) has to be chosen. It is not optional.

Ticking the appropriate box on the right hand-side of the spreadsheet (Excel 2007) will make initial values appear. Initial values correspond to yearly baseline levels: beware that initial values vary with time.

### Units

All sheets' initial values are in billion 2004 USD, except the IRS sheet that is in million 2004 USD.

### Troubleshooting

You may encounter an error with some computers (something like this and then this), due to the fact that the default delimiter is set to , instead of ;. You can fix this with a simple modification of your registry.

At HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\Text (…\SOFTWARE\Wow6432Node\Microsoft\… on 64-bit systems), the value Format, initially set at CSVDelimited, should be changed to Delimited(;).

If you are unfamiliar with the registry, you can save and run these fixes:

If you don't know which fix to use, use both, it won't damage anything.