CHAPTER 7: A MAYALAND AGRICULTURAL SECTOR MODEL
Agricultural sector models have a checkered past in the policy analysis field. In the 1960's, they were seen as being an important step forward in providing a tool for planners and policy makers to capture the multi-market, multi-regional effects of policy changes. In the 70's, however, it became clear that few working policy analysts in developing countries had the background in economic theory and the computational resources to incorporate such models in their own work. Moreover, both the models and the results proved to be difficult to explain to those actually responsible for making decisions. As a result, interest in their implementation declined and, to this day, those concerned with nitty-gritty policy matters often contend that sector models are "black boxes" whose internal trade-offs are difficult to follow intuitively.
Like farming systems models, however, there is much in sector modeling that helps to sharpen the policy analyst's economic intuition. There is also much to be gained in an agency responsible for policy analysis from the systematic data collection effort that such models require. Rather than attempting to create an agricultural database whose organizing principle is that all numbers pertaining to agriculture should be collected, having a sector model to guide data collection introduces sorely needed discipline into the collection process.
Sector models also raise interesting theoretical issues that go beyond the specifics of the agricultural sector and are found a wide variety of planning situations. Often called "two-level" planning problems, the sector approach must confront the fact that the macro policy makers ordinarily have different objective functions than do the thousands of independent farmers who make up the private sector. One approach to resolving this issue involves a two-step process. First an economy wide or sector wide model is run embodying the macro decision maker's preferences. Shadow prices from this exercise are then used to create an incentive structure in the form of taxes and subsidies that will guide individuals toward social goals.
A less ambitious way of dealing with the problem is to place micro level outcomes at the center of the analysis and then devise a market clearing mechanism that will account for the sector wide effects of micro decisions. Sector level policy makers can then use the optimization model to simulate the effects of different kinds of policies and, with these results in hand, weight the model's outcomes to devise a preferred sector level strategy.
The mechanism that makes this type of approach possible is Samuleson's proof that maximization of the joint producer-consumer surplus yields a market equilibrium. (The relevant discussion is contained on pages 164-169 of H-N). Model 8.1 in H-N provides a description of a simple model utilizing this approach; it is the basis for the Mayaland sector model that follows.
Maximizing Producer-Consumer Surplus
The difficulty that the analyst faces in implementing the modeling strategy is how to make prices endogenous for those commodities whose prices are determined by domestic markets, i.e., for those commodities that are nontradable. In earlier market-level models this involved the simultaneous solution to the supply-demand problem. The same mechanism is required at the sector level. The computational problem that arises, however, is that the area between the supply and demand curves is not linear as prices and quantities change. As a result, it is no longer possible to utilize linear programming to solve the optimization problem and a non-linear solver is required.
Figure 7.1: Maximization of Social Surplus
The derivation of the non-linear objective function can be understood best with the help of Figure 7.1. The essence of the computational strategy is to subtract the area under the supply curve (C) from the area under the demand curve (A+B+C). Maximizing the remaining area (A+B) maximizes the combined producer-consumer surplus or social surplus as it is sometimes called.
Producer-Consumer Surplus
A formal expression for the insight that the relevant producer-consumer area can be derived by subtracting the area under the supply curve from the area under the demand curve is shown in Equation 7.1..
By assuming that the demand curve is linear, it is possible to write an inverse demand function that reverses the dependent and independent variables.
Substitution yields, for commodity j, the following expression:
From the last expression, it is easy to see that the area under the demand curve and above the supply curve is non-linear. In particular, it takes the form of a quadratic function in Q. This form of non-linearity is easy to deal with computationally because the first derivatives that are used by the computational algorithm are linear. Nevertheless, it requires a different solver for Excel than the linear and mixed integer programming solvers that were used in the first six chapters.
The Model
Converting a farming systems model into a sector model is fairly straightforward. First, copy Model 4.3 to a new workbook and name it Chapter7. Call the worksheet Model 7.1.
Model 4.3 is the model that contains an annual labor market, i.e., labor can enter or leave the agricultural sector but they must make an annual commitment to do so. The annual contract assumption is a reasonable compromise between the assumption that labor is completely mobile and that it has no mobility at all. (Obviously, at the sector level, expressing individual laborers as integers has lost any meaning.)
(1) The magnitudes of the right hand side constraints (land, labor, mules) must be reinterpreted. Five hectares of land, for example, can be 50,000, 500,000 or 5 million hectares with all other coefficients altered accordingly.
(2) The activities that produce corn are reduced to one--Corn Mule. Eliminate the Corn Hand activity by deleting the relevant column in the Model 7.1. This simplifies the programming but does not change the basics of the model.
(3) Add elasticities and initial prices and quantities to the data table. These will be used to compute the slopes and intercepts of the demand curves prior to computing the areas that represent the consumer surplus. Values for the intercept and slope of the demand curve are introduced into the model by replacing the rows labeled "Prices" and "Revenues" as follows.
Step 1:
In rows 45, 46, and 47--labeled "Initial Prices," "Initial Quantities," and "Elasticities," respectively--input the data shown in the table below. (Note: these row addresses refer to the worksheet entitled Model 7.1. Check to be sure that your worksheet addresses are the same.)
Step 2:
Next compute the slopes and intercepts for each demand function. In row 48--labeled "Slope (beta)"--column B (for Corn Mule) enter the formula "+B47*B45/B46." This computation is based on the well-known arc elasticity formula:
The computation for Corn Mule should result in an intercept value of -0.00026 (highlighted in the table). Do the same for each cell in row 48. Hint: For Sorghum you should enter the formula "+D47*D45/D46." The figures should correspond with those shown in the table above.
Step 3:
The intercept for the inverse demand function is as shown below. It is based on the formula Thus, for Corn Mule, enter the formula "+B45-B48*B46." You should get a value of "5.1" as the intercept on the Corn demand curve. Do the same for each cell of row 49. Hint: For sorghum, enter the formula "+D45-D48*D46." (Note that the sign of the second term is negative because the slopes are shown as negative.)
Step 4:
Rows 50 through 53 are quantity "balance equations" for each crop that ensure that, at equilibrium, supply and demand are equated. These are the market clearing equations (Supply = Demand) familiar from the partial equilibrium modeling approach.
Supply side: For corn suppplied by the Corn Mule, enter "750" in cell B50. This is the yield per hectare for the corn mule activity.
Demand side: Entering the demand side requires the creation of a set of activities, one for each commodity on the right side of the equation. Because the focus of the activity is only on quantity, the entry is simply equal to one. Moving the activities to the left side of the equation results in a minus one. The section of the model containing the balance equations is shown in the table below.
It is the quantity variables in the balance equations that form the quantity part of the elements in the objective function. (See Step 6.)
Step 5:
The "Use" column is formed as usual. Each element in the data section is multiplied times the change variable and then summed across all elements in the row. For Corn Mule, the formula is=B56*B50+H56*H50. The result should be "749" Finally, in cell M50, enter a "0." In the specification of the model, "Use" will be set equal to "Available" for rows 50-53. This insures that supply = demand as the market clearing equations require.
Rows 54 and 56 containing varaible costs and the change coefficients remain unchanged.
Step 6:
Computation of the elements of the objective function (along with the commodity balance equations) for the major difference between sector models and farming systems models. The elements of the objective function are computed from Equation 7.6 derived earlier. It is reproduced for convenience below.
It is convenient to expand Equation 7.9 for the actual worksheet entry.
In the case of Corn Mule, Equation 7.10 is implemented in the objective function as follows:
(Note that the second term has a plus sign because the slopes,
s, shown in the spreadsheet are preceeded with a negative sign.) The elements for each remain commodity is computed in the same way. (The supply of labor, however, is assumed to be perfectly elastic with respect to price and the variable cost element is simply the annual wage. (Important: remember that the value in the objective function for labor must be linked to the change variable like all the other elements in the objective function, i.e., F57 is computed as F54*F56)
Step 6
The model is solved with the same steps as the farming systems model, i.e., the cell to be maximized is identified, the constraints (including the balance equations) are specified, and the non-negativity conditions are entered. There is one difference, however. Because the terms in the objective function are non-linear (the carrot, ^, indicates an exponent), a non-linear solver must be used.
Under Options, choose Quadratic|Forward|Newton for the solution algorithm. Set the precision at .00001 and the tolerance at 5 percent. Start with 100 seconds and 100 iterations. If the solution cannot be found with these parameters, try longer times and more iterations.
Solve the model and request that the Sensitivity Report be produced. Remember to check the
Model Results
The results of the sector model are shown in the table below. All are reported in the Sensitivity Report table. The first part of the table, under the heading of Changing Cells, reports the variables that represent the commodity activities that make up the supply side in hectares. (The figures are in hectares.) The second part reports the values of variables in the quantity balance equations that compute the quantities in kilos.
In the Constraints section of the Sensitivity Report, the endogenous prices are reported as the Lagrangian multipliers (shadow prices) of the balance equations. Recall the interpretation of a shadow price as the change in the objective function that would be produced if the constraint was reduced by one unit. In this case, the unit is a kilo and hence the shadow price reflects pesos/kilo.
As might be expected from the formulas used to compute the intercept and slope, values for the
initial price and quantity estimates play an important role in the model's solution. Calibrating the
model may require an adjustment to any two of the three parameters used in the slope and intercept
calculation. For example, if the elasticity seems reasonable and current prices are known, failure to
produce current quantities would suggest an adjustment in either the initial prices or in the elasticities.
However, since elasticities are often the most suspect number, a better method might be to take initial
prices and initial quantities as the fixed coefficients and to adjust the elasticity until the solution
It is important to remember that this is a simulation model that uses optimization methods to
produce market clearing equilibria. It does not maximize some decision maker's social welfare function
and hence the results of the model do not have an unambigious same normative interpretation. The objective function is used simply to solve the multi-market model. It takes the place of the matrix inversion technique used to find a market clearing equilibrium when supply elasticities are used in the model's construction.
Price Policy in a Sector Model
The basic producer-consumer surplus model, Model 7.1, can be elaborated to look at price
policy issues. Make a copy of Model 7.1 and call the new worksheet Model 7.2.
Assume that the government intends to make the price of corn a policy price by releasing imported corn at less than the equilibrium price. Implementing a mechanism to capture this concern in Excel involves several steps:
(1) Production may or may not continue depending upon the release price of the corn to
consumers. Hence corn producing activities cannot be is dismantled. Corn (i.e., Corn Mule) will
(2) The tastes and preferences of consumers for corn are not affected by the government's
decision to import and consequently the demand analysis is not affected. The computation of the
inverse demand parameters "alpha" and "beta" and the inclusion of the demand curves in the objective
(3) A new activity for importing corn must be created. This is done as follows:
Step 1:
Insert a new column after the last quantity variable (Q_Peanuts) column and label it "Corn-Imp." Recognize that imports add to the quantity of corn available in the sector. This should be reflected in the corn balance equation row 52 in two ways. First, a "1" should be entered in the balance equation where it intersects with the "Corn-Imp" column--i.e., in cell "L50." Second, cell M50--the right-hand or "demand" side of the balance equation--should be altered to read +B56*B50*H56*H50+L56*L50."
Step 2:
Make the corn imports variable operational by entering a "1" in the cell change row (Row 56) in the "Corn-Imp" column.
Step 3:
The release price of corn, in this case assumed to be the same as its import price, must be
added to the objective function. To do this, first enter a "-4" in cell L59. Making the release price an
exogenous parameter assumes that the government can release as much corn as will be demanded at
Compute the cost of imported corn in the objective function (L57) by multiplying the variable cost (L54) times the change cell (L56).
Step 4:
Be sure that all of the ranges in the model reflect the addition of the new column. This includes the objective function summation, i.e., the "target" variable, and all of the constraints entered into the solver. Solve the model in the usual way and ask for the Sensitivity report.
Results of Policy Simulations
Table 7.2 shows the effects of changing corn from a nontradable commodity to an imported commodity with a government subsidy. At the release price of P 4 (less than the previous domestic price) the domestic production of corn is reduced while the domestic consumption of corn increases. The difference is made up with imports in exactly the same what the it would have been had a partial equilibrium, multi-market model been used. The fundamental difference between the two approaches is how the supply of corn (and other commodities) is modeled.
Subsidizing the price of corn affects all commodity prices as the land released from corn is used to produce other crops. The usual scenario is that the additional supplies of the non-corn commodities have the effect of driving down commodity prices as each crop finds a new equilibrium based on its demand, input supply and fixed factor coefficients. But in the case of peanuts, the complicated land use decisions decreed by the optimization algorithm produce a small decrease in the quantity produced and, consequently, an small increase in the peanut price.
The exercises shown above are exactly the same exercises that could be carried out in multi-
market studies that rely on supply and demand elasticities. However, in this case, Excel and the
non-linear optimization algorithm are enforcing the equilibrium conditions rather than the use of total derivatives (to describe the market clearing conditions) and matrix inversion.
The effective difference between the models lies in the underlying assumption about the
magnitude and market structure of fixed factors. The demand side of the models are the same. In both
cases, demand curves are exogenously specified. On the supply side, however, the requirements of
land, labor and mules to produce commodities continue to play an important role in determining the
supply curve (Pages 156-159 in H-N develop this point in detail). Cross price effects are generated
endogenously rather than being incorporated in the analysis as part of the exogenously developed data
The good news of the programming formulation is that the physical parameters provide a
framework that keeps the model within the bounds of the factors that are truly fixed to the sector, e.g.,
the model cannot produce vast amounts of corn with nothing but purchased inputs. The disaggregation of the supply side in the form of commodity budgets also provides greater insights into the model results. Thus the "black box" syndrome is less evident in sector models constructed in an optimization framework than it is in multi-market models based on aggregated supply elasticities.
At one level, the bad news of the programming approach is that it requires a much more detailed micro database than does the aggregate analysis.1 However, unlike the econometric models from which supply elasticities are estimated, the actual data required for the sector model are the same commodity budgets that are used in the PAM approach. These data may be somewhat costly to collect but they can be collected with relatively simply survey methods.
Extending the Policy Model
With the above example as a guide, there are any number of extensions that might be
attempted. One of the most interesting would be to add a complete set of international markets in the
form of import and export activities for all commodities. Like the labor market example, whether
commodities were tradable or nontradable would be influenced by the magnitude of the transaction
costs, i.e., the width of the f.o.b.--c.i.f. band. The effect of policies would then be modeled, as in the
case above, by taxes and subsidies imposed on the international parity prices.
It would also be relatively easy to compute the impact on the government budget of different
kinds of food policy strategies. For example, suppose that the government purchased corn on
concessional terms from the US under Public Law 480. It might then resell the corn on domestic
markets and pocket the difference. Proceeds from these sales, which can be large in the case of
countries such as Egypt and Pakistan, take some of the pressure off of efforts to obtain domestic
resources through taxation. An estimate of the magnitude of the additions to the government's
Treasury could be obtained by multiplying the level of imports times the difference between the import
purchase price and the release price. Note that there is an optimization problem involved. The greater
the difference between the import price and the release price, the greater the government's profits per
unit. However, with a downward sloping demand curve, the greater the release price, the fewer the number of units that will be sold.
For an excellent description of the logic of multi-market modeling, see Stefano Pagiola, "Notes on Multi-Market
Models," Agricultural Policy Analysis Project, Food Research Institute, September, 1989.Please mail comments to: gotsch@stanford.edu Copyright 1996, Stanford University. All rights reserved.