Data file demo.sav

Several categorical variables in the data file demo.sav are, in fact, derived from scale variables in that data file. For example, the variable inccat is simply income grouped into four categories -- and here's how it was done...

step From the menus in the Data Editor window choose:

Transform
  Recode
   Into Different Variables

step Select Household income in thousands (income) for the Numeric Variable --> Output Variable list.

step Enter inccat2 for the output variable name.

step Enter Income category for the output variable label.

step Click Change.

step Click Old and New Values.

step In the Old Value group, click the second Range button and enter 24.999 in the text field after Lowest through.

step In the New Value group, click Value and enter 1.

step Click Add.

step Click the first Range button.

step Enter 25 in the first text field and 49.999 in the second text field.

step Click Value and enter 2.

step Click Add.

step Click the first Range button.

step Enter 50 in the first text field and 74.999 in the second text field.

step Click Value and enter 3.

step Click Add.

step Click the third Range button.

step Enter 75 in the text field before through highest.

step Click Value and enter 4.

step Click Add.

step Click Continue, and then click OK in the main dialog box.

The new variable is displayed in the Data Editor. Since the variable is added to the end of the file, it is displayed in the far right column in Data view and in the last row in Variable view.

At this point, you might want to add value labels that describe what each of the four categorical values represents. Defining value labels is described in Adding Value Labels for Numeric Variables