Using SPSS and PASW/Creating New Variables

This chapter will cover how to create new variables in SPSS. Creating a new variable is a foundational skill for users of SPSS statistical software, and a necessary step before performing the statistical tests and procedures covered in later chapters. This chapter will provide examples with screenshots to illustrate how you can create variables with ease.

Creating a new variable in SPSS can be completed with just a few clicks, and some simple data entry. First, switch the Data Editor window to “Variable View” (see Chapter 5 for more information on Variable View):

11creatingnewvariables01.png

Once in the “Variable View” tab click on an empty cell in an empty row in which you wish to create the new variable under the column labeled “name.” (If working from a blank SPSS data set this will be in the first row, if working from a preexisting data set, you will need to scroll down to the next open row). Once you have created the new variable, it will appear as, “VAR0001”:

11creatingnewvariables02.png

You can rename the variable by clicking into the cell and typing the name you desire to change it to. In this example the variable has been named “Age.”

11creatingnewvariables03.png

You can specify the type of the variable by clicking in the cell under the column labeled “Type.” An ellipsis will appear:

11creatingnewvariables04.png

Click on the ellipsis to open the Variable Type Dialog box:

11creatingnewvariables05.png

Using this option you may specify the type of the variable you are preparing to analyze, as well as the width and decimal places. Most variables will be “Numeric,” meaning there will be a number used, either because the number itself is meaningful (interval/ratio variables) or because it represents distinct categories. String variables are text variables. You can also have Date and Currency variables.

Closing the variable type window, we continue to move to the right, examining the various characteristics of variables. You can input a label for your variable, which is a description of the variable:

11creatingnewvariables06.png

You can also assign values for the different categories of the variable. This is particularly useful for nominal and ordinal variables for which you assign a unique number to each category (e.g., for race you may have: 1=white, 2=black, 3=Native American, etc.) To access the values option, click on the cell under the “Value” column and an ellipsis will appear. Click on the ellipsis and enter your values and value labels in the “Value Label” dialog box:

11creatingnewvariables07.png

Next you will need to specify the values of any missing values you may have. It is generally a good idea when using any statistical program to include a Value for cases where people did not respond. This Values should be included in the Value Labels, but should also be included in the “Missing” column as it will prevent SPSS from attempting to use those values in calculations. To add these values to the list of Missing Values, click on the cell in the “Missing” column. Click on the ellipsis that appears in order to access the “Missing Values” dialog box:

11creatingnewvariables08.png

While there are no right or wrong values to assign for missing data, it is common to uses iterations of 9. For instance, if a variable has 4 categories (1, 2, 3, and 4) and missing values, you can assign a “9” to indicate that the value is missing for that person. If there are 20 categories, you could use “99.” If there are 200 categories, you could use “999,” and so on. This is a widespread practice, but not mandatory. You could choose a different system to indicate missing values.

Finally, you must specify your level of measurement. This may be done by clicking on the cell under the column labeled “Measure” and choosing from Nominal, Ordinal, and Scale. Nominal and ordinal variables should be labeled under their corresponding names, while interval and ratio variables should be labeled as “Scale.”

11creatingnewvariables09.png

Repeat this process for as many variables as you need to create and/or define.

Chapter contributed by Damian Patrinostro.

Last modified on 29 June 2010, at 03:04