Creating flag variables for aggregation

The SetToFlag node is a very convenient node that converts a single nominal variable into as many binary columns as desired, one column for each nominal variable value. However, the default values for the node are T and F, which unfortunately cannot be used for any nodes that require numeric values. In this recipe we will create flag variables that can be used in Aggregate nodes, Means nodes, and other numeric operations. Using numeric values (1 and 0 in this recipe) will work with any nodes that require flag or nominal values such as Association Rules and the grouping variable for the Means node (as T and F will), but will also work as numeric values in nodes such as the Aggregate node.

Getting ready

This ...

Get IBM SPSS Modeler Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.