## How to Define, Run and Verify a Model Experiment in the UNI-CGE Model

View

This guide shows you how to define, run and verify a model experiment in the UNI-CGE model. Download a PDF version of this guide  HERE (459.3 KB)

##### What is the Experiment?

This exercise shows you the mechanics of how to define an experiment in the UNI-CGE model. The much more important question is: “What is the appropriate experiment to represent a real-world problem?” You will be continually working on the answer to that question as you build your skills in CGE modeling. The model exercises in this course introduce you to some ideas on how to define an appropriate experiment. You can also review the literature to see how others have described similar problems in their models. But be prepared to think about, improve, and innovate as you develop your own representations of real-world problems.

##### Two Solve Statements in the UNI-CGE Model

The UNI-CGE model has two Solve statements. The first time the model solves, it is creating the baseline.  It is using the data in the SAM to calibrate the model and calculate parameters so that its baseline results exactly replicate the SAM data.

The second Solve statement is used if you want to introduce an experiment.  In this course, the experiment is defined at the bottom of the model, followed by the second Solve statement. After the first solve, the model imposes the experiment, and then re-solves. The results of the second solve statement show the new state of the economy after it is shocked by the experiment. The new results can then be compared with the baseline data.  The comparison shows the impact of the shock on the economy.

##### Sample Experiments in the UNI-CGE Model

The UNI-CGE model includes several sample experiments. These are “folded.”  You can unfold an experiment by clicking on the arrow to the left of “\$OnFold.”  You can fold up the experiment by clicking on the arrow again. (Recall that you can fold up all sections of the model with the command “ALT + O” and unfold all sections with the command ALT + SHIFT + O.)  You can unfold all experiments or fold them all

Figure 1 shows six experiments, underlined in red.  Two are unfolded - an increase in a sales tax and an increase in an import tariff. In both experiments, the code provides examples of how to define the shock for a single commodity, or for all commodities. The solve statement follows the experiment and is circled in green.

Figure 1.  Folded and unfolded model experiments

Notice that stars are placed in front of the code that defines changes in sales taxes.  The stars turn that model code off, so no sales tax experiments will be included when the model is solved.

Only one command in the experiment to change an import tariff does not have a star.  This command is turned on and will be included when the model is solved. This shock imposes a fic-percent increase in the import tariff on manufactures.

It is a good idea to check that all elements of an experiment are starred (turned off) before folding it.

##### Run a Sample Experiment in the UNI-CGE Model

To implement one of the sample experiments, unfold it and remove the star in front of the appropriate line of code. Or, adapt the code to reflect your own definition of the experiment. For this exercise, remove the star in front of the statement that increases the import tariff in manufacturing by 5 percent. Check that all other experiments are starred. Follow the example shown in Figure 1.

Before running your experiment, follow the checklist described in “How to Run the UNI-CGE Model.”

Solve the model by clicking on the green arrow in the top menu (Figure 2). This triggers both solve statements in the model – the initial solve and the solve statement following your experiment.

Figure 2.  Run the model and experiment

##### Verify the Experiment

In this exercise, you changed the manufacturing import tariff rate from 1.2 to 1.3 percent. After the model solves, verify that the shock is defined correctly. You can check and compare the base tariff rate and the new tariff rate in one of three ways:

1.  Check the UNI-CGEvXX.lst file.  Search for the before and after tariff rates in the .lst file by typing CNTRL + F and entering TM0.  You will find results faster if you search from the bottom of the file. Results in the .lst file should look like Figure 3.

Figure 3.  Verifying your experiment by viewing the .LST file

2.    Check the Excel results file by opening UNI-RESULTS.xlsx, which is in the directory you created for this project.  Open the tax rate worksheet and view the tables with the before and after commodity tax rates.  Your results should look like Figure 4.

Figure 4.  Verifying your experiment by viewing the Excel results file.

3. Check the UNI-RESULTS.GDX file by opening the file, listed in Project Explorer on the left side of your screen (Figure 5.)  Search for the variable name TM.

Figure 5. Open the GDX file and search for import tariff rate

Your results should look like Figure 6.

Figure 6.  Verifying experiment by viewing the GDX file

Copyright Cornerstone CGE 2024 CC 4.0 BY-NC-SA