## Computational Procedures

Computer Programs for RICE and DICE

The RICE-99 and DICE-99 models have been programmed in two different versions. The most accessible version of the models, available on the Internet, are programmed using Microsoft EXCEL (97 or later). In addition, the models have been programmed with a widely used mathematical programming language, GAMS (version 2.50 or later). The current version of the GAMS program has been tested only on the solver MINOS5. The GAMS programs are provided in appendixes D and E of this book. The EXCEL spreadsheet and GAMS programs, along with documentation, are available on the internet at http://www.econ.yale.edu/~nordhaus/homepage/homepage.htm.

The EXCEL and GAMS versions are identical for the DICE-99 model. The implementations of the equilibrium, however, are slightly different in the two versions for the RICE-99 model. This chapter describes the solution procedures for the models.

Solution Approach in EXCEL—RICE-99

The discussion begins by describing the solution concept for RICE-99 in the EXCEL approach. In this version, different regions are investing and consuming to optimize their regional social welfare functions without the possibilities of international trade. This equilibrium produces different discount rates on goods (real interest rates) across regions. The externality from global warming is then incorporated by estimating the world's willingness to pay as the sum of the damages across different regions valued at the different regions' discount rates. In those cases where emissions trading occurs, each region will optimize its carbon emissions at the world-market carbon tax. Each region's net permit revenue is the carbon tax times net permit sale (i.e., permit allocation minus emissions). GDP then includes net permit revenues. The calculation of the global carbon tax, permit revenues, outputs, and savings rates are all done simultaneously and consistently. For revenue-neutral permit allocations, net permit revenues are set equal to zero. This has the same effect as if we allocated each region's permits to be equal to its equilibrium emissions, but simplifies the calculation by allowing us to avoid the iterations necessary to find the revenue-neutral permit allocations that are consistent with the time path of emissions.

The rows in the EXCEL spreadsheet can be classified as exogenous or endogenous. The exogenous rows consist of numbers that have been entered by the user, and the endogenous rows are formulas. The exogenous rows can be further divided into parameters and policy variables. The policy variables are those that can be determined through the choice of a policymaker rather than by nature: regional savings rates and carbon taxes. The Hotelling rent is in this category although it is a market price. Industrial carbon emissions and carbon-energy are endogenous variables in the spreadsheet. Each region's carbon-energy and industrial emissions satisfy a first-order condition for output maximization (equation 3.3b); the price of carbon-energy, which includes the carbon tax, enters into the formula for emissions. The parameter rows, which contain values for population, total factor productivity, the rate of decarbonization, nonindustrial carbon emissions, and production function parameters, would generally be viewed as outside the control of a policymaker.

The model is solved in EXCEL by finding the values of the policy variables that meet the user's desired conditions. Table 6.1 displays the conditions for solution of four policies considered in chapter 7 (policies 1, 2, 5, and 6 in table 7.1). Column (3) displays the mathematical condition in EXCEL that corresponds to the conceptual condition in column (2). The solutions in chapter 7 are found by searching for the values of the policy variable in column (4) that satisfy the condition in (3). The searching is usually done via the "goal seek" command. To ensure that all conditions for a solution are met in all periods, iteration is employed in the solution algorithm. Macros have been programmed into the EXCEL spreadsheet so that the cases considered in this book can be solved with minimal effort.

All the cases considered in chapters 7 and 8 are minor variants of the four policies found in table 6.1, and extension of the solution method in table 6.1 is straightforward. The user always has the option of explicitly specifying the policy variables in the EXCEL spreadsheet.

The solution approach followed in the EXCEL spreadsheet is made possible because the RICE-99 model structure is so simple that the mathematical conditions for a solution can be derived analytically. It is possible to imagine cases where this cannot be done. One such case is the concentrations target case (number 4, table 6.1). Here, however, we can modify the problem by making damages [Dj(t) in equation (2.16)] a function of concentrations that rises sharply near the concentrations target; solving as in the Pareto optimal case (number 2, table 6.1) will then provide a reasonably accurate solution.

Solution Approach in GAMS—RICE-99

An alternative approach to solving the model is to maximize a social welfare function subject to the equations of the model using an optimization program such as GAMS. Our approach is a variant of the Negishi method of solving for a general equilibrium. The original approach comes from T. Negishi 1960 and was discussed in Nordhaus and Yang 1996.

