Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The DTREE Procedure

VARIABLES Statement

VARIABLES / options ;

The VARIABLES statement specifies the variable lists in the input data sets. This statement is optional but if it is used, it must appear immediately after the PROC DTREE statement. The options that can appear in the VARIABLES statement are divided into groups according to the data set in which they occur. Table 3.25 lists all the variables or variable lists associated with each input data set and their types. It also lists the default variables if they are not specified in this statement.


Table 3.25: Input Data Sets and Their Associated Variables
Data Set Variable Type* Interpretation Default
STAGEIN=OUTCOME=C/NOutcome namesVariables with prefix _OUT
 REWARD=NInstant rewardVariables with prefix _REW
 STAGE=C/NStage name_STNAME_
 SUCCESSOR=as STAGE=Immediate successorsVariables with prefix _SUCC
 TYPE=C/NStage type_STTYPE_
 WEB=CHTML page for the stage 
PROBIN=EVENT=as OUTCOME=Event namesVariables with prefix _EVEN
 GIVEN=as OUTCOME=Names of given outcomesVariables with prefix _GIVE
 PROB=NConditional probabilitiesVariables with prefix _PROB
PAYOFFS=ACTION=as OUTCOME=Action names of final decisionVariables with prefix _ACT
 STATE=as OUTCOME=Outcome namesVariables with prefix _STAT
 VALUE=NValues of the scenarioVariables with prefix _VALU


Variables in STAGEIN= Data Set

The following options specify the variables or variable lists in the STAGEIN= input data set that identify the stage name, its type, its outcomes, and the reward; and the immediate successor of each outcome for each stage in the decision model:

OUTCOME=(variables)
identifies all variables in the STAGEIN= data set that contain the outcome names of the stage specified by the STAGE= variable. If the OUTCOME= option is not specified, PROC DTREE looks for the default variable names that have the prefix _OUT in the data set. It is necessary to have at least one OUTCOME= variable in the STAGEIN= data set. The OUTCOME= variables can be either all character or all numeric. You cannot mix character and numeric variables as outcomes.

REWARD=(variables)
COST=(variables)
identifies all variables in the STAGEIN= data set that contain the reward for each outcome specified by the OUTCOME= variables. If the REWARD= option is not specified, PROC DTREE looks for the default variable names that have the prefix _REW in the data set. The number of REWARD= variables must be equal to the number of OUTCOME= variables in the data set. The REWARD= variables must have numeric values.

STAGE=variable
specifies the variable in the STAGEIN= data set that names the stages in the decision model. If the STAGE= option is omitted, PROC DTREE looks for the default variable named _STNAME_ in the data set. The STAGE= variable must be specified if the data set does not contain a variable named _STNAME_. The STAGE= variable can be either character or numeric.

SUCCESSOR=(variables)
SUCC=(variables)
identifies all variables in the STAGEIN= data set that contain the names of immediate successors (another stage) of each outcome specified by the OUTCOME= variables. These variables must be of the same type and length as those defined in the STAGE= option. If the SUCCESSOR= option is not specified, PROC DTREE looks for the default variable names that have the prefix _SUCC in the data set. The number of SUCCESSOR= variables must be equal to the number of OUTCOME= variables. The values of SUCCESSOR= variables must be stage names (values of STAGE= variables in the same data set).

TYPE=variable
identifies the variable in the STAGEIN= data set that contains the type identifier of the stage specified by the STAGE= variable. If the TYPE= option is omitted, PROC DTREE looks for the default variable named _STTYPE_ in the data set. The TYPE= variable must be specified if the data set does not contain a variable named _STTYPE_. The STAGE= variable can be either character or numeric.

The following are valid values for the TYPE= variable

Value Description
DECISIONorDor1identifies the stage as a decision stage
CHANCEorCor2identifies the stage as an uncertain stage
ENDorEor3identifies the stage as an end stage


It is not necessary to specify an end stage in the STAGEIN= data set.

WEB=variable
HTML=variable
specifies the character variable in the STAGEIN= data set that identifies an HTML page for each stage. The procedure generates an HTML image map using this information for all the decision tree nodes corresponding to a stage.

Variables in PROBIN= Data Set

The following options specify the variables or variable lists in the PROBIN= input data set that identify the given outcome names, the event (outcome) name, and the conditional probability for each outcome of a chance stage.

EVENT=(variables)
identifies all variables in the PROBIN= data set that contain the names of events (outcomes) that probabilities depend on the outcomes specified by the GIVEN= variables. If the EVENT= option is not specified, PROC DTREE looks for the default variable names that have the prefix _EVEN in the data set. You must have at least one EVENT= variable in the PROB= data set. The values of EVENT= variables must be outcome names that are specified in the STAGEIN= data set.

GIVEN=(variables)
identifies all variables in the PROBIN= data set that contain the given condition (a list of outcome names) of a chance stage on which the probabilities of the outcome depend. If the GIVEN= option is not specified, PROC DTREE looks for the default variable names that have the prefix _GIVE in the data set. It is not necessary to have GIVEN= variables in the data set but if there are any, their values must be outcome names that are specified in the STAGEIN= data set.

PROB=(variables)
identifies all variables in the PROBIN= data set that contain the values of the conditional probability of each event specified by the EVENT= variables, given that the outcomes specified by the GIVEN= variables have occurred. If the PROB= option is not specified, PROC DTREE looks for the default variable names that have the prefix _PROB in the data set. The number of PROB= variables in the data set must be equal to the number of EVENT= variables. The PROB= variables must have numeric values between 0 and 1 inclusive.

Variables in PAYOFFS= Data Set

The following options specify the variables or variable lists in the PAYOFFS= input data set that identify the possible scenarios (a sequence of outcomes), the final outcome names, and the evaluating values (payoff) of combinations of scenarios and final outcomes.
ACTION=(variables)
identifies all variables in the PAYOFFS= data set that contain the name of the final outcome for each possible scenario. If the ACTION= option is not specified, PROC DTREE looks for the default variable names that have the prefix _ACT in the data set. It is not necessary to have any ACTION= variables in the PAYOFFS= data set, but if there are any, their values must be outcome names specified in the STAGEIN= data set.

STATE=(variables)
identifies all variables in the PAYOFFS= data set that contain the names of outcomes that identify a possible scenario (a sequence of outcomes or a path in the decision tree), or the names of outcomes which combine with every outcome specified by the ACTION= variables to identify a possible scenario. If the STATE= option is not specified, PROC DTREE looks for the default variable names that have the prefix _STAT in the data set. It is not necessary to have any STATE= variables in the PAYOFFS= data set, but if there are any, their values must be outcome names specified in the STAGEIN= data set.

VALUE=(variables)
PAYOFFS=(variables)
UTILITY=(variables)
LOSS=(variables)
identifies all variables in the PAYOFFS= data set that contain the evaluating values or payoffs for all possible scenarios identified by the outcomes specified by the STATE= variables and the outcomes specified by the associated ACTION= variables. If the VALUE= option is not specified, PROC DTREE looks for the default variable names that have the prefix _VALU in the data set. The number of VALUE= variables must be equal to the number of ACTION= variables if there are any ACTION= variables. If there are no ACTION= variables in the data set, at least one STATE= variable must be in the data set, and the number of VALUE= variables must be exactly 1. The VALUE= variables must have numeric values.

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.