SPSS » Getting to Know SPSS » Working with Variables

Working with Variables in SPSS

In SPSS, 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 Inc, an IBM Company.

Here 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 Inc, an IBM Company.

Enter the numeric code value 1 in the text box for 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 Inc, an IBM Company.

Click on the SPSS Add Button button.

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 an the following screen:

Working with Variables

Published with written permission from SPSS Inc, an IBM Company.

Click on the SPSS OK Button button.

SPSS Missing Button To define different type of missing vale 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 Inc, an IBM Company.

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 Inc, an IBM Company.

1
Share to Facebook Email to a Friend Share to Twitter Stumble It Delicious Digg This Yahoo MySpace Reddit
Other Laerd Websites Laerd Mathematics Laerd Referencing Laerd Dissertation