Negishi's idea is that a competitive equilibrium can be found by maximizing a social welfare function—the weighted sum of the utility functions of each of the economy's agents—which has the appropriate set of welfare weights. Here, the agents are regions. The weights are ones that induce zero transfers among regions in the solution path, or that equalize the shadow prices on the individual agent's budget constraints.

In the pure Negishi approach, the social welfare function is:

j where SWFPURE is the social welfare function in the pure Negishi method, the y are welfare weights, and Wj is from equation (2.1).

The original or pure approach cannot be applied to our problem. Since we do not allow intertemporal trade, each region is forced to consume and invest solely out of its own output, and it therefore faces multiple constraints on its expenditures—one for each period—rather than a single constraint on the present value of its expenditures. A set of time-invariant social welfare weights does not exist that equates the social shadow prices of the budget constraints in each period. In other

Table 6.1

The basic policies of the RICE model

Conditions for solution

Mathematical condition

Control variable

1. Base

1. Savings rates optimized in each region.

2. Hotelling rent equals scarcity rent.

3. Externality ignored in choice of emissions

4. Industrial emissions satisfy market equilibrium with carbon tax (permit price) of

Rate of return on capital determined by regional utility discount rate

Hotelling rent equals discounted value of effect of marginal extraction on price

Permit price (carbon tax) equals zero

First-order condition for emissions (equation 3.3a)

Regional savings rate

Hotelling rent

World permit price or carbon tax

Formula for industrial emissions ensures that firstorder conditions are met.

2. Pareto optimum

1 and 2 from base case

3. Samuelson condition for public goods (marginal cost equals sum of regional marginal benefits).

4. Industrial emissions satisfy market equilibrium with optimal carbon tax.

5. Marginal cost of carbon abatement is the same across countries

Uniform carbon tax (permit price) equals world marginal willingness to pay for carbon abatement.

First-order condition for emissions (equation 3.3a)

Derivative of GDP with respect to industrial emissions is the same in each region.

World permit price or carbon tax

Formula for industrial emissions ensures that first-order condition is met. Ensured by fact that each region faces same carbon tax or permit price.

4. Concentrations limit

3. Global emissions limited by policy constraint

4. Industrial emissions satisfy market equilibrium with nonzero carbon tax.

5. Marginal cost of abatement is the same across countries.

1 and 2 from base case

3. Emissions are Pareto optimal subject to limit on CO2 concentrations.

4. Industrial emissions satisfy market equilibrium with nonzero carbon tax (or permit price).

5. Marginal cost of abatement is the same across countries.

Demand for emissions (according to formula) equals world emissions limit First-order condition for emissions (equation 3.3a)

Derivative of GDP with respect to industrial emissions is the same in each region.

Same as #3 in Pareto optimum, with a highly nonlinear damage function near the concentration limit

First-order condition for emissions (equation 3.3a)

Derivative of GDP with respect to industrial emissions is the same in each region.

World permit price or carbon tax

Formula for industrial emissions ensures that this is met.

Ensured by fact that each region faces same carbon tax or permit price.

World permit price or carbon tax

Formula for industrial emissions ensures that this is met.

Ensured by fact that each region faces same carbon tax or permit price.

words, without intertemporal trade, discount rates will differ across regions. Hence, if a set of time-invariant welfare weights equalizes the marginal social utility of consumption across regions in one period, the marginal social utilities will diverge in future periods.

The approach here uses time-varying weights. The social welfare function is:

where SWFTVW is the social welfare function in the Negishi method with time-varying weights (TVW), y(t) are time-varying welfare weights, and U is from equation (2.1). The welfare weights were chosen so that the shadow prices on the period-specific budget constraints—the social marginal utilities of income—are the same across regions in each period at the social optimum.

With the welfare weights chosen in such a manner, one gets:

at the solution. Equation (6.3) states that the social discount factor (or social discount rates) is the same for all regions.

