Chapter Contents 
Previous 
Next 
The MODEL Procedure 
The process of computing input values needed to produce target results is often called goal seeking. To compute a goalseeking solution, use a SOLVE statement that lists the variables you want to solve for and provide a data set containing values for the remaining variables.
Consider the following demand model for packaged rice
data demand; do t=1 to 40; price = (rannor(10) +5) * 10; income = 8000 * t ** (1/8); demand = 7200  1054 * price ** (2/3) + 7 * income + 100 * rannor(1); output; end; run; data goal; demand = 85000; income = 12686; run;The goal is to find the price the company would have to charge to meet a sales target of 85,000 units. To do this, a data set is created with a DEMAND variable set to 85000 and with an INCOME variable set to 12686, the last income value.
proc model data=demand ; demand = a1  a2 * price ** (2/3) + a3 * income; fit demand / outest=demest; run;The desired price is then determined using the following PROC MODEL statement:
solve price / estdata=demest data=goal solveprint; run;
The SOLVEPRINT option prints the solution values, number of iterations, and final residuals at each observation. The SOLVEPRINT output from this solve is shown in Figure 14.68.

The output indicates that it took 6 Newton iterations to determine the PRICE of 33.5902, which makes the DEMAND value within 16E11 of the goal of 85,000 units.
Consider a more ambitious goal of 100,000 units. The output shown in Figure 14.69 indicates that the sales target of 100,000 units is not attainable according to this model.
The program data vector indicates that even with PRICE nearly 0 (4.462312E22) the demand is still 4,164 less than the goal. You may need to reformulate your model or collect more data to more accurately reflect the market response.
Chapter Contents 
Previous 
Next 
Top 
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.