Effects of measurement level on tree models

Both variables in this data file are numeric, and both have been assigned the scale measurement level. But (as we will see later) both variables are really categorical variables that rely on numeric codes to stand for category values.

  1. To run a Decision Tree analysis, from the menus choose:

    Analyze > Classify > Tree...

    The icons next to the two variables in the source variable list indicate that they will be treated as scale variables.

    Figure 1. Decision Tree main dialog box with two scale variables
    Decision Tree main dialog box with two scale variables
  2. Select dependent as the dependent variable.
  3. Select independent as the independent variable.
  4. Click OK to run the procedure.
  5. Open the Decision Tree dialog box again and click Reset.
  6. Right-click dependent in the source list and select Nominal from the context menu.
  7. Do the same for the variable independent in the source list.

    Now the icons next to each variable indicate that they will be treated as nominal variables.

    Figure 2. Nominal icons in source list
    Nominal icons in source list
  8. Select dependent as the dependent variable and independent as the independent variable, and click OK to run the procedure again.

Now let's compare the two trees. First, we'll look at the tree in which both numeric variables are treated as scale variables.

Figure 3. Tree with both variables treated as scale
Tree with both variables treated as scale
  • Each node of tree shows the "predicted" value, which is the mean value for the dependent variable at that node. For a variable that is actually categorical, the mean may not be a meaningful statistic.
  • The tree has four child nodes, one for each value of the independent variable.

Tree models will often merge similar nodes, but for a scale variable, only contiguous values can be merged. In this example, no contiguous values were considered similar enough to merge any nodes together.

The tree in which both variables are treated as nominal is somewhat different in several respects.

Figure 4. Tree with both variables treated as nominal
Tree with both variables treated as nominal
  • Instead of a predicted value, each node contains a frequency table that shows the number of cases (count and percentage) for each category of the dependent variable.
  • The "predicted" category—the category with the highest count in each node—is highlighted. For example, the predicted category for node 2 is category 3.
  • Instead of four child nodes, there are only three, with two values of the independent variable merged into a single node.

The two independent values merged into the same node are 1 and 4. Since, by definition, there is no inherent order to nominal values, merging of noncontiguous values is allowed.

Next