Note that there is one degree of freedom in choosing the world discount rate, WR(t); equating social marginal utilities in each period requires that the discount factor be equal across regions but does not pin the discount factor down. We choose WR(t) so that it equals the output-weighted average of the individual-region discount factors. (This is close to setting it equal to the capital-weighted average of discount factors.) To do this, we employ an iterative search algorithm in which equation (6.4) is first maximized with an arbitrary WR(t); we then adjust WR(t) and maximize (6.4) again; and follow this procedure until the algorithm has converged. Since the individual-region discount factors are endogenous, this way of choosing WR(t) has the effect of making the social discount factor in (6.4) endogenous. As society's future consumption changes relative to present consumption, changes in the relative valuation of future to present consumption will affect the social planner's decisions.

To vary policy in GAMS, we simply vary the constraints. Unlike the spreadsheet approach, emissions are treated as a control variable in GAMS, while the carbon tax and the Hotelling rent are calculated as output of the program.

To solve the base case in GAMS, we optimize under the assumption that the damage coefficients are exogenous; they are set to a level that is consistent with the market level of industrial emissions. To solve the optimal case, the constraints are all the equations in chapter 2. To solve case 3 in table 6.1, we add the constraint that global industrial emissions not exceed a certain level. In the concentrations target case, we instead constrain concentrations of carbon in the atmosphere to remain below a certain level. The Negishi method can be applied easily to other cases by adding to or modifying the GAMS program.

Using the TVW variant of the Negishi method, some of the conditions for a solution in table 6.1 will not be met exactly. Because the social planner applies a weighted-average discount rate to all regions, savings rates will not be optimized. Hence, in calculating the scarcity and environmental values of carbon abatement, future benefits will be discounted at too high a rate for some regions and too low a rate for others.

Experience indicates, however, that for the most part, the Negishi-TVW solution is acceptably close to one that meets the conditions in table 6.1. (See the comparisons in table 6.2.) In handling the trade-off between the present and far future, Negishi-TVW will be close to optimal because the calculation of future environmental damages requires summation across regions (so the underdiscounting cancels to

Table 6.2

Comparison between GAMS and EXCEL solutions

Table 6.2

Comparison between GAMS and EXCEL solutions

GAMS output |
as % of EXCEL | |

output | ||

Base case |
Pareto optimal case | |

Global mean temperature increase, 2105 |
101.6 |
101.1 |

Global mean temperature increase, 2305 |
99.8 |
100.0 |

Per capita income, ratio of 2105 to 1995, |
97.9 |
97.8 |

United States | ||

Per capita income, ratio of 2105 to 1995, LI |
102.3 |
102.2 |

World industrial carbon emissions, 2105 |
100.4 |
100.2 |

Carbon tax, 2015 |
NA |
124.0 |

Carbon tax, 2105 |
NA |
100.7 |

Present value of consumption, world |
110.6 |
110.6 |

Total economic impact of policy |
NA |
118.3 |

some extent the overdiscounting) and because regional discount rates converge over time. As is discussed below, the Negishi-TVW has the advantage that no computational errors will creep in from emissions trading since the discount rates are equalized across regions.

In interpreting the EXCEL and GAMS approaches to solving RICE-99, it should be noted that there are differences in the global calculations of economic impacts because of differing treatment of trade and discounting. The EXCEL version uses regionally varying discount rates to discount the costs and benefits of policies to each region while the GAMS version uses a common discount rate for all regions. The differing discount rates will lead to problems in calculating the global impacts in the EXCEL version, particularly when trading occurs. The difficulty arises because the present values of unit of consumption in different regions are not equal. Hence, if a unit of output is transferred in a given future year from a high-income region like the United States (with a low discount rate) to a low-income region like China (with a high discount rate), the present value of world income will be lowered. The difficulties are most likely to cause problems in the cases that involve large flows in regimes with emissions trading. It should be noted that, because discount rates are equalized in the GAMS version, this problem does not arise there.

DICE

Solving DICE is considerable easier because there is only one region— the world. To solve the model in GAMS, we simply maximize the welfare of this one region, varying the constraints to suit the problem. There is no question of which discount rate to use, so the problems that prevent finding an exact and consistent solution do not arise here. Solutions in the spreadsheet version are done in the same way as for RICE-99, but they take less time. With DICE, one also has the option of using the EXCEL solver to solve the problem the same way it is solved in GAMS, through welfare maximization, because a one-region model is often small enough for the solver to handle. Our experience with the solver is that it tends to converge short of the optimum.

