![]() Chapter Contents |
![]() Previous |
![]() Next |
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. 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 3.10.
1 | 5 | 9 |
2 | 6 | 10 |
3 | 7 | 11 |
4 | 8 | 12 |
Figure 3.10: Page Layout of the Decision Tree Diagram
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 3.28 lists all options you can use to control the number of pages.
Table 3.28: Options that Control the Number of PagesOption | Effect |
DISPLAY= | amounts of information displayed on the diagram |
MAXPREC= | maximum decimal width allowed (the precision) to format numerical values into w.d 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:
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 "Graphics Options" section. 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 3.29, Table 3.30, and Table 3.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."
Table 3.29: Options that Control Text AppearanceObject | Specification | Search Order | |
Text | Font | 1. | the FTEXT= option |
2. | the FTEXT= option in a GOPTIONS statement | ||
3. | hardware font | ||
Color | 1. | the CTEXT= option | |
2. | the CTEXT= option in a GOPTIONS statement | ||
3. | 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 |
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 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 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 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 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 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 |
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.