O'Reilly logo

IBM SPSS Modeler Cookbook by Scott Mutchler, Tom Khabaza, Meta S. Brown, Dean Abbott, Keith McCormick

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Changing large numbers of variable names without scripting

In this recipe we learn how to change variable names by adding suffixes or prefixes using a Derive node. The data sources for this recipe were developed by computing the average value of several key fields after aggregating by the variable STATE and then by DOMAIN. The Aggregate node, as a default, appends the string _Mean (when obtaining a mean) to each of the variables so that the variable names come from both.

Getting ready

This recipe uses the datafiles cup98lrn_reduced_vars3_varchange state.sav and up98lrn_reduced_vars3_varchange domain.sav, and the stream Recipe – change variable names.str.

How to do it...

To change variable names by adding suffixes or prefixes using a Derive node:

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required