TREE Subcommand (TREE command)
The TREE
subcommand
allows you to specify the appearance of the tree or suppress it altogether.
You can control its orientation, node contents, and the labeling of
splits and nodes. Each keyword is followed by an equals sign (=) and
the value for that keyword.
Example
TREE risk BY income age creditscore
/TREE DISPLAY=LEFTTORIGHT NODES=BOTH BRANCHSTATISTICS=NO.
DISPLAY Keyword
The DISPLAY
keyword controls the orientation the tree and can also be used to
suppress the display of the tree. The following alternatives are available:
TOPDOWN. Tree grows top down. The root node appears at the top of the diagram. The tree grows downward. This is the default.
LEFTTORIGHT. Tree grows from left to right.
RIGHTTOLEFT. Tree grows from right to left.
NONE. Tree diagram is not generated.
NODES Keyword
The NODES
keyword controls the contents of tree nodes.
STATISTICS. Nodes display summary statistics. This is the default. For a categorical dependent variable, percentages and counts are shown for each category as well as the total count and percentage. (Total percentage is the percentage of cases in the sample assigned to the node. If you specify prior probabilities, the total percentage is adjusted to account for those priors.)
For a scale dependent variable, nodes display mean, standard deviation, number of cases, and predicted value.
CHART. Nodes display a summary chart. For a categorical dependent variable, nodes display a bar chart of percentages for each category. For a scale dependent variable a histogram is shown that summarizes the distribution of the dependent variable.
BOTH. Statistics and chart are shown.
BRANCHSTATISTICS Keyword
The BRANCHSTATISTICS
keyword controls whether branch (split) statistics are shown in
the tree.
- For CHAID and Exhaustive CHAID, branch statistics include F value (for scale dependent variables) or chi-square value (for categorical dependent variables), as well as the significance value and degrees of freedom.
- For CRT, the improvement value is shown.
- For QUEST, F, the significance value, and degrees of freedom are shown for scale and ordinal independent variables. For nominal independent variables, chi-square, the significance value, and degrees of freedom are shown.
YES. Branch statistics are displayed. This is the default.
NO. Branch statistics are not displayed.
NODEDEFS Keyword
The NODEDEFS
keyword controls whether descriptive labels are shown for each node.
Node labels show the independent variable (predictor) values assigned
to each node.
YES. Node labels are displayed. This is the default.
NO. Node labels are not displayed.
SCALE Keyword
The SCALE
keyword controls the initial scale of the tree diagram.
AUTO. Adjust the scale according to the number of nodes and levels of tree growth. The scale is reduced automatically for large trees. This is the default.
value. User-specified percentage value. The value can be between 5 and 200, inclusive.