The DTREE Procedure |
PROC DTREE draws the decision tree either in line-printer mode or in graphics mode. However, you need to have SAS/GRAPH software licensed at your site to use graphics mode. In many cases, the procedure draws the decision tree across page boundaries. If the decision tree diagram is drawn on multiple pages, the procedure numbers each page of the diagram on the upper right corner of the page (unless the NOPAGENUM option is specified). The pages are numbered starting with the upper left corner of the entire diagram. Thus, if the decision tree diagram is broken into three horizontal and four vertical levels and you want to paste all the pieces together to form one picture, they should be arranged as shown in Figure 5.10.
The number of pages that are produced depends on the size of the tree and on the number of print positions that are available in the horizontal and vertical directions. Table 5.28 lists all options you can use to control the number of pages.
Option | Effect |
DISPLAY= | amounts of information displayed on the diagram |
MAXPREC= | maximum decimal width allowed (the precision) to format numerical values into format |
MAXWIDTH= | maximum field width allowed to format numerical values |
NOLABEL | no labels are displayed on the diagram |
NWIDTH= | maximum field width allowed to format outcome names |
YBETWEEN= | vertical spaces between two successive end nodes |
If the GRAPHICS option is used, the following
options can be used to control the number of pages:
Note that the font used for all text may also affect the number of pages needed. Some fonts take more space than others.
If the decision tree diagram is produced on a line printer, you can use the FORMCHAR= option to control the appearance the links and the junctions of the diagram. When the GRAPHICS options is specified, several options are available to enhance the appearance of the decision tree diagram. These are described in the section "Graphics Options". In addition, there are many other options available in the GOPTIONS statement and the SYMBOL statement for controlling the details of graphics output. Refer to the relevant chapters in SAS/GRAPH Software: Reference for a detailed discussion of the GOPTIONS and SYMBOL statements.
Table 5.29, Table 5.30, and Table 5.31, show the relationship among the options for controlling the appearance of texts, nodes, and links, respectively. The order that PROC DTREE uses in determining which option is in effect is also provided. For ODS purposes, the label of the decision tree diagram drawn in line-printer quality is "Treeplot."
Object | Specification | Search Order | |
Text | Font | 1. | the FTEXT= option |
2. | the FTEXT= option in a GOPTIONS statement | ||
3. | the Font attribute of the GraphDataText element of the current ODS style definition (if the GSTYLE system option is active) | ||
4. | hardware font | ||
Color | 1. | the CTEXT= option | |
2. | the CTEXT= option in a GOPTIONS statement | ||
3. | the Color attribute of the GraphDataText element of the current ODS style definition (if the GSTYLE system option is active) | ||
4. | the first color in the colors list | ||
Height | 1. | the value of the HTEXT= option times the value of the HTEXT= option in a GOPTIONS statement |
If this option is not specified, the default value 1 is used.
The default value of this option is 1 unit.
Object | Specification | Search Order | |
Chance | Symbol | 1. | the VSYMBOLC= option |
Nodes | 2. | the VALUE= and FONT= options in the mth generated SYMBOL definition, if SYMBOLC=m is used | |
3. | the default symbol, CIRCLE | ||
Color | 1. | the CSYMBOLC= option | |
2. | the CV= option in the mth generated SYMBOL definition, if SYMBOLC=m is used | ||
3. | the CSYMBOL= option in a GOPTIONS statement | ||
4. | the ContrastColor attribute of the GraphData1 element of the current ODS style definition (if the GSTYLE system option is active) | ||
5. | the fifth color in the colors list | ||
Height | 1. | h times the value of the HEIGHT= option in the mth generated SYMBOL definition, if both the HSYMBOL=h and the SYMBOLC=m are specified | |
2. | the HSYMBOL= option, if it is specified | ||
3. | the HEIGHT= option in the mth generated symbol definition, if SYMBOLC=m is used | ||
4. | the default value, 1 cell | ||
Decision | Symbol | 1. | the VSYMBOLD= option |
Nodes | 2. | the VALUE= and FONT= options in the dth generated SYMBOL definition, if SYMBOLD=d is used | |
3. | the default value, SQUARE | ||
Color | 1. | the CSYMBOLD= option | |
2. | the CV= option in the dth generated SYMBOL definition, if SYMBOLD=d is used | ||
3. | the CSYMBOL= option in a GOPTIONS statement | ||
4. | the ContrastColor attribute of the GraphData5 element of the current ODS style definition (if the GSTYLE system option is active) | ||
5. | the fourth color in the colors list | ||
Height | 1. | h times the value of the HEIGHT= option in the dth generated SYMBOL definition, if both the HSYMBOL=h and the SYMBOLD=d are specified | |
2. | the HSYMBOL= option, if it is specified | ||
3. | the HEIGHT= option in the dth generated symbol definition, if SYMBOLD=d is used | ||
4. | the default value, 1 cell | ||
End | Symbol | 1. | the VSYMBOLE= option |
Nodes | 2. | the VALUE= and FONT= options in the nth generated SYMBOL definition, if SYMBOLE=n is used | |
3. | the default value, DOT | ||
Color | 1. | the CSYMBOLE= option | |
2. | the CV= option in the nth generated SYMBOL definition if the option SYMBOLE=n is specified | ||
3. | the CSYMBOL= option in a GOPTIONS statement | ||
4. | the ContrastColor attribute of the GraphData8 element of the current ODS style definition (if the GSTYLE system option is active) | ||
5. | the sixth color in the colors list | ||
Height | 1. | h times the value of the HEIGHT= option in the nth generated SYMBOL definition, if both the HSYMBOL=h and the SYMBOLE=n are specified | |
2. | the HSYMBOL= option, if it is specified | ||
3. | the HEIGHT= option in the nth generated symbol definition, if SYMBOLE=n is used | ||
4. | the default value, 1 cell |
Object | Specification | Search Order | |
Links | Type | 1. | the LSTYLE= option |
for | 2. | the LINE= in the ith generated SYMBOL definition, | |
Regular | if LINKA=i is used | ||
Outcomes | 3. | the default value, 1 (solid line) | |
Color | 1. | the CLINK= option | |
2. | the CI= option in the ith generated SYMBOL definition, if LINKA=i is used | ||
3. | the ContrastColor attribute of the GraphData3 element of the current ODS style definition (if the GSTYLE system option is active) | ||
4. | the third color in the colors list | ||
Thickness | 1. | the LWIDTH= option | |
2. | the WIDTH= option in the ith generated SYMBOL definition, if LINKA=i is used | ||
3. | the default value, 1 | ||
Links | Type | 1. | the LSTYLEB= option |
for | 2. | the LINE= in the jth generated SYMBOL definition, | |
Optimal | if LINKB=j is used | ||
Decision | 3. | the default value, 1 (solid line) | |
Color | 1. | the CBEST= option | |
2. | the CI= option in the jth generated SYMBOL definition, if LINKB=j is used | ||
3. | the ContrastColor attribute of the GraphData2 element of the current ODS style definition (if the GSTYLE system option is active) | ||
4. | the second color in the colors list | ||
Thickness | 1. | the LWIDTHB= option | |
2. | the WIDTH= option in the jth generated SYMBOL definition, if LINKB=j is used | ||
3. | 2 times the thickness of links that represent regular outcomes | ||
Links | Type | 1. | the LSTYLEC= option |
That | 2. | the LINE= in the kth generated SYMBOL definition, | |
Fall | if LINKC=k is used | ||
Across | 3. | the default value, 2 (dot line) | |
Pages | Color | 1. | depends on whether or not it represents an optimal decision |
Thickness | 1. | depends on whether or not it represents an optimal decision |
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.