Login

Working with Variables in SPSS Statistics

In SPSS Statistics, you need to define your variables, which occurs in the Variables View. To access the Variable View you need to click the Variables View tab as shown below:

Working with Variables

Published with written permission from SPSS Statistics, IBM Corporation.

In this Variable View, you can adjust the properties of each of your variables under 10 categories: Name, Type, Width, Decimals, Label, Values, Missing, Columns, Align and Measure.

SPSS Variables - Name To change the name of a column (variable) in the Data View sheet, click in the appropriate cell and type in the new name. The names in this column must not start with a number. They also cannot contain special characters such as / * $, space etc. You will be given an error message if your name is in illegal format.

SPSS Variables - Type To define the type of data contained in the column (e.g., characters, strings, numbers, etc.), click on the appropriate row in the Type column.

SPSS Variables - Width You can alter the number of digits displayed in the column by clicking in the appropriate Width cell.

SPSS Variables - Decimals You can alter the number of digits after the decimal place by clicking in the appropriate Width cell.

SPSS Variables - Label Click on the appropriate cell in the Labels column to give a long description, which will help you to understand the variable you are referring to.

SPSS Variables - Values You can give a text label for category codes by clicking on the appropriate cell in the column values. Default is None.

First, click on the "None" cell box and then on the SPSS Dot Button button, as show in the diagram below:

Working with Variables

Published with written permission from SPSS Statistics, IBM Corporation.

In the -Value Labels-, enter the numeric code value "1" in the text box, Value:. This value corresponds to the group representing "Males", so enter "Males" in the Label: box.

Working with Variables

Published with written permission from SPSS Statistics, IBM Corporation.

Click on the SPSS Add Button button.

Testimonials
TAKE THE TOUR


Repeat the above, entering "2" in the Value: box and "Female" in the Label: box, and click on the SPSS Add Button button.

You will be presented with the following screen:

Working with Variables

Published with written permission from SPSS Statistics, IBM Corporation.

Click on the SPSS OK Button button.

SPSS Missing Button To define different type of missing value code, click on the appropriate cell in the Missing column.

SPSS Columns Button The width of column in the data view sheet can be altered by clicking in the appropriate Column cell.

SPSS Align Button To align the text or numbers in Data View, click in the appropriate Align cell.

SPSS Measure Button To label the scale of data, click in the appropriate Measure cell. In our example, we need to select the "Nominal" value.

Working with Variables

Published with written permission from SPSS Statistics, IBM Corporation.

You can now see the results of your labelling by clicking the SPSS Convert Button button in the Data Editor View, as shown below:

Working with Variables

Published with written permission from SPSS Statistics, IBM Corporation.

Join the 10,000s of students, academics and professionals who rely on Laerd Statistics.TAKE THE TOUR
1