|The DTREE Procedure|
The production manager of a manufacturing company is planning to bid on a project to manufacture a new type of machine. He has the choice of bidding low or high. The evaluation of the bid will more likely be favorable if the bidder has built a prototype of the machine and includes it with the bid. However, he is uncertain about the cost of building the prototype. His technical staff has provided him a probability distribution on the cost of the prototype.Table 3.33: Probability on the Cost of Building Prototype
There is also uncertainty in whether he will win the contract or not. He has estimated the probability distribution of winning the contract as shown in Table 3.34.Table 3.34: Probability of Winning the Contract
|Givens||Win the Contract||Lose the Contract|
|Build Prototype||High Bid||0.4||0.6|
|Build Prototype||Low Bid||0.8||0.2|
|No Prototype||High Bid||0.2||0.8|
|No Prototype||Low Bid||0.7||0.3|
In addition, the payoffs of this bidding venture are affected by the cost of building the prototype. Table 3.35 shows his payoffs. The first row of the table shows the payoff is 0 if he loses the contract, regardless of whether or not he builds the prototype and whether he bids low or high. The remainder of the entries in the table give the payoff under the various scenarios.Table 3.35: The Payoffs of the Contract Bidding Decision
|Result||Cost||Bid low||Bid high|
|Loss the Contract||0||0|
|Win the Contract||$35,000||$75,000|
|Win the Contract||Expensive||$25,000||$65,000|
|Win the Contract||Moderate||$35,000||$75,000|
|Win the Contract||Inexpensive||$45,000||$85,000|
The production manager must decide whether to build the
prototype and how to bid.
He uses PROC DTREE to help him to make these decisions.
The structure of the model is stored in the
STAGEIN= data set
There are two decision stages, `
Choose' and `
Bid', and two
chance stages, `
Cost_Prototype' and `
Choose' stage represents the decision
whether or not to build a prototype. The chance stage
Cost_Prototype' represents the uncertain cost for building a
prototype. It can be `
Expensive', which costs $4,500, or
Moderate', which costs $2,500, or `
Inexpensive', which costs
$1,000. The `
Bid' stage represents the decision whether to
bid high or bid low. The last stage, `
the result, either win the contract or lose the contract.
/* -- create the STAGEIN= data set -- */ data Stage3; input _STNAME_ $16. _STTYPE_ $4. _OUTCOM_ $16. _SUCCES_ $16. _REWARD_ dollar8.0; datalines; Choose D Build_Prototype Cost_Prototype . . . No_Prototype Bid . Cost_Prototype C Expensive Bid -$4,500 . . Moderate Bid -$2,500 . . Inexpensive Bid -$1,000 Bid D High_Bid Contract . . . Low_Bid Contract . Contract C Win_Contract . . . . Lose_Contract . . ;
The PROBIN= data set, named Prob3, contains the probability information as in Table 3.33 and Table 3.34.
/* -- create the PROBIN= data set -- */ data Prob3; input (_GIVEN1_ _GIVEN2_ _EVENT_) ($16.) _PROB_; datalines; . . Expensive 0.4 . . Moderate 0.5 . . Inexpensive 0.1 Build_Prototype High_Bid Win_Contract 0.4 Build_Prototype High_Bid Lose_Contract 0.6 Build_Prototype Low_Bid Win_Contract 0.8 Build_Prototype Low_Bid Lose_Contract 0.2 No_Prototype High_Bid Win_Contract 0.2 No_Prototype High_Bid Lose_Contract 0.8 No_Prototype Low_Bid Win_Contract 0.7 No_Prototype Low_Bid Lose_Contract 0.3 ;
The PAYOFFS= data set named Payoff3 contains the
payoff information as in Table 3.35.
Notice that the payoff to outcome `
is not in the data set Payoff3. Since PROC DTREE
assigns the default value 0 to all scenarios that are not
in the PAYOFFS= data set, it is not necessary
to include it.
/* -- create the PAYOFFS= data set -- */ data Payoff3; input (_STATE1_ _STATE2_ _ACTION_) ($16.) _VALUE_ dollar8.0; datalines; Win_Contract . Low_Bid $35,000 Win_Contract . High_Bid $75,000 Win_Contract Expensive Low_Bid $25,000 Win_Contract Expensive High_Bid $65,000 Win_Contract Moderate Low_Bid $35,000 Win_Contract Moderate High_Bid $75,000 Win_Contract Inexpensive Low_Bid $45,000 Win_Contract Inexpensive High_Bid $85,000 ;
The solution, as in Output 3.3.1, is displayed on a graphics
device with the following code.
Notice that the title is specified before invoking PROC DTREE.
The GRAPHICS option is given on the
PROC DTREE statement.
Specifying the COMPRESS option in the
causes the decision tree diagram to be drawn completely on one page.
The vertical distance between two successive end nodes is 1
character cell (
All text, except that in the first title line is drawn with
font SWISS and height 1 character cell.
The height for all nodes is 3 character cells, which is specified
by the HSYMBOL= option.
The thickness for all links in the diagram, except those that
represent optimal decisions, is specified by the LWIDTH=
option as 8.
The thickness of the links that represent
optimal decisions is specified as
and the type of those
links is 3 (
lstyleb=3), the dash line.
Colors for the text, links and nodes, and symbols to be
used for nodes are not specified and hence defaults are used.
/* -- define title -- */ title1 font=swissb h=2 "Contract Bidding Example" ; /* -- define graphics options -- */ goptions colors=(black red blue green); goptions hsize=8 in vsize=8.4 in; /* -- PROC DTREE statements -- */ proc dtree stagein=Stage3 probin=Prob3 payoffs=Payoff3 graphics nowarning ; evaluate; treeplot / name="dt3" compress ybetween=1 cell ftext=swiss htext=1 hsymbol=3 lstyleb=3 lwidth=8 lwidthb=10; quit;
Output 3.3.1: Decision Tree for the Contract Bidding Problem
With the information on this decision tree, The production manager can select the optimal bidding strategy:
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.