|The DTREE Procedure|
A decision problem is normally constructed in three steps:
PROC DTREE represents these three steps in three SAS data sets. The STAGEIN= data set describes the structure of the problem. In this data set, you define all decisions and define all key uncertainties. This data set also contains the relative order of when decisions are made and uncertainties are resolved (planning horizon). The PROBIN= data set assigns probabilities for the uncertain events, and the PAYOFFS= data set contains the values (or utility measure) for each consequence or scenario. Please see the "Overview" section and the "Getting Started" section for a description of these three data sets.
PROC DTREE is designed to minimize the rules for describing a problem. For example, the PROBIN= data set is required only when the evaluation and analysis of a decision problem is necessary. Similarly, if the PAYOFFS= data set is not specified, the DTREE procedure assumes all payoff values are 0. The order of the observations is not important in any of the input data sets. Since a decision problem can be structured in many different ways and the data format is so flexible, all possible ways of describing a given decision problem cannot be shown here. However, some alternate ways of supplying the same problem are demonstrated. For example, the following statements show another way to input the oil wildcatter's problem described in the "Introductory Example" section:
data Dtoils3; input _STNAME_ $12. _STTYPE_ $4. _OUTCOM_ $12. _REWARD_ dollar12.0 _SUCCES_ $12.; datalines; Drill D Drill . Cost . . Not_drill . . Cost C Low -$150,000 Oil_deposit . . Fair -$300,000 Oil_deposit . . High -$500,000 Oil_deposit Oil_deposit C Dry . . . . Wet $700,000 . . . Soaking $1,200,000 . ; data Dtoilp3; input _EVENT1 $12. _PROB1 8.1 _EVENT2 $12. _PROB2 8.1; datalines; Low 0.2 Dry 0.5 Fair 0.6 Wet 0.3 High 0.2 Soaking 0.2 ; title "Oil Wildcatter's Problem"; proc dtree stagein=Dtoils3 probin=Dtoilp3 nowarning; evaluate / summary;
Note that the STAGEIN= data set describes the problem structure and the payoffs (via the REWARD= variable). Thus, the PAYOFFS= data set is no longer needed. Note also the changes made to the PROBIN= data set. The results, shown in Figure 3.8, are the same as those shown in Figure 3.2. However, the rewards and the payoffs are entirely different entities in decision tree models. Recall that the reward of an outcome means the instant returns when the outcome is realized. On the other hand, the payoffs are the return from each scenario. In the other words, the decision tree model described in the previous code and the model described in the "Introductory Example" section are not equivalent, even though they have the same optimal decision.
You can try many alternative ways to specify your decision problem.
Then you can choose the model that is most convenient and closest to
your real problem.
If PROC DTREE cannot interpret the input data, it writes a message to
that effect to the SAS log unless the NOWARNING option
However, there are mistakes that PROC DTREE cannot detect.
These often occur after the model has been modified with either the
MOVE statement or the
After a MOVE statement is specified,
it is a good idea to display
the decision tree (using the TREEPLOT statement)
and check the
probabilities and value assessments to make sure they are
For example, using the REWARD= variable in the
STAGEIN= data set to input the
payoff information as shown in the previous code may cause problems if
you change the order of the stages. Suppose you move the
Cost' to the beginning of the tree, as was done in
the "Sensitivity Analysis and Value of Perfect Information" section:
move Cost before Drill; evaluate / summary;
The optimal decision yields $140,000, as shown on the optimal decision summary in Figure 3.9.
Recall that when this was done in the "Sensitivity Analysis and Value of Perfect Information" section,
the optimal decision yielded $150,000.
The reason for this discrepancy is that the cost of drilling,
implemented as (negative) instant rewards here,
is imposed on all scenarios including those
that contain the outcome `
This mistake can be
observed easily from the
Cumulative Reward column of the optimal
decision summary shown Figure 3.9.
Changing a decision stage to a chance stage is another example where using the MODIFY statement without care may cause problems. PROC DTREE cannot determine the probabilities of outcomes for this new chance stage unless they are included in the PROBIN= data set. In contrast to changing a chance stage to a decision stage (which yields insight on the value of gaining control of an uncertainty), changing a decision stage to a chance stage is not likely to yield any valuable insight even if the needed probability data are included in the PROBIN= data set, and it should be avoided.
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.