GAMS versus EXCEL

The alternative solution approaches offer different advantages and disadvantages.

### User Friendliness

The EXCEL spreadsheet is more user friendly. It lays out the full model structure before the modeler, making it very easy to understand what is going on and to see the consequences of changes in parameters or control variables. The user can simply change a parameter, tax rate, and so forth, and instantly see the results of the change. With GAMS, to see the consequences of a policy change, the user needs to run the program again, and the nature of the GAMS program is that it is easy to introduce unexpected bugs even with minor changes in the program. Although it is possible to put the output of the GAMS program into a form that lays out the model structure, this requires cutting and pasting each time the program is run.

### Model Output

The main EXCEL workbook itself makes a wide array of output available to the user, and output spreadsheets, linked to the main workbook, allow the user to quickly create a variety of tables, graphs, and additional variables from the model output. Additional variables that the modeler would like can be created on the spreadsheet with a few seconds' work. With the GAMS program, one can program it to produce the output one wants, but it requires some experience to learn what one needs; to see the results of changes, one must go back and run the program again. With some work, the user can automate the process by pasting GAMS output into a spreadsheet or reading it into a program, but this process is much more involved than working with the EXCEL spreadsheets.

### Accuracy of Solution

In the RICE-99 and DICE-99 models, for the experiments we have considered, both EXCEL and GAMS find exact solutions (within the tolerance limits of the programs) for the problems that are solved, although each has the shortcomings discussed above that are associated with the discount rates. The one case where the accuracy of GAMS is clearly superior to that of the EXCEL spreadsheet is the concentrations limit in DICE.

### Solution Time

Significant differences in solution time between the two programs have not been found, assuming the user employs reasonable starting values in EXCEL. In our experience, solving the full RICE-99 model takes from 15 to 30 minutes on a 500-MHZ machine, depending on the case being solved.

If the user needs only a partial solution (for example, is satisfied to keep the savings rates constant but needs to find a Pareto optimal carbon tax and Hotelling rent given those rates), then the EXCEL spreadsheet can offer substantial advantages over the GAMS program because the user has the option of solving only the subproblem of interest. Finding the optimal savings rates takes by far the longest time of all of the subproblems in the EXCEL spreadsheet; yet, the savings rates for one case turn out to be nearly indistinguishable from the optimal rates in other cases. So, since the user can usually dispense with the most time-consuming part of the solution, the EXCEL spreadsheet in practice turns out to be the faster option. For cases 1 through 4 in table 6.1 when savings rates are held constant in the EXCEL worksheet, solution times range from 1 to 15 minutes.

If the user has an explicit schedule of savings rates and carbon taxes, the EXCEL spreadsheet offers near-instantaneous results once the control variables have been entered.

### Summary Advice for Users

Users may want to change the RICE or DICE models to test alternative structures, assumptions, or policies. Changing the DICE model has proven relatively easy in either the EXCEL or GAMS versions. Adapting the RICE model generally is more difficult. Which version should be adapted depends upon the type of change and the programming background of the user. The following are guidelines for potential users:

1. Students and first-time modelers will find the EXCEL versions easier tools to use.

2. It is easy to test the results of different parameter values in EXCEL, whereas changing parameter values in GAMS requires reprogramming and making new runs.

3. Minor changes in the model structure are a close call. They involve adding to or changing the computer code in GAMS, while in EXCEL they involve entering formulas, changing formulas, adding or deleting spreadsheet rows, and changing the solution macros. Since there are eight regions in the model, each of whose structure may need to be changed, since the macros that solve the model will often need to be changed, especially if rows are added to or deleted from the spreadsheet, and since the code underlying the spreadsheet is less transparent, reprogramming the spreadsheet structure is likely to be more difficult than reprogramming the structure in the GAMS program.

4. Major changes in the model structure or examining alternative policies will change the equilibrium conditions for the model solution or their mathematical interpretation. In such cases, the GAMS program is generally the route to follow. Reprogramming the EXCEL spreadsheet to solve the model may be difficult or impossible, especially since it requires the user to be able to write down the conditions for a solution analytically.

Policy Applications of the 11 RICE Model

## Post a comment